1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 09:44:16 +02:00

add koch_star

This commit is contained in:
Justin Lin
2020-04-13 18:05:14 +08:00
parent 29bfd2cc87
commit cfe9591099

View File

@@ -56,6 +56,15 @@ function koch_quadratic_type2(n = 4, angle = 90, leng = 1, heading = 0, start =
) )
lsystem2(rule, n, angle, leng, heading, start); lsystem2(rule, n, angle, leng, heading, start);
function koch_star(n = 4, angle = 60, leng = 1, heading = 0, start = [0, 0]) =
let(
rule = [
["S", "F++F++F"],
["F", "F+F--F+F"]
]
)
lsystem2(rule, n, angle, leng, heading, start, "6789");
function dragon_curve(n = 10, angle = 90, leng = 1, heading = 0, start = [0, 0]) = function dragon_curve(n = 10, angle = 90, leng = 1, heading = 0, start = [0, 0]) =
let( let(
rule = [ rule = [