Algorithm 781: generating Hilbert's space-filling curve by recursion

  • Authors:
  • Greg Breinholt;Christoph Schierz

  • Affiliations:
  • Swiss Federal Institute of Technology, Zurich, Switzerland;Swiss Federal Institute of Technology, Zurich, Switzerland

  • Venue:
  • ACM Transactions on Mathematical Software (TOMS)
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

An efficient algorithm for the generation of Hilbert's space-filling curve is given. The algorithm implements a recursive procedure that involves simple integer operations and quickly converges to the set of points that make the Hilbert curve. The algorithm is elegant, short, and considerably easier to implement than previous recursive and nonrecursive algorithms and can be efficiently implemented in all programming languages that have integer operations and allow recursion. The fundamental Hilbert shape (a line joining the four corners of a square) is represented by two variables with values of either 0 or 1. This coding technique could be successfully applied to the generation of other regular space-filling curves, such as the Peano curve.