The dragon curve explained

The dragon curve is the fractal you can make with your hands. Fold a strip of paper in half a few times, open every crease to a right angle, and the strip takes the shape of a small dragon. Keep folding, in thought at least, and the dragon becomes a curve that touches itself endlessly without ever crossing, fills an area, and fits together with copies of itself to cover the whole plane.

The Heighway dragon after ten folds, coloured from its start to its end
The Heighway dragon after ten folds, coloured from its start to its end

Folding paper

Take a long strip of paper and fold it in half, right end over left. Fold it in half again the same way, and again. Now unfold it and open every crease to a right angle. After one fold the strip is a corner; after two it is a hook; after four or five it starts to look like a sea dragon with a curled tail. Every fold doubles the number of straight pieces: n folds give 2ⁿ segments and 2ⁿ − 1 creases. Paper allows only seven or eight folds, but the rule can be repeated for ever.

Unfolding: a copy that swings out

Undo the last fold of a folded strip and the second half of the paper swings away from the first half around the crease they share. That is the whole construction: the dragon of level n is the dragon of level n − 1, followed by a copy of itself that runs backwards and is turned a quarter about the end point. The generator shows this as it grows: the copy starts on top of the curve and swings out by 90°, while the picture turns and shrinks so that the two ends of the curve stay where they are.

The fold sequence

Seen from one side, every crease of the unfolded strip is a valley (∨) or a mountain (∧). One fold gives ∧. Two give ∧∧∨, three give ∧∧∨∧∧∨∨. Each row is the row before, a new ∧ in the middle, and the row before once more but reversed with every crease flipped, because the second half of the paper lay upside down. This is the regular paper-folding sequence. There is a shortcut for crease number k: divide k by 2 until it is odd; if that odd number leaves a remainder of 1 when divided by 4 the crease is one kind, and if it leaves 3 it is the other. The sequence never repeats itself.

It touches but never crosses

From level 4 on, the dragon comes back to corners it has already visited. It looks as if the curve crosses itself there, but it does not: at each such point the curve turns away, like two roads that meet at a corner without an intersection. Rounding the corners makes this visible, and the picture becomes a single thread that winds through a square grid, visiting every corner of the grid at most twice and drawing no segment twice.

A curve that fills an area

Each level doubles the number of segments and makes them 1/√2 as long, so the length of the curve is multiplied by √2 every time and grows without limit. The dragon is made of 2 copies of itself, each scaled by 1/√2, which gives a dimension of log 2 / log √2 = 2: the finished curve is not a thin line but covers an area, half the area of the square on its two ends. The border of that area is itself a fractal, with a dimension of about 1.524.

Tiling the plane

Dragons fit together like jigsaw pieces. Two dragons back to back, one turned half a turn, form the twin dragon, and copies of the twin dragon cover the plane without gaps or overlaps. Four dragons that start at one point, a quarter turn apart, fill the plane around that point and never run over the same segment. Chandler Davis and Donald Knuth worked out these properties in 1970 and linked the twin dragon to writing numbers in the base −1 + i.

Donald Knuth at the Computer History Museum.
Donald Knuth at the Computer History Museum.

The terdragon and the Lévy C curve

Fold the strip in three instead of two, and open the creases to 120°, and you get the terdragon, also described by Davis and Knuth: every segment becomes three, each 1/√3 as long, on a grid of triangles. It too fills an area, with a border of dimension log 4 / log 3 ≈ 1.262, the same as the Koch curve. The Lévy C curve, studied by Paul Lévy in 1938, uses the dragon's rule without the alternation: every segment becomes two at a right angle, always on the same side. Unlike the dragon it does run over its own segments, and its border has a dimension of about 1.934.

Discovery and fame

The NASA physicist John Heighway found the curve in 1966 by folding paper, and studied it with his colleagues Bruce Banks and William Harter. Martin Gardner described it in his Mathematical Games column in Scientific American in 1967. In 1990 the dragon appeared at the head of the chapters of Michael Crichton's novel Jurassic Park, one more fold in each, as a picture of small causes growing into complicated behaviour.

Explore it

Open the dragon curve generator and press Play to watch the paper unfold level by level, up to 131,072 segments. Colour the curve along its length to follow its path, or by copy to see the smaller dragons it is made of. Round the corners to check that it never crosses itself, and switch to the twin dragon, four dragons around a point, the terdragon and the Lévy C curve.

Frequently asked questions

Why is it called the dragon curve?

Because of its shape after ten or so folds: a body made of curls, with a head at one end and a coiled tail at the other, like a sea dragon. The name comes from Heighway and his colleagues. It is also called the Heighway dragon, the Harter-Heighway dragon and, after the novel, the Jurassic Park fractal.

How many times can you really fold the paper?

About seven times for an ordinary sheet, because every fold doubles the thickness and halves the length. The record is 12 folds, set by Britney Gallivan in 2002 with a strip of tissue paper about 1,200 metres long. A strip folded 17 times, the deepest level the generator draws, would be 131,072 layers thick.

Does the dragon curve cross itself?

No. It visits some corners twice, but it turns away each time instead of crossing, and it never draws the same segment twice. Round the corners in the generator to see the curve as one thread without crossings.

What is the dimension of the dragon curve?

The curve itself has dimension 2, because it is made of two copies of itself scaled by 1/√2 and fills an area. The border of that area has a fractal dimension of about 1.524.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Open the dragon curve generator