poissondiscsampling
poissondiscsampling(x1, y1, x2, y2, min, max)
Poisson Disc Sampling - Produces points via Poisson-disc sampling, inside the bounding box. No two points will be closer than the defined radius r. Return a list of points.
Syntaxe
var pts = poissondiscsampling(x1=0, y1=0, x2=width(), y2=height(), min=100, max=30) ; // [x1,y1, x2,y2, x3,y3...]
Arguments
| Name | Required | Default | Description |
|---|---|---|---|
x1 | yes | - | x of bbox min |
y1 | yes | - | y of bbox min |
x2 | yes | - | x of bbox max |
y2 | yes | - | y of bbox max |
min | yes | - | min distance between points |
max | yes | - | max attempts to add neighboring point |