mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-24 07:13:34 +02:00
updated demos
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
use <hull_polyline2d.scad>;
|
use <hull_polyline2d.scad>;
|
||||||
use <triangulate.scad>;
|
use <experimental/tri_ear_clipping.scad>;
|
||||||
use <shape_starburst.scad>;
|
use <shape_starburst.scad>;
|
||||||
use <experimental/tri_bisectors.scad>;
|
use <experimental/tri_bisectors.scad>;
|
||||||
|
|
||||||
shape = shape_starburst(30, 12, 10);
|
shape = shape_starburst(30, 12, 10);
|
||||||
hull_polyline2d(concat(shape, [shape[0]]), width = 1);
|
hull_polyline2d(concat(shape, [shape[0]]), width = 1);
|
||||||
|
|
||||||
tris = triangulate(shape);
|
tris = tri_ear_clipping(shape);
|
||||||
for(tri = tris) {
|
for(tri = tris) {
|
||||||
for(line = tri_bisectors([for(idx = tri) shape[idx]])) {
|
for(line = tri_bisectors([for(idx = tri) shape[idx]])) {
|
||||||
hull_polyline2d(line, width = 1);
|
hull_polyline2d(line, width = 1);
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
use <hull_polyline2d.scad>;
|
use <hull_polyline2d.scad>;
|
||||||
use <experimental/voronoi_lines.scad>;
|
use <experimental/voronoi_lines.scad>;
|
||||||
use <experimental/convex_hull.scad>;
|
use <experimental/convex_hull2.scad>;
|
||||||
|
|
||||||
pt_nums = 50;
|
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_pts = convex_hull2(points);
|
||||||
hull_polyline2d(
|
hull_polyline2d(
|
||||||
concat(hull_pts, [hull_pts[0]]),
|
concat(hull_pts, [hull_pts[0]]),
|
||||||
width = width, $fn = 4
|
width = width, $fn = 4
|
||||||
|
Reference in New Issue
Block a user