Hilbert Space-Filling Curve

A recursive fractal path that perfectly preserves locality while traversing every pixel in a square.

How It Works

The Hilbert curve is constructed recursively by bending a simple U-shaped motif into four smaller copies of itself, rotated and connected. After n recursions the path visits all 2^{2n} points in a grid of size 2^n × 2^n.

Properties

In the Gallery

← Back to gallery