Not an answer about 3D conversion, but there is a nice algorithm and discussion of Hilbert values here Two-dimensional spatial hashing with space-filling curves
From MIT
4 algorithms for the n-dimensional Hilbert Space-Filling Curve
* A. R. Butz, "Alternative Algorithm for Hilbert's Space-Filling Curve",
IEEE Trans. Comp., April, 1971, pp 424-426. [Butz 1971]
* S. W. Thomas, "hilbert.c" in the Utah Raster Toolkit circa 1993,
http://web.mit.edu/afs/athena/contrib/urt/src/urt3.1/urt-3.1b.tar.gz
* D. Moore, Fast Hilbert Curves in C, without Recursion
* J.K.Lawder, Calculation of Mappings Between One and n-dimensional Values Using the Hilbert Space-filling Curve, [JL1_00]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…