1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 19:54:29 +02:00

add penrose_snowflake

This commit is contained in:
Justin Lin
2020-04-13 20:43:12 +08:00
parent 6a0099a6a6
commit e688f03ed0

View File

@@ -1,7 +1,7 @@
use <experimental/lsystem2.scad>;
use <line2d.scad>;
for(line = pentigree()) {
for(line = penrose_snowflake()) {
line2d(
line[0],
line[1],
@@ -266,4 +266,13 @@ function pentigree(n = 3, angle = 72, leng = 1, heading = 0, start = [0, 0]) =
["F", "F-F++F+F-F-F"]
]
)
lsystem2(rule, n, angle, leng, heading, start);
function penrose_snowflake(n = 3, angle = 18, 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);