Report Tool or Give Us Suggestions

Peano Curve Generator

Visualize and generate Peano's classic space-filling curve fractal with custom iterations, speed controls, grid tiling, and vector exports.

L ading . . .

The Peano Curve: Giuseppe Peano's Pioneering Space-Filling Curve

The Peano Curve is a monumental milestone in mathematical history. Discovered by the Italian mathematician Giuseppe Peano in 1890, it was the first-ever example of a space-filling curve—a continuous, one-dimensional line that completely fills a two-dimensional square. This shocking discovery shattered classical geometric intuition, proving that space and lines could have the same cardinality!

The Mathematical Dilemma & Discovery

Before Peano's discovery, mathematicians like Georg Cantor had proved that the unit interval $[0, 1]$ and the unit square $[0, 1] \times [0, 1]$ contain the exact same number of points (cardinality). However, it was widely believed that any *continuous* mapping from a line to a plane must leave gaps.

Peano constructed a continuous, surjective function:

$$f: [0, 1] \to [0, 1]^2$$

This mapping passes through *every single point* in the 2D unit square. As a result, the curve has a topological dimension of $1$, but a Hausdorff dimension of:

$$D_H = 2$$

This completely filled the two-dimensional region in the limit as the iteration depth approached infinity!

Construction Rules & L-System Structure

The Peano curve is based on a $3 \times 3$ grid subdivision. A single square is divided into nine equal smaller squares, and the curve traverses the center points of these squares in a specific order. At each recursive order, each of the nine squares is further subdivided.

The construction can be beautifully represented using an L-system with a $90^\circ$ turn angle:

L-System Configuration:
Axiom: $L$
Angle: $90^\circ$
Rule 1: $L \to L F R F L - F - R F L F R + F + L F R F L$
Rule 2: $R \to R F L F R + F + L F R F L - F - R F L F R$
Rule 3: $F \to F$ (move forward and draw)

Here, the $+$ symbol represents a clockwise rotation of $90^\circ$, and $-$ represents a counter-clockwise rotation of $90^\circ$. By recursively expanding the string and rendering it with turtle graphics, we get Peano's perfect grid-tiling fractal path!

Frequently Asked Questions

Frequently Asked Questions

What is a space-filling curve?

A space-filling curve is a continuous mathematical curve whose range completely covers a higher-dimensional area, such as a two-dimensional square or a three-dimensional cube. As its recursion depth goes to infinity, the curve covers every point in the space.

How does the Peano curve differ from the Hilbert curve?

The Peano curve is based on a ternary $3 \times 3$ grid subdivision (scaling step size by $1/3$ per iteration), whereas the Hilbert curve is based on a binary $2 \times 2$ grid subdivision (scaling by $1/2$ per iteration). Peano's curve is older, discovered in 1890, while Hilbert's curve was discovered in 1891.

Why is the Hausdorff dimension exactly 2?

Because the curve completely fills the two-dimensional plane as the iteration order approaches infinity, its Hausdorff dimension (which measures geometric complexity and density) is exactly $2$, matching the dimension of the square it covers.

Can I export Peano curve vector graphics?

Yes! Our premium generator lets you customize the line width, glow, background, and colors of the Peano curve, and download it instantly as high-resolution PNG images or lossless vector SVG files, which are perfect for digital art, laser engraving, and educational presentations.

logo OnlineMiniTools

OnlineMiniTools.com is your ultimate destination for a wide range of web-based tools, all available for free.

Feel free to reach out with any suggestions or improvements for any tool at admin@onlineminitools.com. We value your feedback and are continuously striving to enhance the tool's functionality.

© 2026 OnlineMiniTools . All rights reserved.

Hosted on Hostinger

v1.10.0