skip to main content
article

SFCGen: A framework for efficient generation of multi-dimensional space-filling curves by recursion

Published: 01 March 2005 Publication History

Abstract

Because they are continuous and self-similar, space-filling curves have been widely used in mathematics to transform multi-dimensional problems into one-dimensional forms. For scientific applications, reordering computation by certain space-filling curves can significantly improve data reuse because of the locality properties of these curves. However, when space-filling curves are used in programs for reordering data, traversal or indexing of the curves must be efficient. To address this problem, we present the table-driven framework SFCGen to efficiently generate multi-dimensional space-filling curves on the fly. The framework is general and easy enough to be used in any application that can be partitioned recursively in multiple dimensions. We describe a movement specification table, a universal turtle algorithm to enumerate points along a space-filling curve, a table-based indexing algorithm to transform coordinates of a point into its position along the curve and an algorithm to pregenerate the table automatically. As examples, we show how high-dimensional Hilbert, Morton, and Peano curves and a two-dimensional Sierpiński curve can be generated with our algorithms. We present performance results for Hilbert, Morton, and Peano curves and compare the efficiency of our curve generation algorithm with the most recent work on generating Hilbert curves. Our experimental results on three modern microprocessor-based platforms show that SFCGen performs up to 63% faster than the most recent recursive algorithm on 2D curve generation and up to a factor of 132 faster than two previous byte-oriented non-recursive implementations. On curve indexing, SFCGen performs as much as a factor of three faster than the byte-oriented implementation. Our results on 4D space-filling curves also show that SFCGen scales very well with curve level for higher dimensional spaces.

References

[1]
Abel, D. J. and Mark, D. M. 1990. A comparative analysis of some two-dimensional orderings. Int. J. Geog. Info. Syst. 4, 1, 21--31.
[2]
Alpert, C. J. and Kahng, A. B. 1994. Multi-way partitioning via spacefilling curves and dynamic programming. In Proceedings of the 31st Annual Conference on Design Automation Conference. 652--657.
[3]
Bartholdi III, J. and Goldsman, P. 2001. Vertex-labeling algorithms for the Hilbert spacefilling curve. Software--Practice and Experience 31, 395--408.
[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.
[5]
Bially, T. 1969. Space-filling curves: Their generation and their application to bandwidth reduction. IEEE Trans. Info. Theory IT-15, 6 (Nov.), 658--664.
[6]
Böhm, C., Berchtold, S., and Keim, D. A. 2001. Seaching in high-dimensional spaces: Index structures for improving the performance of multimedia databases. ACM Comput. Surv. 33, 322--373.
[7]
Breinholt, G. and Schierz, C. 1998. Algorithm 781: Generating Hilbert's space-filling curve by recursion. ACM Trans. Math. Soft. 24, 2, 184--189.
[8]
Browne, S., Dongarra, J., Garner, N., London, K., and Mucci, P. 2000. A scalable cross-platform infrastructure for application performance tuning using hardware counters. In Proceedings of 2000 ACM/IEEE Conference on Supercomputing. Dallas, TX.
[9]
Butz, A. R. 1968. Space filling curves and mathematical programming. Information and Control 12, 314--330.
[10]
Butz, A. R. 1969. Convergence with Hilbert's space filling curve. J. Comput. Syst. Sci. 3, 2, 128--146.
[11]
Butz, A. R. 1971. Alternative algorithm for Hilbert's space-filling curve. IEEE Trans. Comput. C-20, 4 (Apr.), 424--426.
[12]
Chatterjee, S., Lebeck, A. R., Patnala, P. K., and Thottethodi, M. 1999. Recursive array layouts and fast parallel matrix multiplication. In ACM Symposium on Parallel Algorithms and Architectures. 222--231.
[13]
Cole, A. J. 1981. A note on space filling curves. Software--Practice and Experience 13, 12 (Dec.), 1181--1189.
[14]
Drakopoulos, V., Tziovaras, A., Böhm, A., and Dalla, L. 1999. Fractal interpolation techniques for the generation of space-filling curves. In Hellenic European Research on Computer Mathematics and Its Applications, E. A. Lipitakis, Ed. LEA, 843--850.
[15]
Frens, J. and Wise, D. 1997. Auto-blocking matrix multiplication or tracking BLAS3 performance from source code. In Proceedings of the Sixth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. Las Vegas, NV, 206--216.
[16]
Goldschlager, L. M. 1981. Short algorithms for space-filling curves. Software--Practice and Experience 11, 1 (Jan.), 99--100.
[17]
Hilbert, D. 1891. Über die stetige abbildung einer linie auf ein flachenstück. Math. Ann. 38, 459--460.
[18]
Hu, Y. C., Cox, A., and Zwaenepoel, W. 2000. Improving fine-grained irregular shared-memory benchmarks by data reordering. In Proceedings of the 2000 ACM/IEEE Conference on Supercomputing. Dallas, TX.
[19]
Jagadish, H. V. 1990. Linear clustering of objects with multiple attributes. In Proceedings of the 1990 ACM SIGMOD Conference. 332--342.
[20]
Jin, G., Mellor-Crummey, J., and Fowler, R. 2001. Increasing temporal locality with skewing and recursive blocking. In Proceedings of the 2001 ACM/IEEE Conference on Supercomputing. Denver, CO.
[21]
Kumar, A. 1994. A study of spatial clustering techniques. In Proceedings of the 5th International Conference on Database and Expert System Applications. 57--71.
[22]
Kuo, S., Winslett, M., Cho, Y., Lee, J., and Chen, Y. 1999. Efficient input and output for scientific simulations. In Proceedings of the 6th Workshop on I/O in Parallel and Distributed Systems. 33--44.
[23]
Lamarque, C. H. and Robert, F. 1996. Image analysis using space-filling curves and 1D wavelet bases. Pattern Recognition 29, 8, 1309--1322.
[24]
Lawder, J. K. and King, P. J. H. 2001. Querying multi-dimensional data indexed using the Hilbert space-filling curve. ACM SIGMOD Record 30, 19--24.
[25]
Lindenmayer, A. 1968. Mathematical models for cellular interaction in development, parts I and II. J. Theore. Biol. 18, 280--315.
[26]
Matias, Y. and Shamir, A. 1987. A video scrambling technique based on space filling curve. In Advances in Cryptology---CRYPTO'89. 398--416.
[27]
Mellor-Crummey, J., Whalley, D., and Kennedy, K. 1999. Improving memory hierarchy performance for irregular applications. In Proceedings of the 13th ACM International Conference on Supercomputing. Rhodes, Greece, 425--433.
[28]
Moghaddam, B., Hintz, K. J., and Stewart, C. V. 1991. Space-filling curves for image compression. In Proceedings of the SPIE. 414--421.
[29]
Mokbel, M. F. and Aref, W. G. 2001. Multimedia information processing: Irregularity in multi-dimensional space-filling curves with applications in multimedia database. In Proceedings of the Tenth International Conference on Information and Knowledge Management. 512--519.
[30]
Mokbel, M. F., Aref, W. G., and Kamel, I. 2003. Analysis of multi-dimensional space-filling curves. GeoInformatica 7, 179--209.
[31]
Moore, D. 2000. http://www.caam.rice.edu/~dougm/twiddle/Hilbert.
[32]
Morton, G. M. 1966. A computer oriented geodetic data base and a new technique in file sequencing. Technique Report, IBM, Canada.
[33]
Musgrave, K. 1991. A Peano curve generation algorithm. In Graphics Gems II, J. Arvo, Ed. Academic Press, San Diego, CA, 25.
[34]
Ohno, Y. and Ohyama, K. 1991. A catalog of symmetric self-similar space-filling curves. J. Recreational Math. 23, 161--173.
[35]
Peano, G. 1890. Sur une courbe qui remplit toute une aire plane. Mathematishe Annalen 36, 157--160.
[36]
Platzman, L. K. and J. J. Bartholdi, III. 1989. Spacefilling curves and the planar travelling salesman problem. J. ACM 36, 719--737.
[37]
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, H. O. Peitgen, J. M. Henriques, and L. F. Penedo, Eds. Elsevier Science Publisher BV, Amsterdam, The Netherlands, 341--366.
[38]
Sagan, H. 1992. On the geometrization of the Peano curve and the arithmetization of the Hilbert curve. Int. J. Math. Educ. Sci. Tech. 23, 403--411.
[39]
Sagan, H. 1993. A three-dimensional Hilbert curve. Int. J. Math. Educ. Sci. Tech. 24, 541--545.
[40]
Sagan, H. 1994. Space-Filling Curves. Springer-Verlag, New York, NY.
[41]
Sierpiński, W. 1912. Sur une nouvelle courbe countinue qui remplit toute une aire plane. Bull. Acad. Sci. de Cracovie (Sci. math. et nat., Série A), 462--478.
[42]
Stevens, R. J., Lehar, A. F., and Preston, F. H. 1983. Manipulation and presentation of multidimensional image data using the Peano scan. IEEE Trans. Pattern Anal. Mach. Intell. 5, 520--526.
[43]
Velho, L. and Gomes, J. M. 1991. Digital halftoning with space filling curves. In Proceedings of the 18th Annual Conference on Computer Graphics and Interactive Techniques. 81--90.
[44]
Witten, I. H. and Wyvill, B. 1983. On the generation and use of space-filling curves. Software--Practice and Experience 13, 519--525.
[45]
Zhang, Y. and Webber, R. E. 1993. Space diffusion: An improved parallel halftoning technique using space-filling curves. In Proceedings of the 20th Annual Conference on Computer Graphics and Interactive Techniques. 305--312.

Cited By

View all

Index Terms

  1. SFCGen: A framework for efficient generation of multi-dimensional space-filling curves by recursion

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image ACM Transactions on Mathematical Software
        ACM Transactions on Mathematical Software  Volume 31, Issue 1
        March 2005
        185 pages
        ISSN:0098-3500
        EISSN:1557-7295
        DOI:10.1145/1055531
        Issue’s Table of Contents

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 01 March 2005
        Published in TOMS Volume 31, Issue 1

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tag

        1. Space-filling curve

        Qualifiers

        • Article

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)13
        • Downloads (Last 6 weeks)1
        Reflects downloads up to 01 Jan 2025

        Other Metrics

        Citations

        Cited By

        View all

        View Options

        Login options

        Full Access

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media