1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 03:34:42 +02:00

update demo

This commit is contained in:
Justin Lin
2020-03-02 16:10:37 +08:00
parent 0a629cefb4
commit c57ae76941

View File

@@ -1,14 +1,28 @@
use <hull_polyline2d.scad>;
use <experimental/voronoi_lines.scad>;
use <experimental/convex_hull.scad>;
pt_nums = 50;
width = 1;
points = [for(i = [0:pt_nums - 1]) rands(-50, 50, 2)];
for(line = voronoi_lines(points)) {
hull_polyline2d(
line,
width = width,
$fn = 4
);
}
intersection() {
for(line = voronoi_lines(points)) {
hull_polyline2d(
line,
width = width,
$fn = 4
);
}
hull()
#for(p = points) {
translate(p)
circle(.5);
}
}
hull_pts = convex_hull(points);
hull_polyline2d(
concat(hull_pts, [hull_pts[0]]),
width = width, $fn = 4
);