Famous Fractals
The Dragon Curve & Space-Filling Curves (Hilbert, Peano, Cantor)
From a NASA physicist's paper-folding experiment to a curve that almost fills all of 2D space — meet the dragon curve and its kin: the curves that forced mathematicians to rethink what dimension even means.
In 1966, a NASA physicist named John Heighway was passing time by repeatedly folding a strip of paper in half — always in the same direction. When he unfolded the strip and bent each crease to a right angle, the result was a coiling, asymmetric shape that looked nothing like what he expected from such a simple rule. He called it the dragon curve, and the name stuck.
What Heighway had stumbled upon was a fractal — a curve that becomes arbitrarily complex through an endlessly repeated operation, never self-intersecting yet approaching the task of filling two-dimensional space. It belongs to a remarkable family of objects: space-filling curves, mathematical constructions that force us to reconsider the very meaning of dimension.
This guide covers the dragon curve in depth, then surveys three of its most important relatives — the Hilbert curve, the Peano curve, and the Cantor set — each a landmark in the history of fractal geometry and each still finding new applications in science and computing today.
What Is the Dragon Curve Fractal, and How Is It Constructed?
The Heighway dragon (also called the Harter–Heighway dragon, or informally the Jurassic Park fractal, after the spiral patterns that open Michael Crichton's 1990 novel) is a fractal plane curve generated by a beautifully simple recursive rule.
Paper-Folding Construction
Take a long strip of paper. Fold it in half to the right. Fold it in half to the right again. Keep folding — always in the same direction. After n folds you have a strip with 2n − 1 creases. Now unfold it so that every crease forms a 90° angle. The resulting planar curve is the nth iteration of the Heighway dragon.
After the first fold: a single right-angle turn. After seven folds: a recognizable dragon head shape. As n → ∞, the curve converges to the true Heighway dragon — an infinitely detailed fractal that tiles the plane with four rotated copies of itself.
The fold sequence encodes a binary pattern that mathematicians call the regular paperfolding sequence: 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, … where 1 represents a right turn and 0 a left turn. This sequence turns out to have deep connections to number theory.
Lindenmayer System Description
The dragon curve can also be expressed as an L-system (a formal rewriting grammar), making it straightforward to generate programmatically:
- Axiom: FX
- Rules: X → X+YF+, Y → −FX−Y
- Interpretation: F = draw forward, + = turn right 90°, − = turn left 90°
This recursive grammar produces exactly the same shape as the paper-folding procedure, and it generalizes naturally to other turn angles and higher dimensions.
Mathematical Properties at a Glance
| Property | Value / Description |
|---|---|
| Curve (interior) Hausdorff dimension | 2 — the curve itself is space-filling |
| Boundary Hausdorff dimension | ≈ 1.523627 — a genuine fractal boundary |
| Self-intersection | None — the curve never crosses itself |
| Tiling | Two Heighway dragons tile the plane (the twindragon) |
| Four copies tile the plane | Yes — with rotational symmetry |
| Similarity ratio at each step | 1/√2 (scaled and rotated 45°) |
The boundary dimension of ≈ 1.523627 was established through the foundational work of mathematicians Chandler Davis and Donald Knuth in their 1970 paper Number representations and dragon curves (Journal of Recreational Mathematics, vol. 3). Their analysis showed that the boundary consists of two self-similar pieces, each scaled by ratios of 1/√2 and 1/(2√2), yielding the characteristic non-integer dimension.
How Do You Fold a Dragon Curve Fractal Step by Step?
The paper-folding method is the most tactile way to meet the dragon curve, and it requires nothing more than a strip of paper and patience.
- Start with a long, thin strip — a strip cut from A4 paper works well.
- First fold: Hold both ends and fold the right end over to the left, so the strip doubles. Crease firmly. You now have one fold and two layers.
- Second fold: Without rotating the strip, fold the right end over to the left again. Two folds, four layers.
- Continue folding in the same direction. Seven or eight folds is typically the practical limit — the stack becomes too thick.
- Unfold carefully, bending each crease to a precise 90° angle rather than flattening it back. View the strip from above.
- Observe: Even at five or six iterations, the characteristic dragon silhouette is clearly visible — a coiling, asymmetric curve that almost but never quite closes back on itself.
The remarkable fact is that no two segments of the unfolded strip ever overlap, regardless of how many times you fold. This non-self-intersection property was rigorously proved by Davis and Knuth and is one of the curve's most surprising mathematical guarantees.
Mathematician Natalija Budinski explored the pedagogical power of this construction in her 2017 paper Folding the Dragon Curve Fractal (Bridges Math Art Conference), demonstrating how paper folding provides students an immediate, physical intuition for recursive self-similarity.
What Are Space-Filling Curves, and Why Do They Matter?
The dragon curve belongs to the broader family of space-filling curves: continuous paths that, in their infinite limit, pass through every point of a region in the plane. These objects profoundly shook 19th-century mathematics by demonstrating that a line — naively a one-dimensional thing — could, through continuous deformation alone, reach every point in two-dimensional space.
Before 1890, mathematicians largely assumed that dimension was topologically stable: a line could not be mapped continuously onto a square without tearing. Giuseppe Peano proved otherwise, and the resulting wave of mathematical analysis reshaped our understanding of continuity, dimension, and the nature of curves themselves. See our companion article on fractal dimension for the formal framework.
The Peano Curve (1890): The First Space-Filler
Giuseppe Peano (1858–1932), an Italian mathematician celebrated for his axioms of arithmetic, published the first space-filling curve in 1890 in the journal Mathematische Annalen. His paper, Sur une courbe, qui remplit toute une aire plane — that is, On a curve that fills an entire planar region — gave a purely analytical definition: no diagram, no geometric picture, just a pair of functions mapping the unit interval onto the unit square.
Peano's construction divided the unit interval into nine equal sub-intervals and mapped them onto nine sub-squares in a specific order, then repeated the subdivision recursively within each sub-square. The result: a continuous path through every point of the square. The mathematical community was stunned. As MacTutor records, it had been thought that such curves could not exist.
The Peano curve has fractal dimension 2 — it genuinely fills the plane — but its construction is less geometrically intuitive than the Hilbert curve that followed.
The Hilbert Curve (1891): Geometry Made Visible
One year after Peano, German mathematician David Hilbert (1862–1943) published a variant in the same journal: Über die stetige Abbildung einer Linie auf ein Flächenstück — on the continuous mapping of a line onto a surface piece. Hilbert's innovation was geometric clarity. Where Peano provided an analytic formula, Hilbert drew a picture — an iterative construction so visually transparent that it became the canonical example of a space-filling curve.
The Hilbert curve is built by dividing the unit square into four quadrants and connecting them in a U-shape, then replacing each quadrant with a smaller rotated copy of the same U-pattern, and repeating. As the Wikipedia article on the Hilbert curve notes, the first published diagram of any space-filling curve appeared in Hilbert's 1891 paper.
The Hilbert curve has a remarkable locality-preserving property: points that are close together along the 1D path tend to remain close together in 2D space. This makes the Hilbert curve enormously useful in computing — database spatial indexing (used by systems like Databricks liquid clustering), image compression, parallel mesh partitioning in computational fluid dynamics, and cache-oblivious algorithms all exploit this property. The Hilbert curve consistently outperforms the simpler Z-order (Morton) curve on locality metrics.
Like the Peano curve, the Hilbert curve itself has Hausdorff dimension 2 — its image is the entire unit square. Yet topologically it is a continuous image of the unit interval: a line that has been folded infinitely to fill a plane.
The Cantor Set (1883): Fractal Subtraction
The Cantor set arrives in this family from the opposite direction — not by adding complexity through folding, but by removing it through infinite deletion.
Georg Cantor (1845–1918) introduced his celebrated set in 1883, in his paper Grundlagen einer allgemeinen Mannigfaltigkeitslehre. The construction is elegant in its severity: begin with the closed interval [0, 1]. Remove the open middle third (1/3, 2/3). Remove the middle third of each remaining segment. Repeat infinitely.
What remains after infinitely many deletions is the Cantor ternary set: uncountably infinite in cardinality (as many points as the entire real line), yet of total measure zero — it occupies no length whatsoever. As the Wikipedia article on the Cantor set notes, it is the archetypal example of a set that is simultaneously large (uncountably infinite) and small (measure zero).
The Hausdorff dimension of the Cantor ternary set is:
DH = ln(2) / ln(3) ≈ 0.6309
This non-integer dimension — less than 1, more than 0 — captures precisely the dust-like nature of the set: too sparse to be a line, too numerous to be a finite collection of points. Mandelbrot called structures like this Cantor dust and used them as models for discontinuous natural phenomena — the distribution of galaxies, the clustering of errors in communication channels, the gaps in Saturn's rings.
For a deeper treatment of how these dimension concepts connect to the full range of known fractals, see our guide to types of fractals.
Why Did These Curves Shock Nineteenth-Century Mathematicians?
To appreciate the depth of the disturbance these objects caused, it helps to understand what mathematicians believed before 1883–1891.
The prevailing intuition, rooted in Euclidean geometry, was that dimension was an intrinsic, stable property: a line was one-dimensional, a surface two-dimensional, and no continuous deformation could change that. Cantor had already unsettled this belief in 1878 when he wrote to Richard Dedekind: I see it, but I do not believe it — referring to his proof that the line and the plane have the same cardinality (the same number of points). But cardinality-preserving maps need not be continuous.
Peano's 1890 construction demolished the remaining comfort: a continuous curve — the kind of thing you might physically draw without lifting your pen — could pass through every point in a 2D region. This meant that the naive definition of curve was fatally ambiguous. The Italian mathematician Camille Jordan had famously struggled to define a curve precisely enough to prove the Jordan curve theorem, and Peano's result showed just how necessary such precision was.
The mathematical response over the following decade was a burst of foundational work: rigorous topology, measure theory, and eventually, in the 20th century, the framework of Hausdorff dimension that gives each of these objects a precise fractional size between the integers.
Mandelbrot later wrote that the Cantor set and its relatives — the mathematical monsters of the 1880s–1910s — were not pathological curiosities but the natural geometry of roughness, discontinuity, and complexity. His Fractal Geometry of Nature (1982) unified these scattered objects under the single concept of the fractal, arguing that they describe the real world far better than smooth Euclidean shapes. Read our complete guide to what a fractal is for the full story.
Real-World Applications of Space-Filling Curves
Space-filling curves are not merely historical curiosities. Their locality-preserving properties and ability to map multi-dimensional data onto one dimension make them practical tools across a range of modern fields.
| Field | Curve Used | Application |
|---|---|---|
| Database indexing | Hilbert curve | Spatial indexing of geographic data; Databricks liquid clustering |
| Image processing | Hilbert curve | Fractal scan-path pixel ordering improves compression and cache coherence |
| Parallel computing | Hilbert / Peano | Domain decomposition and load balancing in computational fluid dynamics meshes |
| Combinatorial optimization | Hilbert / Z-order | Heuristic solutions to the traveling salesman problem |
| Telecommunications | Cantor set, Koch curve | Fractal antenna design — more bandwidth in smaller form factors |
| Signal analysis | Cantor set | Modeling intermittent noise and error clustering in transmission channels |
| Astrophysics | Cantor dust | Modeling the fractal distribution of matter in the large-scale universe |
The 2020 arXiv paper Space-filling Curves for High-performance Data Mining surveys how modern data mining exploits these 19th-century constructions to handle billion-record datasets efficiently — a striking example of pure mathematics finding applications more than a century after its creation.
How Does the Dragon Curve Relate to Jurassic Park?
The dragon curve's most famous pop-culture moment came in Michael Crichton's 1990 novel Jurassic Park. Each section of the book opens with a print of the Heighway dragon at successive iterations, illustrating the novel's central theme: complex, seemingly controlled systems — like a dinosaur theme park — harbor emergent, unpredictable behavior that no blueprint can fully anticipate.
Ian Malcolm, the novel's mathematician character, is a chaos theorist, and the dragon curve serves as his visual emblem — a reminder that simple iterative rules (fold the paper; repeat) produce outcomes of breathtaking complexity. The choice was scientifically precise: the Heighway dragon is generated by deterministic iteration, yet its full behavior at high iteration counts is practically impossible to predict without running the process. This is the essence of deterministic chaos.
Martin Gardner had already popularized the curve in his Scientific American Mathematical Games column in April 1967 (vol. 216, no. 4, pp. 116–123), introducing it to recreational mathematicians. Crichton almost certainly encountered it there.
Frequently asked
What is the dragon curve fractal?
The dragon curve (formally the Heighway or Harter–Heighway dragon) is a self-similar fractal plane curve generated by repeatedly folding a strip of paper in half and unfolding each crease to a 90° angle. It was first investigated in 1966 by NASA physicist John Heighway and popularized in a 1967 Scientific American column by Martin Gardner. The curve's interior has Hausdorff dimension 2, meaning it is a space-filling curve in its limit, while its boundary has dimension approximately 1.523627. Despite infinite complexity, the curve never self-intersects — a fact proved by Chandler Davis and Donald Knuth in 1970. Four rotated copies of the dragon tile the plane exactly, making it a fractal plane-filler as well as a fractal tile.
How do you fold a dragon curve fractal?
To fold a dragon curve, take a long strip of paper and fold it in half to the right. Fold it to the right again — same direction every time. Repeat as many times as the paper allows (seven or eight folds is usually the practical limit). Then unfold the strip, bending every crease to a precise 90° angle rather than flattening it. View from above: even at five or six iterations, the coiling dragon silhouette is clearly recognizable. The key insight is that folding right every time encodes a binary sequence (the regular paperfolding sequence) in the crease pattern; when unfolded at right angles, this sequence traces out the dragon curve. The curve never overlaps regardless of iteration depth — a remarkable non-self-intersection guarantee proved rigorously by Davis and Knuth (1970).
What is a space-filling curve in simple terms?
A space-filling curve is a continuous path that, through infinite iteration, passes through every point in a region of the plane. Imagine drawing a single unbroken line that, if you kept subdividing and re-routing it forever, would end up covering every speck of a square. Giuseppe Peano demonstrated this was mathematically possible in 1890, and David Hilbert made it geometrically intuitive in 1891. The key paradox is that the path is technically one-dimensional — it starts as a line — yet its image fills a two-dimensional area. Space-filling curves have Hausdorff dimension 2, bridging the gap between a line and a plane. They are used today in database spatial indexing, image compression, and parallel computing because they preserve locality: nearby points in 2D remain nearby along the 1D path.
What is the Cantor set and why is it a fractal?
The Cantor set is constructed by starting with the interval [0, 1] and repeatedly removing the open middle third of every remaining segment — infinitely many times. What remains is uncountably infinite (as many points as the full real line) yet has total measure zero: it occupies no length at all. This combination of infinitely many points and zero size is what makes it fractal. Its Hausdorff dimension is ln(2)/ln(3) approximately 0.6309 — a non-integer less than 1, capturing its dust-like sparseness. Georg Cantor introduced it in 1883. Mandelbrot later called such structures Cantor dust and used them to model natural discontinuities: gaps in Saturn's rings, clustering of transmission errors, and the distribution of galaxies at large scales.
Why did space-filling curves shock mathematicians in the 1890s?
Before 1890, mathematicians assumed dimension was topologically stable — that no continuous curve could map a one-dimensional line onto a two-dimensional surface. Giuseppe Peano's 1890 paper destroyed that assumption by constructing an explicit continuous map from the unit interval onto the unit square. The mathematical community was shaken because the proof used only standard continuity: no tearing, no self-crossing, just infinitely refined subdivision. The result meant the naive concept of a curve was insufficiently defined, and it triggered a decade of foundational work in topology and measure theory. David Hilbert's 1891 geometric version made the phenomenon visually undeniable. Together, these curves helped motivate the precise, modern definitions of continuity, dimension, and topological equivalence that underpin all of 20th-century analysis.
How is the Hilbert curve used in computer science today?
The Hilbert curve is used wherever multi-dimensional data must be mapped to a one-dimensional order while preserving spatial locality — the property that nearby points in 2D remain nearby along the 1D curve. Key applications include spatial database indexing (systems like Databricks use the Hilbert curve for liquid clustering, outperforming the simpler Z-order curve on locality), image processing (Hilbert scan-path pixel ordering improves compression and cache coherence), parallel mesh decomposition in computational fluid dynamics, and cache-oblivious algorithm design that minimizes cache misses in scientific computing. The curve's recursive, self-similar structure also means it can be computed efficiently in logarithmic steps via a finite automaton, making it practical at production scale.