Hilbert’s space filling curve

In mathematics a curve is an object similar to a segment, but is not required to be straight. Guiseppe Peano discovered in 1890 that there are curves that fill a square without missing any points. In 1891, David Hilbert constructed a similar curve now known as Hilbert’s Curve. The process of creating Hilbert’s curve starts with a U-shaped curve centered in a square. As the process is repeated the curves become longer and longer, but none of the curves ever completely fills the square. What does fill the square is the limit of the created curves. David Hilbert’s idea is not restricted to 2D squares. It can also be generalized to create curves that fill 3D cubes.