mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
add doc
This commit is contained in:
@@ -241,7 +241,7 @@ See [examples](examples#dogfooding-examples).
|
|||||||
- [voronoi/vrn2_cells_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn2_cells_from.html)
|
- [voronoi/vrn2_cells_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn2_cells_from.html)
|
||||||
- [voronoi/vrn2_cells_space](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn2_cells_space.html)
|
- [voronoi/vrn2_cells_space](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn2_cells_space.html)
|
||||||
- [voronoi/vrn3_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn3_from.html)
|
- [voronoi/vrn3_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn3_from.html)
|
||||||
- voronoi/vrn3_space
|
- [voronoi/vrn3_space](https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn3_space.html)
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
BIN
docs/images/lib2x-vrn3_space-1.JPG
Normal file
BIN
docs/images/lib2x-vrn3_space-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
23
docs/lib2x-vrn3_space.md
Normal file
23
docs/lib2x-vrn3_space.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# vrn3_space
|
||||||
|
|
||||||
|
Creats a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) in the first octant. You specify a space and a grid width. The center of each cell will be distributed in each grid randomly.
|
||||||
|
|
||||||
|
**Since:** 2.4
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
- `size` : 3 value array [x, y, z].
|
||||||
|
- `grid_w` : The width of each grid.
|
||||||
|
- `seed` : Seed value for random number generator for repeatable results.
|
||||||
|
- `spacing` : Distance between cells. Default to 1.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
use <voronoi/vrn3_space.scad>;
|
||||||
|
|
||||||
|
vrn3_space(
|
||||||
|
size = [20, 15, 10],
|
||||||
|
grid_w = 5
|
||||||
|
);
|
||||||
|
|
||||||
|

|
@@ -1,3 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* vrn3_space.scad
|
||||||
|
*
|
||||||
|
* @copyright Justin Lin, 2020
|
||||||
|
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||||
|
*
|
||||||
|
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vrn3_space.html
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
use <__comm__/__angy_angz.scad>;
|
use <__comm__/__angy_angz.scad>;
|
||||||
|
|
||||||
// slow but workable
|
// slow but workable
|
||||||
|
Reference in New Issue
Block a user