From 6a0099a6a6dd95faf871c5974fe2696f9dce5a89 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 13 Apr 2020 20:37:54 +0800 Subject: [PATCH] add pentigree --- examples/lsystem_collection.scad | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/lsystem_collection.scad b/examples/lsystem_collection.scad index 9c4eef3e..7577ff13 100644 --- a/examples/lsystem_collection.scad +++ b/examples/lsystem_collection.scad @@ -1,7 +1,7 @@ use ; use ; -for(line = koch_curve_3()) { +for(line = pentigree()) { line2d( line[0], line[1], @@ -253,8 +253,17 @@ function penrose_tiling(n = 2, angle = 36, leng = 1, heading = 0, start = [0, 0] function bush(n = 3, angle = 16, leng = 1, heading = 0, start = [0, 0]) = let( rule = [ - ["S", "++++F"], - ["F", "FF-[-F+F+F]+[+F-F-F]"] + ["S", "++++F"], + ["F", "FF-[-F+F+F]+[+F-F-F]"] ] ) - lsystem2(rule, n, angle, leng, heading, start); \ No newline at end of file + lsystem2(rule, n, angle, leng, heading, start); + +function pentigree(n = 3, angle = 72, leng = 1, heading = 0, start = [0, 0]) = + let( + rule = [ + ["S", "F-F-F-F-F"], + ["F", "F-F++F+F-F-F"] + ] + ) + lsystem2(rule, n, angle, leng, heading, start); \ No newline at end of file