1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

add pentigree

This commit is contained in:
Justin Lin
2020-04-13 20:37:54 +08:00
parent 61bdb9c1f6
commit 6a0099a6a6

View File

@@ -1,7 +1,7 @@
use <experimental/lsystem2.scad>;
use <line2d.scad>;
for(line = koch_curve_3()) {
for(line = pentigree()) {
line2d(
line[0],
line[1],
@@ -253,8 +253,17 @@ function penrose_tiling(n = 2, angle = 36, leng = 1, heading = 0, start = [0, 0]
function bush(n = 3, angle = 16, leng = 1, heading = 0, start = [0, 0]) =
let(
rule = [
["S", "++++F"],
["F", "FF-[-F+F+F]+[+F-F-F]"]
["S", "++++F"],
["F", "FF-[-F+F+F]+[+F-F-F]"]
]
)
lsystem2(rule, n, angle, leng, heading, start);
lsystem2(rule, n, angle, leng, heading, start);
function pentigree(n = 3, angle = 72, 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);