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

Published:01 June 1998Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. ABEND, K., HARLEY, T. J., AND KANAL, L. N. 1965. Classification of binary random patterns. IEEE Trans. Inf. Theor. IT-11, 4 (Oct.), 538-544.Google ScholarGoogle Scholar
  2. AGRANOV, G. AND GOTSMAN, C. 1995. Algorithms for rendering realistic terrain image sequences and their parallel implementation. Visual Comput. 11, 9, 455-464.Google ScholarGoogle Scholar
  3. ASANO, T., RANJAN, D., Roos, T., WELZL, E., AND WIDMAYER, P. 1995. Space filling curves and their use in the design of geometric data structures. In Proceedings of the Conference on Theoretical Informatics (LATIN '95). 36-48. Google ScholarGoogle Scholar
  4. BERTILSSON, M., BRICKELL, E., AND INGEMARSSON, I. 1989. Cryptanalysis of video encryption based on space-filling curves. In Advances in Cryptology--EUROCRYPT '89. 403-411. Google ScholarGoogle Scholar
  5. BIALLY, T. 1969. Space-filling curves: Their generation and their application to bandwidth reduction. IEEE Trans. Inf. Theor. IT-15, 6 (Oct.), 658-664.Google ScholarGoogle Scholar
  6. BUTZ, A. R. 1968. Space filling curves and mathematical programmming. Inf. Control 12, 314-330.Google ScholarGoogle Scholar
  7. BUTZ, A. R. 1969. Convergence with Hilbert's space filling curve. J. Comput. Syst. Sci. 3, 128-146.Google ScholarGoogle Scholar
  8. BUTZ, A. R. 1971. Alternative algorithm for Hilbert's space-filling curve. IEEE Trans. Comput. C-20 (Apr.), 424-426.Google ScholarGoogle Scholar
  9. COLE, A. J. 1983. A note on space filling curves. Softw. Pract. Exper. 13, 12 (Dec.), 1181-1189.Google ScholarGoogle Scholar
  10. GAO, J. AND STEELE, J. M. 1994. General spacefilling curve heuristics and limit theory for the traveling salesman problem. J. Complexity 10, 2 (June), 230-245. Google ScholarGoogle Scholar
  11. GIORDANA, N. AND PIECZYNSKI, W. 1997. Estimation of generalized multisensor hidden Markov chains and unsupervised image segmentation. IEEE Trans. Pattern Anal. Mach. InteU. 19, 5, 465-475. Google ScholarGoogle Scholar
  12. GOLDSCHLAGER, L. M. 1981. Short algorithms for space-filling curves. Softw. Pract. Exper. 11, 1 (Jan.), 99-100.Google ScholarGoogle Scholar
  13. GOTSMAN, T. AND LINDENBAUM, M. 1994. On the metric properties of discrete space-filling curves. In Proceedings of the 12th IAPR International Conference on Pattern Recognition. IEEE Computer Society Press, Los Alamitos, CA, 98-102.Google ScholarGoogle Scholar
  14. GILBERT, D. 1891. Uber die stetige Abbildung einer Linie auf ein Fl~chenstfick. Math. Ann. 38 (Mar.), 459-460.Google ScholarGoogle Scholar
  15. KAMATA, S., KAWAGUCHI, E., AND NIIMI, M. 1995. An interactive analysis method for multidimensional images using a Hilbert curve. Syst. Comput. Japan 26, 3, 83-92.Google ScholarGoogle Scholar
  16. LAMARQUE, c.-g. AND ROBERT, F. 1996. Image analysis using space-filling curves and 1D wavelet bases. Pattern Recognit. 29, 8, 1309-1322.Google ScholarGoogle Scholar
  17. LEE, J.-H. AND HSUEH, Y.-C. 1994. Texture classification method using multiple space filling curves. Pattern Recognit. Lett. 15, 12 (Dec.), 1241-1244. Google ScholarGoogle Scholar
  18. MATIAS, Y. AND SHAMIR, A. 1987. A video scrambling technique based on space filling curves. In Advances in Cryptology--CRYPTO '89. 398-416. Google ScholarGoogle Scholar
  19. MOGHADDAM, B., HINTZ, K. J., AND STEWART, C.V. 1991. Space-filling curves for image compression. In Proceedings of the SPIE. 414-421.Google ScholarGoogle Scholar
  20. NORMAN, M. G. AND MOSCATO, P. 1995. The Euclidean traveling salesman problem and a space-filling curve. Chaos Solitons Fractals 6, 389-397.Google ScholarGoogle Scholar
  21. OHNO, Y. AND OHYAMA, K. 1991. A catalog of symmetric self-similar space-filling curves. J. Recreat. Math. 23, 3, 161-174.Google ScholarGoogle Scholar
  22. PEANO, G. 1890. Sur une Courbe qui Remplit Toute une Aire Plane. Math. Ann. 36, 157-160.Google ScholarGoogle Scholar
  23. PETIGEN, g.-o., JURGENS, g., AND SAUPE, D. 1992. Chaos and Fractals. Springer-Verlag, New York, NY.Google ScholarGoogle Scholar
  24. PRUSINKIEWICZ, P. AND LINDENMAYER, A. 1990. The Algorithmic Beauty of Plants. Springer-Verlag, New York, NY. Google ScholarGoogle Scholar
  25. PRUSINKIEWICZ, P., LINDENMAYER, A., AND FRACCHIA, F. D. 1991. Synthesis of space-filling curves on the square grid. In Fractals in the Fundamental and Applied Sciences, Peitigen, H.-O., Henriques, J. M., and Pendo, L. F., Eds. Elsevier Sci. Pub. B. V., Amsterdam, The Netherlands, 341-366.Google ScholarGoogle Scholar
  26. SAGAN, g. 1992. On the geometrization of the Peano curve and the arithmetization of the Hilbert curve. J. Math. Educ. Sci. Tech. 23, 3, 403-411.Google ScholarGoogle Scholar
  27. SAGAN, g. 1994. Space-Filling Curves. Springer-Verlag, New York, NY.Google ScholarGoogle Scholar
  28. STEVENS, R. J., LEHAR, A. F., AND PRESTON, F. g. 1983. Manipulation and presentation of multidimensional image data using the Peano Scan. IEEE Trans. Pattern Anal. Mach. InteU. PAMI-5, 5 (Sept.), 520-526.Google ScholarGoogle Scholar
  29. VELHO, L. AND GOMES, J. D. M. 1991. Digital halftoning with space filling curves. SIGGRAPH Comput. Graph. 25, 4 (July), 81-90. Google ScholarGoogle Scholar
  30. WITTEN, I. A. AND NEAL, R. M. 1982. Using Peano curves for bilevel display of continuous-tone images. IEEE Comput. Graph. Appl. 2, 3 (May), 47-52.Google ScholarGoogle Scholar
  31. WITTEN, I. A. AND WYVILL, B. 1983. On the generation and use of space-filling curves. Softw. Pract. Exper. 13, 6 (June), 519-525.Google ScholarGoogle Scholar
  32. ZHANG, Y. AND WEBBER, R. E. 1993. Space diffusion: An improved parallel halftoning technique using space-filling curves. In Conference Proceedings on Computer Graphics (SIGGRAPH 93, Anaheim, CA, Aug. 1-6). ACM Press, New York, NY, 305-312. Google ScholarGoogle Scholar

Index Terms

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

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!