Geometry
The Dragon Curve: Folding a Line Into a Fractal
The Dragon Curve is a fractal you can build with a strip of paper: fold it in half the same way over and over, unfold it so every crease opens to a right angle, and the zig-zag profile that appears is the Heighway dragon. What starts as a single fold becomes, in the limit, a self-similar curve that never crosses itself, tiles the plane, and has fractal dimension exactly 2 — a “line” that fills area. Discovered by NASA physicists in the 1960s, it later stalked the chapter headers of Jurassic Park.- Fractal dimension (curve)exactly 2
- Boundary dimension≈ 1.5236
- Contraction ratio1/√2 ≈ 0.7071 (two maps)
- Segments after n folds2ⁿ
- Turn at each crease90°
- First described1967 · Heighway, Harter, Banks (NASA)
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Folding paper into a fractal
Take a long strip of paper and fold it in half, always bringing the right end over onto the left. Do it again, and again — same direction each time. Now unfold the strip and coax every crease open to a right angle (90°), keeping the paper on edge. Viewed from above, the folded profile traces a jagged path. With one fold you get a single corner; with each additional fold the path becomes more intricate, and in the limit it converges to the Heighway dragon curve.
The reason folding works is a clean recursion. Let Dn be the curve after n folds. Folding a strip in half is the same as taking the already-folded strip and laying a fresh copy of it against itself, rotated. Concretely, Dn+1 is Dn followed by a copy of Dn rotated 90° and traversed in reverse. That doubling is the engine of the whole object: a curve of 2n straight segments becomes one of 2n+1 segments at the next stage. After n folds there are 2n − 1 creases and 2n unit segments, and every crease is a ±90° turn.
Because each new stage merely appends a rotated copy of the old one, the finite curves nest coherently: the first half of Dn+1 is Dn. This self-referential growth is exactly what makes the limit self-similar rather than merely complicated.
The turn sequence: the regular paperfolding sequence
Strip away the geometry and the dragon is just a sequence of instructions: at each crease, turn left (L) or right (R). Reading the creases of the unfolded strip from one end gives the regular paperfolding sequence, one of the most studied sequences in combinatorics. Writing R = 1 and L = 0, it begins 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 …
It obeys a strikingly simple recurrence. Index the turns 1, 2, 3, …. Then the term tn is: 1 if n ≡ 1 (mod 4), 0 if n ≡ 3 (mod 4), and tn/2 when n is even. In words: the odd-numbered creases strictly alternate R, L, R, L, … (these are the “new” folds), and the even-numbered creases reproduce the whole sequence at half scale (these are the “old” folds carried along by the next folding). This makes the paperfolding sequence 2-automatic — computable by a finite machine reading the binary digits of n — yet it is not eventually periodic.
The same object has a compact L-system (Lindenmayer system) description used to draw it: with a 90° turn angle, axiom FX and rewriting rules X → X+YF+ and Y → −FX−Y, where F draws a segment and +/− turn. Each rewriting step corresponds to one more paper fold.
The curve as an attractor of two maps
The cleanest definition of the dragon is dynamical. Place the plane in the complex numbers and define two affine maps:
- f1(z) = (1+i)⁄2 · z
- f2(z) = 1 − (1−i)⁄2 · z
Each multiplier has modulus √2⁄2 = 1/√2 ≈ 0.7071, so both maps are similarity contractions that shrink every distance by the same factor 1/√2. The first rotates by 45°; the second rotates by 135° and then shifts. The Heighway dragon is the attractor of this iterated function system (IFS) — the unique nonempty compact set D satisfying D = f1(D) ∪ f2(D).
Why must such a set exist and be unique? The operator H(S) = f1(S) ∪ f2(S) — Hutchinson’s operator — acts on the space of compact subsets of the plane equipped with the Hausdorff metric. Because both maps contract by 1/√2, H is itself a contraction on that (complete) space, and the Banach fixed-point theorem guarantees a single fixed set toward which every starting shape converges. Start with the segment from 0 to 1 and iterate H: you recover exactly the folded curves Dn, and the Hausdorff distance to the limit falls by a factor 1/√2 each step, so convergence is geometric. The paper folding, the L-system, and this IFS all describe the same fractal.
Why the dimension is exactly two
The dragon is a rep-tile: it is composed of two smaller copies of itself, each a similar copy scaled by the ratio s = 1/√2 (these are the two images f1(D) and f2(D) above). For a self-similar set built from N non-overlapping copies at ratio s, the similarity dimension d solves N · sd = 1. Here that reads:
2 · (1/√2)d = 1 ⇒ (2−1/2)d = 2−1 ⇒ d/2 = 1 ⇒ d = 2.
Because the two sub-copies meet only on a set of measure zero, this similarity dimension equals the Hausdorff dimension. So the dragon curve has fractal dimension exactly 2. That is not a rounding of “almost 2”: the curve genuinely has positive area. It is the continuous image of the interval [0, 1] — a bona-fide curve, a one-dimensional domain mapped into the plane — yet that image fills a two-dimensional region.
This makes the dragon a plane-filling curve in the technical sense. It differs from textbook space-filling curves such as Hilbert’s or Peano’s, which fill a solid square: the dragon instead fills a region with a wildly jagged, fractal boundary, and it does so without the self-touching that those scanning curves rely on.
It tiles the plane and never crosses itself
Two facts about the dragon look contradictory until you see them together: it has positive area, yet it never crosses itself. Every finite approximation Dn is a simple (non-self-intersecting) polyline, and the limit curve does not cross itself either. It may touch itself at boundary points, but it never passes through — the map from the parameter interval is injective except on a small set. So it is an area-filling curve that remains, in a precise sense, tangle-free.
The resolution is tiling. Because the dragon is a rep-2 tile, congruent copies fit together edge to edge with no gaps and no overlaps, and countably many such copies tile the entire plane. A single dragon occupies its share of the plane exactly, which is why its interior has positive area while the curve threads through that area without overlapping itself. Four dragons, rotated by multiples of 90°, interlock around a common point like a pinwheel.
Gluing two dragons back-to-back gives the twindragon (the Davis–Knuth dragon), a self-similar tile with an even richer meaning: it is the set of complex numbers whose digits are 0 and 1 in the base −1 + i number system. The twindragon is precisely the “unit region” of Gaussian-integer arithmetic in that base — a bridge between a paper-folding doodle and how you would do arithmetic in the complex plane.
A curve whose boundary is also a fractal
The dragon fills a region, so it has an outline — and that outline is itself a fractal, distinct from the curve. While the interior has dimension 2, the boundary of the dragon has fractal dimension approximately 1.5236. More precisely, its dimension is 2 log2 λ, where λ ≈ 1.69562 is the real root of the cubic λ3 = λ2 + 2. Numerically that gives 1.523627086…, a transcendental number — it is the logarithm of an algebraic number, which the Gelfond–Schneider theorem forces to be transcendental.
This two-level structure — a dimension-2 body wrapped in a dimension-1.52 skin — is characteristic of plane-filling fractals and is a useful check on intuition: “fractal dimension” is a property of a specific set, and the curve and its boundary are different sets with different dimensions. The roughness of the boundary is why, even though many dragons tile the plane perfectly, their shared edges form an infinitely crenellated coastline rather than straight seams.
Length behaves accordingly. With unit segments, the n-th stage has length 2n, while its diameter grows only like (√2)n. Length divided by (diameter)2 stays bounded — another signature of a dimension-2 object — whereas for the Koch curve, of dimension ≈ 1.26, length outpaces any power (diameter)d with d < log 4/log 3.
History, and the Jurassic Park dragon
The curve was found not by a topologist but by three NASA physicists — John Heighway, William Harter, and Bruce Banks — who noticed the pattern in folded paper strips in the mid-1960s. Martin Gardner popularized it in his Mathematical Games column in Scientific American in 1967, and in 1970 Chandler Davis and Donald Knuth gave it a rigorous treatment in “Number Representations and Dragon Curves,” connecting it to the base −1 + i arithmetic mentioned above. The name simply reflects its serpentine, clawed silhouette.
Its most famous cameo is literary: Michael Crichton’s 1990 novel Jurassic Park printed successive iterations of the dragon curve as chapter dividers, labeled “First Iteration,” “Second Iteration,” and so on — a visual metaphor for a system whose small, orderly rules unfold into runaway complexity, echoing the book’s chaos-theory theme.
Beyond the page, the dragon curve is a standard teaching example for L-systems and iterated function systems in computer graphics, a test case for automatic sequences in combinatorics on words, and a concrete model of how deterministic, finitely described rules can generate genuinely two-dimensional, self-similar structure. It remains one of the most economical demonstrations in mathematics that a single repeated fold is enough to fold a line into a fractal.
| Curve | Construction rule | Fractal dimension | Distinctive property |
|---|---|---|---|
| Heighway dragon | Two similarities scaled by 1/√2, rotated +45° and +135° | 2 (exact) | Tiles the plane; never crosses itself |
| Lévy C curve | Two similarities scaled by 1/√2, rotated ±45° | 2 (self-overlapping) | Same scaling, but self-intersects |
| Koch curve | Replace the middle third with a triangular bump (×4 pieces, ratio 1/3) | log 4 / log 3 ≈ 1.2619 | Infinite length, zero area, nowhere differentiable |
| Hilbert curve | Recursive space-filling U-pattern | 2 (exact) | Fills a solid square; touches itself |
Frequently asked questions
If it has dimension 2, is it still a curve?
Yes. A curve is the continuous image of an interval such as [0, 1], and the dragon is exactly that. What is unusual is that its image has positive area, so its fractal (Hausdorff) dimension is 2 rather than 1. Dimension measures the size of the set the curve traces, not the dimension of the parameter it is drawn from.
Does the dragon curve ever cross itself?
No. Every finite folding stage is a simple, non-self-intersecting polyline, and the limit curve does not cross itself either. It can touch itself at isolated boundary points, but it never passes through a point twice in a crossing way. This is possible precisely because congruent copies of the dragon tile the plane without overlapping.
Why does folding paper the same way produce it?
Folding a strip in half appends a rotated, reversed copy of the current shape to itself, which is the same doubling rule that defines the fractal. Unfolding each crease to 90 degrees turns that recursion into geometry. The resulting left/right turn pattern is the regular paperfolding sequence.
What makes the boundary's dimension different from the curve's?
The curve fills a region (dimension 2), but the outline of that region is a separate, thinner set. That outline has fractal dimension about 1.5236, equal to 2 log base 2 of the real root of the cubic x^3 = x^2 + 2. A set and its boundary are different objects and can have different dimensions.
How is it related to space-filling curves like Hilbert's?
Both reach dimension 2 and fill area, but they fill different things. Hilbert's and Peano's curves fill a solid square by systematic scanning and touch themselves densely. The dragon fills a region with a fractal boundary, tiles the plane, and never crosses itself, and it is built by folding rather than scanning.
Is the Jurassic Park connection real?
Yes. Michael Crichton's 1990 novel used successive iterations of the dragon curve as chapter-header illustrations, labeled as iterations, to dramatize how simple rules escalate into complexity. It is a genuine reference to the Heighway dragon, not a coincidence.