14-5. Non-recursive Generating Algorithms

The algorithms of Tables 14-2 and 14-7 provide two non-recursive algorithms for generating the Hilbert curve of any order. Either algorithm can be implemented in hardware without great difficulty. Hardware based on Table 14-2 includes a register holding s, which it increments for each step, and then converts to (x, y) coordinates. Hardware based on Table 14-7 would not have to include a register for s, but the algorithm is more complicated.

Get Hacker's Delight now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.