1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-17 20:11:50 +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 <experimental/lsystem2.scad>;
use <line2d.scad>; use <line2d.scad>;
for(line = pentigree()) { for(line = penrose_snowflake()) {
line2d( line2d(
line[0], line[0],
line[1], line[1],
@@ -267,3 +267,12 @@ function pentigree(n = 3, angle = 72, leng = 1, heading = 0, start = [0, 0]) =
] ]
) )
lsystem2(rule, n, angle, leng, heading, start); 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);