Skip to main content
edited tags
Link
user21
  • 42.2k
  • 8
  • 116
  • 176
Notice removed Authoritative reference needed by yode
Bounty Ended with Kelly Lowder's answer chosen by yode
added 2 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183

I don't very content with current method.So a better solution is expected still.I hope the it meet that two conditions in following.

  1. That space is approximately equivalence.
  2. We can control how many points to produce.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.

I don't very content with current method.So a better solution is expected still.I hope the it meet that two conditions.

  1. That space is approximately equivalence.
  2. We can control how many points to produce.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.

I don't very content with current method.So a better solution is expected still.I hope it meet two conditions in following.

  1. That space is approximately equivalence.
  2. We can control how many points to produce.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.
Notice added Authoritative reference needed by yode
Bounty Started worth 100 reputation by yode
added 237 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183

I don't very content with current method.So a better solution is expected still.I hope the it meet that two conditions.

  1. That space is approximately equivalence.
  2. We can control how many points to produce.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.

I don't very content with current method.So a better solution is expected still.I hope the it meet that two conditions.

  1. That space is approximately equivalence.
  2. We can control how many points to produce.

v11.1 provides a new function SpherePoints. As the Details

SpherePoints[n] gives exactly equally spaced points in certain cases for small n. In other cases, it places points so they are approximately equally spaced.

Can we achieve the same goal i.e. approximately equally spaced points in an arbitrary 2D Region?

The following is my attempt based on Union:

SeedRandom[1] region = ConvexHullMesh[RandomReal[1, {100, 2}]]; UniformPts = Union[RandomPoint[region, 50000], SameTest -> (EuclideanDistance[#1, #2] < .1 &)]; Show[region, Graphics[Point[UniformPts]]] 

Nevertheless, this approach has two weakness:

  1. It is slow with a large number of pre-generated points i.e. the 2nd argument of RandomPoint, while the space won't be uniform enough if I don't pre-generate enough points, here's an example:

enter image description here

  1. The number of resulting points isn't controllable.
Tweeted twitter.com/StackMma/status/847034877774090240
edited tags
Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405
Loading
added 2 characters in body
Source Link
xzczd
  • 71.6k
  • 10
  • 183
  • 524
Loading
added 62 characters in body; edited title
Source Link
xzczd
  • 71.6k
  • 10
  • 183
  • 524
Loading
added 316 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183
Loading
added 6 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183
Loading
added 5 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183
Loading
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183
Loading