1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib3x-pp_poisson2.md

25 lines
841 B
Markdown
Raw Normal View History

2022-07-02 17:32:01 +08:00
# pp_poisson2
Perform poisson sampling over a rectangle area. An implementation of [Fast Poisson Disk Sampling in Arbitrary Dimensions](https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf).
**Since:** 3.3
## Parameters
- `size` : The size `[x, y]` of the rectangle.
- `r` : The minimum distance between samples.
2022-07-10 11:52:01 +08:00
- `start` : Optional. The initial point(s).
2022-07-02 17:32:01 +08:00
- `k` : Default to 30. The `k` constant of [Fast Poisson Disk Sampling in Arbitrary Dimensions](https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf).
- `seed` : Optional. Seed value for random number generator for repeatable results.
## Examples
use <pp/pp_poisson2.scad>
points = pp_poisson2([100, 100], 5);
for(p = points) {
translate(p)
circle(1);
}
![pp_poisson2](images/lib3x-pp_poisson2-1.JPG)