fractal-garden
fractal-garden copied to clipboard
Add Dragon Curve
Description
Implement the L-System version of the Dragon Curve. Ideally there would be L-Systems for the Dragon, Twindragon and Terdragon! Wikipedia has instructions for each :)
Inspiration
Type
L-System
Difficulties
Centering the L-System is a little bit difficult, since with each iteration it rotates some more. L-System configuration is easy though:
const dragonCurve = {
maxIterations: 18,
axiom: "F",
replace: {
F: "F+G",
G: "F-G",
},
angle: 90,
};