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 disk of any other point
  • Nodes fill the space uniformly

Structs

PoissonDisk

Generates poisson-disk distribution in [0, 1]² area with O(N log N) time and space complexity relative to the number of samples generated. Based on Gamito, Manuel N., and Steve C. Maddock. "Accurate multidimensional Poisson-disk sampling." ACM Transactions on Graphics (TOG) 29.1 (2009): 8.

Sample

Describes position of sample and radius of disk around it.

Functions

calc_radius

Calculates approximately needed radius from amount of points wanted and relative radius specified. Points should be larger than 0. Relative radius should be ]0, 1].

Type Definitions

Vec2