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