Poisson disc distribution produces evenly randomly distributed points, where all points are at least minimum distance apart.
PoissonDiscSampling.generate(min_dist, area_width, area_height, samples)
min_dist - minimum distance between points
samples - maximum number of attempts to find a new suitable point in each step (typically 30)
The algorithm divides the area into a grid and places at most one point into each cell.
Returns list of {x, y}
points.
-
This implementation uses an algorithm by Robert Bridson: Fast Poisson Disk Sampling in Arbitrary Dimensions