Poisson-disk distribution generation
Generates distribution of points in [0, 1)d where:
- For each point there is disk of certain radius which doesn't intersect with any other disk of other points
- Samples fill the space uniformly
Due it's blue noise properties poisson-disk distribution can be used for object placement in procedural texture/world generation, as source distribution for digital stipling, as distribution for sampling in rendering or for (re)meshing.
Examples
Generate non-tiling poisson-disk distribution in [0, 1)2 with disk radius 0.1 using slower but more accurate algorithm.
extern crate poisson;
extern crate rand;
extern crate nalgebra as na;
use FromEntropy;
use SmallRng;
use ;
Generate tiling poisson-disk distribution in [0, 1)3 with approximately 100 samples and relative disk radius 0.9 using faster but less accurate algorithm.
# extern crate nalgebra as na;
# use ;
# use FromEntropy;
# use SmallRng;