mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-19 04:51:26 +02:00
change M to f
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use <experimental/lsystem2.scad>;
|
||||
use <line2d.scad>;
|
||||
|
||||
for(line = plant()) {
|
||||
for(line = island_curve()) {
|
||||
line2d(
|
||||
line[0],
|
||||
line[1],
|
||||
@@ -176,8 +176,8 @@ function island_curve(n = 2, angle = 90, leng = 1, heading = 0, start = [0, 0])
|
||||
let(
|
||||
axiom = "F-F-F-F",
|
||||
rules = [
|
||||
["F", "F-M+FF-F-FF-FM-FF+M-FF+F+FF+FM+FFF"],
|
||||
["M", "MMMMMM"]
|
||||
["F", "F-f+FF-F-FF-Ff-FF+f-FF+F+FF+Ff+FFF"],
|
||||
["f", "ffffff"]
|
||||
]
|
||||
)
|
||||
lsystem2(axiom, rules, n, angle, leng, heading, start);
|
||||
|
@@ -50,8 +50,7 @@ function _next_t1(t1, t2, code, stack) =
|
||||
|
||||
function _next_t2(t, code, angle, leng) =
|
||||
is_undef(code) || code == "[" || code == "]" ? t :
|
||||
code == "F" ? turtle2d("forward", t, leng) :
|
||||
code == "M" ? turtle2d("forward", t, leng) :
|
||||
code == "F" || code == "f" ? turtle2d("forward", t, leng) :
|
||||
code == "+" ? turtle2d("turn", t, angle) :
|
||||
code == "-" ? turtle2d("turn", t, -angle) : t;
|
||||
|
||||
|
Reference in New Issue
Block a user