Package org.joml.sampling
Class PoissonSampling.Disk
java.lang.Object
org.joml.sampling.PoissonSampling.Disk
- Enclosing class:
PoissonSampling
Generates Poisson samples on a disk.
The algorithm implemented here is based on Fast Poisson Disk Sampling in Arbitrary Dimensions.
- Author:
- Kai Burjack
-
Constructor Summary
ConstructorsConstructorDescriptionDisk(long seed, float diskRadius, float minDist, int k, Callback2d callback) Create a new instance ofPoissonSampling.Diskwhich computes poisson-distributed samples on a disk with the given radiusdiskRadiusand notifies the givencallbackfor each found sample point. -
Method Summary
-
Constructor Details
-
Disk
Create a new instance ofPoissonSampling.Diskwhich computes poisson-distributed samples on a disk with the given radiusdiskRadiusand notifies the givencallbackfor each found sample point.The samples are distributed evenly on the disk with a minimum distance to one another of at least
minDist.- Parameters:
seed- the seed to initialize the random number generator withdiskRadius- the disk radiusminDist- the minimum distance between any two generated samplesk- determines how many samples are tested before rejection. Higher values produce better results. Typical values are 20 to 30callback- will be notified about each sample point
-