Elm L-system, live in the browser
A recursive dragon-curve generator I originally wrote in Elm with GraphicSVG. It grows the curve with an L-system: each forward stroke is rewritten into a longer sequence of turns and steps as the degree goes up.
Click a degree below (0–15) to rebuild the curve. Higher degrees fold more tightly — same turtle rules, more recursion.
The rewrite rules and turtle stepper are a direct port of the
Elm sketch
— inked from an initial seed of [Fwd3, Fwd1].
Fwd1 Fwd1 Left Fwd2 Fwd3 LeftFwd2 Right Fwd3 Fwd1 Right Fwd2Fwd3 Fwd3