mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 12:30:33 +02:00
add docs
This commit is contained in:
42
docs/lib3x-tri_delaunay_indices.md
Normal file
42
docs/lib3x-tri_delaunay_indices.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# tri_delaunay_indices
|
||||
|
||||
A method of [`tri_delaunay`](lib3x-tri_delaunay.html). Returns the indices from a delaunay object.
|
||||
|
||||
**Since:** 3.0
|
||||
|
||||
## Parameters
|
||||
|
||||
- `d` : A delaunay object.
|
||||
|
||||
## Examples
|
||||
|
||||
use <triangle/tri_delaunay.scad>;
|
||||
use <triangle/tri_delaunay_indices.scad>;
|
||||
use <triangle/tri_delaunay_shapes.scad>;
|
||||
use <triangle/tri_delaunay_voronoi.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
|
||||
points = [for(i = [0:20]) rands(-100, 100, 2)];
|
||||
|
||||
delaunay = tri_delaunay(points, ret = "DELAUNAY");
|
||||
|
||||
tris = [for(ti = tri_delaunay_indices(delaunay)) [for(i = ti) points[i]]];
|
||||
linear_extrude(1)
|
||||
for(t = tris) {
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("black")
|
||||
linear_extrude(2)
|
||||
for(t = tri_delaunay_shapes(delaunay)) {
|
||||
offset(-1)
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("red")
|
||||
linear_extrude(3)
|
||||
for(t = tri_delaunay_voronoi(delaunay)) {
|
||||
hull_polyline2d(concat(t, [t[0]]), 2);
|
||||
}
|
||||
|
||||

|
42
docs/lib3x-tri_delaunay_shapes.md
Normal file
42
docs/lib3x-tri_delaunay_shapes.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# tri_delaunay_shapes
|
||||
|
||||
A method of [`tri_delaunay`](lib3x-tri_delaunay.html). Returns triangle shapes from a delaunay object.
|
||||
|
||||
**Since:** 3.0
|
||||
|
||||
## Parameters
|
||||
|
||||
- `d` : A delaunay object.
|
||||
|
||||
## Examples
|
||||
|
||||
use <triangle/tri_delaunay.scad>;
|
||||
use <triangle/tri_delaunay_indices.scad>;
|
||||
use <triangle/tri_delaunay_shapes.scad>;
|
||||
use <triangle/tri_delaunay_voronoi.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
|
||||
points = [for(i = [0:20]) rands(-100, 100, 2)];
|
||||
|
||||
delaunay = tri_delaunay(points, ret = "DELAUNAY");
|
||||
|
||||
tris = [for(ti = tri_delaunay_indices(delaunay)) [for(i = ti) points[i]]];
|
||||
linear_extrude(1)
|
||||
for(t = tris) {
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("black")
|
||||
linear_extrude(2)
|
||||
for(t = tri_delaunay_shapes(delaunay)) {
|
||||
offset(-1)
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("red")
|
||||
linear_extrude(3)
|
||||
for(t = tri_delaunay_voronoi(delaunay)) {
|
||||
hull_polyline2d(concat(t, [t[0]]), 2);
|
||||
}
|
||||
|
||||

|
42
docs/lib3x-tri_delaunay_voronoi.md
Normal file
42
docs/lib3x-tri_delaunay_voronoi.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# tri_delaunay_voronoi
|
||||
|
||||
A method of [`tri_delaunay`](lib3x-tri_delaunay.html). Returns voronoi cells from a delaunay object.
|
||||
|
||||
**Since:** 3.0
|
||||
|
||||
## Parameters
|
||||
|
||||
- `d` : A delaunay object.
|
||||
|
||||
## Examples
|
||||
|
||||
use <triangle/tri_delaunay.scad>;
|
||||
use <triangle/tri_delaunay_indices.scad>;
|
||||
use <triangle/tri_delaunay_shapes.scad>;
|
||||
use <triangle/tri_delaunay_voronoi.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
|
||||
points = [for(i = [0:20]) rands(-100, 100, 2)];
|
||||
|
||||
delaunay = tri_delaunay(points, ret = "DELAUNAY");
|
||||
|
||||
tris = [for(ti = tri_delaunay_indices(delaunay)) [for(i = ti) points[i]]];
|
||||
linear_extrude(1)
|
||||
for(t = tris) {
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("black")
|
||||
linear_extrude(2)
|
||||
for(t = tri_delaunay_shapes(delaunay)) {
|
||||
offset(-1)
|
||||
polygon(t);
|
||||
}
|
||||
|
||||
color("red")
|
||||
linear_extrude(3)
|
||||
for(t = tri_delaunay_voronoi(delaunay)) {
|
||||
hull_polyline2d(concat(t, [t[0]]), 2);
|
||||
}
|
||||
|
||||

|
Reference in New Issue
Block a user