From e688f03ed0845f6b860a9b70a50283938fde45b2 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 13 Apr 2020 20:43:12 +0800 Subject: [PATCH] add penrose_snowflake --- examples/lsystem_collection.scad | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/lsystem_collection.scad b/examples/lsystem_collection.scad index 7577ff13..70db01b7 100644 --- a/examples/lsystem_collection.scad +++ b/examples/lsystem_collection.scad @@ -1,7 +1,7 @@ use ; use ; -for(line = pentigree()) { +for(line = penrose_snowflake()) { line2d( line[0], line[1], @@ -266,4 +266,13 @@ function pentigree(n = 3, angle = 72, leng = 1, heading = 0, start = [0, 0]) = ["F", "F-F++F+F-F-F"] ] ) + lsystem2(rule, n, angle, leng, heading, start); + +function penrose_snowflake(n = 3, angle = 18, 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