1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 09:44:16 +02:00

update demo

This commit is contained in:
Justin Lin
2020-03-02 16:15:40 +08:00
parent 6cdd6a0049
commit 383b249868

View File

@@ -6,6 +6,12 @@ pt_nums = 50;
width = 1; width = 1;
points = [for(i = [0:pt_nums - 1]) rands(-50, 50, 2)]; points = [for(i = [0:pt_nums - 1]) rands(-50, 50, 2)];
hull_pts = convex_hull(points);
hull_polyline2d(
concat(hull_pts, [hull_pts[0]]),
width = width, $fn = 4
);
intersection() { intersection() {
for(line = voronoi_lines(points)) { for(line = voronoi_lines(points)) {
hull_polyline2d( hull_polyline2d(
@@ -14,15 +20,11 @@ intersection() {
$fn = 4 $fn = 4
); );
} }
hull()
#for(p = points) { polygon(hull_pts);
translate(p)
circle(.5);
}
} }
hull_pts = convex_hull(points); #for(p = points) {
hull_polyline2d( translate(p)
concat(hull_pts, [hull_pts[0]]), circle(.5);
width = width, $fn = 4 }
);