An extension of the topic of dimension and continuity (beyond the curriculum). There exists a continuous (one-dimensional) curve that passes through every point of a square — a “line” fills a surface, overturning our intuition about dimension. It is built as the limit of curves that wind ever more densely while staying continuous. The first such curve was given by Giuseppe Peano in 1890.

I will give you k — work out how many cells of the 2^k×2^k grid the curve visits (it passes through each one once).
What just happened?
As you increase the number of iterations, you watch successive terms of a sequence of curves that wind through the square ever more densely. For small you see a simple, angular path; the larger , the finer the curve folds, until it looks as if it covered the whole area. The key point: at every step it remains one continuous line — running without a break from corner to corner (green start, red end).
A continuous map of the interval onto the square:
In the limit (infinitely many iterations) the Peano curve is a continuous surjection of the interval onto the square: every point of the square has its own moment , at which the curve passes through it. A one-dimensional “line” really does fill a two-dimensional area.
The length grows without bound, the spacing tends to zero:
With a grid the curve has segments of length , so its length doubles every iteration and is divergent. At the same time the spacing between neighbouring “strands” shrinks to 0 — which is why in the limit no point is left unvisited.
Where does this curve come from?
The Italian mathematician Giuseppe Peano constructed it in 1890 — it is the first curve that fills space — a space-filling curve. The discovery shook the contemporary understanding of the notions of dimension and continuity: earlier Cantor had shown that an interval has “just as many” points as a square, and Peano gave this a continuous realization. Here we draw the Hilbert variant — a curve that is easier to render recursively but has the same square-filling property.
Why this matters:
Space-filling curves have real applications today: in computer science (indexing of multidimensional data, image compression, spatial algorithms), computer graphics and measure theory. It is a beautiful example of how precise mathematics can overturn the “obvious” intuition that a line (dimension 1) cannot fill an area (dimension 2). (A topic beyond the standard curriculum — a fascinating curiosity about dimension and continuity.)
Remember: there is a continuous curve that fills the entire square — its length tends to infinity, while the spacing between strands tends to zero. A one-dimensional line passes through every point of a two-dimensional region.
There exists a continuous map that is “onto” — it passes through every point of the square. A one-dimensional interval is mapped continuously onto the entire two-dimensional surface.
We build a sequence of curves that wind ever more densely; the limit stays continuous yet fills the square.
Continuity does not protect dimension — the image of a “line” can have dimension . Such a curve is not injective (it must “touch itself”).
Notation: the map, the unit square, the approximations.
Yes — the Peano curve is a continuous line that passes through every point of a two-dimensional square.
As the limit of a sequence of curves that wind ever more densely, each of which stays continuous.
For indexing multidimensional data, image compression and spatial algorithms in computer science.
Teaching? Embed this experiment on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.