From 1521152c503894aec46376c67f7a1ca5aa02bdf2 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Tue, 25 Feb 2020 15:57:35 +0800 Subject: [PATCH] add tri_delaunay demo --- src/experimental/demo/tri_delaunay_demo.scad | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/experimental/demo/tri_delaunay_demo.scad diff --git a/src/experimental/demo/tri_delaunay_demo.scad b/src/experimental/demo/tri_delaunay_demo.scad new file mode 100644 index 00000000..e3084be8 --- /dev/null +++ b/src/experimental/demo/tri_delaunay_demo.scad @@ -0,0 +1,16 @@ +use ; +use ; + +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); +} \ No newline at end of file