1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-26 07:55:16 +02:00

add convext_hull

This commit is contained in:
Justin Lin
2020-02-25 08:06:15 +08:00
parent 78613f76cd
commit 2a8ed85596

View File

@@ -0,0 +1,14 @@
use <experimental/tri_bisectors.scad>;
use <experimental/convex_hull.scad>;
use <shape_starburst.scad>;
xs = rands(-20, 20, 150);
ys = rands(-20, 20, 150);
points = [for(i = [0:len(xs) - 1]) [xs[i], ys[i]]];
for(p = points) {
translate(p)
sphere(.5);
}
hull_shape = convex_hull(points);
#hull_polyline2d(concat(hull_shape, [hull_shape[0]]), width = 1);