mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
add docs
This commit is contained in:
parent
2fab2309fe
commit
10b99289c6
@ -404,6 +404,9 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
||||
--|--
|
||||
[**pp/pp_disk**(radius, value_count[, seed])](https://openhome.cc/eGossip/OpenSCAD/lib3x-pp_disk.html) | generate random points over a disk.
|
||||
[**pp/pp_sphere**(radius, value_count[, seed])](https://openhome.cc/eGossip/OpenSCAD/lib3x-pp_sphere.html) | pick random points on the surface of a sphere.
|
||||
[**pp/pp_poisson2**(size, r[, start, k, seed])](https://openhome.cc/eGossip/OpenSCAD/lib3x-pp_poisson2.html) | perform poisson sampling over a rectangle area.
|
||||
|
||||
[**pp/pp_poisson3**(size, r[, start, k, seed])](https://openhome.cc/eGossip/OpenSCAD/lib3x-pp_poisson3.html) | perform poisson sampling over a cube space.
|
||||
|
||||
## Maze
|
||||
|
||||
|
BIN
docs/images/lib3x-pp_poisson2-1.JPG
Normal file
BIN
docs/images/lib3x-pp_poisson2-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
docs/images/lib3x-pp_poisson3-1.JPG
Normal file
BIN
docs/images/lib3x-pp_poisson3-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
26
docs/lib3x-pp_poisson2.md
Normal file
26
docs/lib3x-pp_poisson2.md
Normal file
@ -0,0 +1,26 @@
|
||||
# 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.
|
||||
- `start` : Optional. The first start point.
|
||||
- `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>
|
||||
use <polyline_join.scad>
|
||||
|
||||
points = pp_poisson2([100, 100], 5);
|
||||
for(p = points) {
|
||||
translate(p)
|
||||
circle(1);
|
||||
}
|
||||
|
||||
![pp_poisson2](images/lib3x-pp_poisson2-1.JPG)
|
26
docs/lib3x-pp_poisson3.md
Normal file
26
docs/lib3x-pp_poisson3.md
Normal file
@ -0,0 +1,26 @@
|
||||
# pp_poisson3
|
||||
|
||||
Perform poisson sampling over a cube space. An 3D 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.
|
||||
- `start` : Optional. The first start point.
|
||||
- `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_poisson3.scad>
|
||||
use <polyline_join.scad>
|
||||
|
||||
points = pp_poisson3([50, 50, 50], 10);
|
||||
for(p = points) {
|
||||
translate(p)
|
||||
sphere(5, $fn = 48);
|
||||
}
|
||||
|
||||
![pp_poisson3](images/lib3x-pp_poisson3-1.JPG)
|
Loading…
x
Reference in New Issue
Block a user