CurvG
Fractal curves

Peano curve

The first space-filling curve (1890): a snake through a 3ⁿ × 3ⁿ grid whose limit covers the whole square.

Adjust parameters

Export

Formulas and key values

Construction rule

Visit the nine blocks of the square column by column, up, down, up; inside each block repeat the whole snake, mirrored so neighbours join.

Arc lengthIn the graph ≈ 26.96
Ln=3n−3−nL_n = 3^n - 3^{-n}
Cells visitedIn the graph = 729
9n9^n
Dimension of the limit
D=2D = 2

n is the order; the curve lives in the unit square.

Explainer video

Make a video of the Peano curve

Opens the Creator with a ready-made brief for this curve. Free-form generation is in beta.

Start the video

01 · Definition

What is the Peano curve?

In 1890 Giuseppe Peano surprised his contemporaries with a continuous curve that passes through every point of a square. His construction splits the square into nine, visits the nine blocks in a snake (up, down, up), and inside each block repeats the same snake, mirrored so neighbouring blocks join.

The order-n path visits all 9ⁿ cells of a 3ⁿ × 3ⁿ grid. Its limit is a continuous map of a segment onto the square, which showed that a curve, in this sense, can have dimension 2. Hilbert’s simpler two-by-two version came a year later.

02 · Properties

Key properties

  1. Order n visits 9ⁿ cells, each exactly once.
  2. In the unit square the order-n path has length 3ⁿ − 3⁻ⁿ.
  3. The limit is a continuous surjection from [0, 1] onto the square.
  4. Its image has dimension 2.
  5. Each block is the whole pattern, mirrored horizontally, vertically, or both.

03 · Questions

Peano curve: common questions

How is the Peano curve constructed?
Construction rule: Visit the nine blocks of the square column by column, up, down, up; inside each block repeat the whole snake, mirrored so neighbours join.. n is the order; the curve lives in the unit square.
What is the arc length of the Peano curve?
Arc length: L_n = 3^n - 3^(-n). n is the order; the curve lives in the unit square.

04 · Keep exploring