Concept

# Hilbert curve

Summary
The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling Peano curves discovered by Giuseppe Peano in 1890. Because it is space-filling, its Hausdorff dimension is 2 (precisely, its image is the unit square, whose dimension is 2 in any definition of dimension; its graph is a compact set homeomorphic to the closed unit interval, with Hausdorff dimension 2). The Hilbert curve is constructed as a limit of piecewise linear curves. The length of the th curve is , i.e., the length grows exponentially with , even though each curve is contained in a square with area . File:Hilbert curve 1.svg|Hilbert curve, first order File:Hilbert curve 2.svg|Hilbert curves, first and second orders File:Hilbert curve 3.svg|Hilbert curves, first to third orders File:Hilbert curve production rules!.svg|Production rules File:Hilbert.png|Hilbert curve, construction color-coded File:Hilbert3d-step3.png|A 3-D Hilbert curve with color showing progression File:Courbe de Hilbert.jpg|Variant, first three iterationsBourges, Pascale. "[http://pascale.et.vincent.bourges.pagesperso-orange.fr/fractales%20et%20chaos1/Chapitre%201.htm Chapitre 1: fractales]", ''Fractales et chaos''. Accessed: 9 February 2019. Both the true Hilbert curve and its discrete approximations are useful because they give a mapping between 1D and 2D space that preserves locality fairly well. This means that two data points which are close to each other in one-dimensional space are also close to each other after folding. The converse cannot always be true. Because of this locality property, the Hilbert curve is widely used in computer science. For example, the range of IP addresses used by computers can be mapped into a picture using the Hilbert curve. Code to generate the image would map from 2D to 1D to find the color of each pixel, and the Hilbert curve is sometimes used because it keeps nearby IP addresses close to each other in the picture.