za.co.luma.math.sampling
Class UniformPoissonDiskSampler
java.lang.Object
za.co.luma.math.sampling.UniformPoissonDiskSampler
- All Implemented Interfaces:
- Sampler<Vector2DDouble>
public class UniformPoissonDiskSampler
- extends java.lang.Object
- implements Sampler<Vector2DDouble>
Algorithm based on Fast Poisson Disk Sampling in Arbitrary Dimensions by Robert Bridson. To use,
construct a new PoissonDisk with suitable parameters, and call generate to get a list of points.
- Author:
- Herman Tulleken
Constructor Summary |
UniformPoissonDiskSampler(double x0,
double y0,
double x1,
double y1,
double minDist)
Construct a new PoissonDisk object, with a given domain and minimum distance between points. |
UniformPoissonDiskSampler(double x0,
double y0,
double x1,
double y1,
double minDist,
int pointsToGenerate)
|
Method Summary |
java.util.List<Vector2DDouble> |
sample()
Generates a list of points following the Poisson distribution. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniformPoissonDiskSampler
public UniformPoissonDiskSampler(double x0,
double y0,
double x1,
double y1,
double minDist)
- Construct a new PoissonDisk object, with a given domain and minimum distance between points.
- Parameters:
x0
- x-coordinate of bottom left corner of domain.y0
- x-coordinate of bottom left corner of domain.x1
- x-coordinate of bottom left corner of domain.y1
- x-coordinate of bottom left corner of domain.minDist
- The minimum distance between two points.
UniformPoissonDiskSampler
public UniformPoissonDiskSampler(double x0,
double y0,
double x1,
double y1,
double minDist,
int pointsToGenerate)
sample
public java.util.List<Vector2DDouble> sample()
- Generates a list of points following the Poisson distribution. No more than MAX_POINTS are produced.
- Specified by:
sample
in interface Sampler<Vector2DDouble>
- Returns: