From 43d614ba7c3f4701b782607fc10ea40cfb34eccf Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Tue, 31 Aug 2021 11:28:42 +0800 Subject: [PATCH] add euler_spiral --- examples/turtle/lsystem2_collection.scad | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/turtle/lsystem2_collection.scad b/examples/turtle/lsystem2_collection.scad index fd2fc0c8..3b717b77 100644 --- a/examples/turtle/lsystem2_collection.scad +++ b/examples/turtle/lsystem2_collection.scad @@ -318,4 +318,14 @@ function weed(n = 6, angle = 22.5, leng = 1, heading = 0, start = [0, 0]) = ["Y", "-FX"] ] ) - lsystem2(axiom, rules, n, angle, leng, heading, start); \ No newline at end of file + lsystem2(axiom, rules, n, angle, leng, heading, start); + +function euler_spiral(n = 30, angle = 2.75, leng = 1, heading = 0, start = [0, 0]) = + let( + axiom = "AF+", + rules = [ + ["A", "AF+"], + ["F", "F+"] + ] + ) + lsystem2(axiom, rules, n, angle, leng, heading, start); \ No newline at end of file