1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 14:56:47 +02:00
This commit is contained in:
Justin Lin
2020-04-13 20:50:17 +08:00
parent e688f03ed0
commit 3775563e58

View File

@@ -1,7 +1,7 @@
use <experimental/lsystem2.scad>;
use <line2d.scad>;
for(line = penrose_snowflake()) {
for(line = weed()) {
line2d(
line[0],
line[1],
@@ -276,3 +276,14 @@ function penrose_snowflake(n = 3, angle = 18, leng = 1, heading = 0, start = [0,
]
)
lsystem2(rule, n, angle, leng, heading, start);
function weed(n = 6, angle = 22.5, leng = 1, heading = 0, start = [0, 0]) =
let(
rule = [
["S", "F"],
["F", "FF-[XY]+[XY]"],
["X", "+FY"],
["Y", "-FX"]
]
)
lsystem2(rule, n, angle, leng, heading, start);