In 1891, the German mathematician David Hilbert published a curve so strange it bent intuition: a single, unbroken line that — in the limit — visits every point of a filled square, leaving no spot untouched.
That seems impossible. A line is one-dimensional; a filled square is two-dimensional. How can something thin and linear cover something thick and areal?
The answer is a recursive trick. Start with a U-shaped path that visits four cells of a 2 × 2 grid. Now shrink that U into one corner, rotate copies into the other three corners, and connect them. You get a curve that visits 16 cells. Repeat: 64 cells, 256 cells, and at each step the curve gets denser, twistier, and more completely fills the square. In the infinite limit the Hilbert curve is everywhere — it is a genuine space-filling curve, an object that is simultaneously a path and a plane.
What makes the Hilbert curve special is not just that it fills space. It is how it fills space: nearby points on the curve stay nearby on the grid. This locality-preserving property, almost magical in how reliably it holds, is the reason the Hilbert curve sits at the heart of spatial databases, image compression, parallel computing layouts, and cache-efficient memory access patterns.
Comments
Loading comments...