mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-30 09:49:59 +02:00
add tri_delaunay demo
This commit is contained in:
16
src/experimental/demo/tri_delaunay_demo.scad
Normal file
16
src/experimental/demo/tri_delaunay_demo.scad
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
use <hull_polyline2d.scad>;
|
||||||
|
use <experimental/tri_delaunay.scad>;
|
||||||
|
|
||||||
|
points=[for(i = [0:50]) rands(-20, 20, 2)];
|
||||||
|
|
||||||
|
for(tri = tri_delaunay(points)) {
|
||||||
|
hull_polyline2d(
|
||||||
|
[points[tri[0]], points[tri[1]], points[tri[2]], points[tri[0]]], width = .2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
color("red")
|
||||||
|
for(point = points) {
|
||||||
|
translate(point)
|
||||||
|
circle(.5);
|
||||||
|
}
|
Reference in New Issue
Block a user