Crate poisson [−] [src]
Poisson-disk distribution generation
Generates distribution of points 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
Examples
extern crate poisson; use poisson::{Builder, Type, algorithm}; extern crate rand; extern crate nalgebra as na; type Vec2 = na::Vec2<f64>; fn main() { let poisson = Builder::<_, Vec2>::with_radius(0.1, Type::Normal) .build(rand::weak_rng(), algorithm::Ebeida); let samples = poisson.generate(); println!("{:?}", samples); }
Modules
algorithm |
Module that contains traits that describe poisson-disk distribution generating algorithms. |
Structs
Builder |
Builder for the generator. |
Generator |
Generates poisson-disk distribution for [0, 1]² area. |
PoissonIter |
Iterator for generating poisson-disk distribution. |
Enums
Type |
Enum for determining the type of poisson-disk distribution. |
Traits
Float |
Describes what floats are. |
Vector |
Describes what vectors are. |