Programming the Hilbert curve

John Skilling · AIP conference proceedings · 2004

The Hilbert curve has previously been constructed recursively, using p levels of recursion of n‐bit Gray codes to attain a precision of p bits in n dimensions. Implementations have reflected the awkwardness of aligning the recursive steps to preserve geometrical adjacency. We point out that a single global Gray code can instead be applied to all np bits of a Hilbert length. Although this “over‐transforms” the length, the excess work can be undone in a single pass over the bits, leading to compact and efficient computer code.

Read the paper · More papers on PaperTik