From 12e6ad672d1e6a20697000e5886c110f42d2ef18 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 28 May 2022 15:59:17 +0800 Subject: [PATCH] add differential_line_growth_bowl --- examples/differential_line_growth_bowl.scad | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/differential_line_growth_bowl.scad diff --git a/examples/differential_line_growth_bowl.scad b/examples/differential_line_growth_bowl.scad new file mode 100644 index 00000000..d2a7944a --- /dev/null +++ b/examples/differential_line_growth_bowl.scad @@ -0,0 +1,28 @@ +use ; +use ; +use ; +use ; +use ; +use ; + +$fn = 24; +r = 10; +times = 50; +line_r = 2; +smooth = true; +smooth_times = 2; +node_option = [ + 0.4, // maxForce + 0.5, // maxSpeed + 5, // separationDistance + 1.2, // separationCohesionRatio + 4 // maxEdgeLength +]; + +init_shape = shape_circle(r); +poly = differential_line_growth(init_shape, node_option, times); +smoothed = smooth ? midpt_smooth(poly, smooth_times, true) : poly; + +sphere_r = max(max(smoothed)); +polyline_join([for(p = [each smoothed, smoothed[0]]) ptf_c2sphere(p, sphere_r)]) + icosahedron(line_r);