Iterated Function System Discovered 1967 Dimension 2 (boundary)

The Heighway Dragon Curve

Fold a strip of paper in half, again and again, then unfold every crease to a right angle — that's the whole construction.

History

Discovered by paper-folding — NASA physicists John Heighway, Bruce Banks, and William Harter noticed the shape while folding strips of paper in half repeatedly. It reached a wide audience through Martin Gardner’s 1967 Scientific American column, and later appeared on the section-break pages of Michael Crichton’s Jurassic Park.

Anecdote

Fold a long strip of paper in half repeatedly, always the same direction, then unfold every crease to a right angle. The silhouette is a finite approximation of the dragon curve — one of the rare fractals here you can generate with nothing but paper and your hands.

Five panels: a strip folded three times, then unfolded to right angles

The five steps at a glance: fold three times, then unfold every crease to a right angle.

Animation: a folded strip of paper unfolding, crease by crease, into the dragon curve

The same unfolding step, slowed down: watch each of the 7 creases open to a right angle, one at a time — the flat folded strip unfurls straight into an 8-segment dragon curve.

Construction

Encode a right fold as +1+1. The turn sequence after nn folds is built from the previous one:

T0=(),Tn+1=Tn(+1)reverse(Tn)T_0 = (), \qquad T_{n+1} = T_n \frown (+1) \frown \mathrm{reverse}(-T_n)

where \frown joins two sequences end to end, and Tn-T_n flips every sign in TnT_n. It reads more easily worked out by hand than stated abstractly. Start from the empty sequence and build up:

  • T0=()T_0 = () — no folds yet, nothing to turn.
  • T1=T0(+1)reverse(T0)=(+1)T_1 = T_0 \frown (+1) \frown \mathrm{reverse}(-T_0) = (+1) — one fold, one turn.
  • T2=T1(+1)reverse(T1)=(+1,+1,1)T_2 = T_1 \frown (+1) \frown \mathrm{reverse}(-T_1) = (+1, +1, -1) — take T1T_1, tack on a +1+1, then tack on T1T_1‘s signs flipped and reversed (here T1T_1 is a single element, so reversing does nothing and only the flip shows).
  • T3=T2(+1)reverse(T2)=(+1,+1,1,+1,+1,1,1)T_3 = T_2 \frown (+1) \frown \mathrm{reverse}(-T_2) = (+1, +1, -1, +1, +1, -1, -1) — seven turns for three folds, matching 2312^3-1.

Walk unit steps, turning by each entry before stepping, and this sequence traces exactly the silhouette a strip of paper makes after being folded nn times and unfolded to right angles (Cool Fact box, this chapter). The boundary has Hausdorff dimension exactly D=2D=2, and four copies tile the plane.

Cool Fact

The dragon curve can tile the entire plane with copies of itself: four suitably rotated dragon curves fit together edge-to-edge with no gaps or overlaps.

Python implementation

Pseudocode first

Algorithm in one glance Folding
Mirror, reverse, turn
folds(n) {
    turns = {LEFT}
    repeat n times
        turns = turns + {LEFT} + reverse(flip(turns))
    return turns
}

The executable version keeps the same shape; shared plotting/export details live in fractalfair_helpers.py.

def folds(n):
    turns = [1]
    for _ in range(n):
        turns = turns + [1] + [-t for t in reversed(turns)]
    return turns
λThe Same Idea in Haskell
dragonPoints :: Int -> [P2 Double]
dragonPoints n =
  scanl (\pt h -> pt .+^ rotateBy (h/4) unitX) (p2 (0,0)) headings
  where
    turns    = map fromIntegral (foldSeq n)
    headings = 0 : scanl1 (+) turns
Heighway dragon curve

Figure: 14 simulated folds (16,383 segments), coloured from deep violet to pale gold. Every inward spiral is a smaller, later fold nested inside a larger, earlier one.