|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectza.co.luma.math.sampling.PoissonDiskMultiSampler
public class PoissonDiskMultiSampler
Nested Class Summary | |
---|---|
static class |
PoissonDiskMultiSampler.Circle
|
Field Summary | |
---|---|
java.util.List<java.util.List<PoissonDiskMultiSampler.Circle>[][]> |
grids
|
static int |
MAX_POINTS
A safety measure - no more than this number of points are produced by ther algorithm. |
Constructor Summary | |
---|---|
PoissonDiskMultiSampler(double x0,
double y0,
double x1,
double y1,
double[] minDist,
double[] minRadii,
double[] radii,
RealFunction2DDouble distribution,
boolean multiLayer)
Construct a new PoissonDisk object, with a given domain and minimum distance between points. |
|
PoissonDiskMultiSampler(double x0,
double y0,
double x1,
double y1,
double[] minDist,
double[] minRadii,
double[] radii,
RealFunction2DDouble distribution,
boolean multiLayer,
int pointsToGenerate)
Construct a new PoissonDisk object, with a given domain and minimum distance between points. |
Method Summary | |
---|---|
static PoissonDiskMultiSampler.Circle |
generateAround(Vector2DDouble centre,
double minDist,
double minRadius,
double radius,
double distanceScale,
double angleScale,
double radiusScale)
Generates a random point in the analus around the given point. |
static Vector2DInt |
pointDoubleToInt(Vector2DDouble pointDouble,
Vector2DDouble origin,
double cellSize)
Converts a PointDouble to a PointInt that represents the index coordinates of the point in the background grid. |
java.util.List<PoissonDiskMultiSampler.Circle>[] |
sample()
Generates an array of lists of points following the Poisson distribution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_POINTS
public java.util.List<java.util.List<PoissonDiskMultiSampler.Circle>[][]> grids
Constructor Detail |
---|
public PoissonDiskMultiSampler(double x0, double y0, double x1, double y1, double[] minDist, double[] minRadii, double[] radii, RealFunction2DDouble distribution, boolean multiLayer, int pointsToGenerate)
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.distribution
- A function that gives the minimum radius between points in the
vicinity of a point.public PoissonDiskMultiSampler(double x0, double y0, double x1, double y1, double[] minDist, double[] minRadii, double[] radii, RealFunction2DDouble distribution, boolean multiLayer)
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.distribution
- A function that gives the minimum radius between points in the
vicinity of a point.Method Detail |
---|
public java.util.List<PoissonDiskMultiSampler.Circle>[] sample()
public static Vector2DInt pointDoubleToInt(Vector2DDouble pointDouble, Vector2DDouble origin, double cellSize)
public static PoissonDiskMultiSampler.Circle generateAround(Vector2DDouble centre, double minDist, double minRadius, double radius, double distanceScale, double angleScale, double radiusScale)
centre
- The point around which the random point should be.distanceScale
- TODOangleScale
- TODOradiusScale
- TODO
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |