mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 05:21:38 +02:00
add pentigree
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 = koch_curve_3()) {
|
for(line = pentigree()) {
|
||||||
line2d(
|
line2d(
|
||||||
line[0],
|
line[0],
|
||||||
line[1],
|
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]) =
|
function bush(n = 3, angle = 16, leng = 1, heading = 0, start = [0, 0]) =
|
||||||
let(
|
let(
|
||||||
rule = [
|
rule = [
|
||||||
["S", "++++F"],
|
["S", "++++F"],
|
||||||
["F", "FF-[-F+F+F]+[+F-F-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);
|
Reference in New Issue
Block a user