Encyclopedia of fractals · Curve
Hilbert curve
A continuous curve that passes through every point of a square. Each stage is a single path that visits all cells of a finer grid; in the limit the curve fills the whole square, so a one-dimensional line ends up two-dimensional.
How it is built
Stage 1 is a U shape through the four quarters of a square. To go from stage n to n + 1, place four copies of stage n in the four quarters, rotate the first and the last so that the path enters and leaves at the right corners, and connect them. As an L-system: A → +BF−AFA−FB+, B → −AF+BFB+FA−, angle 90°.
Properties
- It is space-filling: its image is the entire square, so its dimension is 2.
- Points that are close along the curve are close in the square. This locality is what makes the curve useful.
- It is continuous everywhere and differentiable nowhere, like the Koch curve.
Where you meet it
Hilbert ordering is used to store maps and images in databases so that nearby places stay close in memory, to schedule work on processors, to dither images and to sort points for faster searches.


