Build the Heighway dragon from repeated paper folds or L-system rules. Change depth and colors, watch it grow, or export your curve as an image.
Fold a strip in half repeatedly, then unfold with every crease at 90°. The shape you get is the Dragon Curve. The same sequence appears in the L-system below.
Axiom F. Rules: F → F+G, G → F−G. + and − are right and left 90° turns. Each step doubles the length of the path plus one.
The curve is self-avoiding. It winds through the plane and in the limit fills it. Fractal dimension is 2. The turn sequence is palindromic around the center: R (sequence) R (reverse with R↔L).
For position k: write k in binary, drop trailing zeros. If the last bit is 1, turn right; if 0, turn left. That gives the same sequence as paper folding.