22-Aug-2024 18:09:49 hilbert_curve_3d_test(): MATLAB/Octave version 6.4.0 Test hilbert_curve_3d(). h_to_xyz_test(): h_to_xyz() converts a Hilbert 3D curve coordinate H within a cube of side 2^r into (x,y,z) coordinates For r = 1 h x y z 0 0 0 0 1 1 0 0 2 1 0 1 3 0 0 1 4 0 1 1 5 1 1 1 6 1 1 0 7 0 1 0 Graphics saved as "hilbert_curve_3d_r1.png" For r = 2 h x y z 0 0 0 0 1 0 0 1 2 0 1 1 3 0 1 0 4 1 1 0 5 1 1 1 6 1 0 1 7 1 0 0 8 2 0 0 9 2 1 0 10 3 1 0 11 3 0 0 12 3 0 1 13 3 1 1 14 2 1 1 15 2 0 1 16 2 0 2 17 2 1 2 18 3 1 2 19 3 0 2 20 3 0 3 21 3 1 3 22 2 1 3 23 2 0 3 24 1 0 3 25 0 0 3 26 0 0 2 27 1 0 2 28 1 1 2 29 0 1 2 30 0 1 3 31 1 1 3 32 1 2 3 33 0 2 3 34 0 2 2 35 1 2 2 36 1 3 2 37 0 3 2 38 0 3 3 39 1 3 3 40 2 3 3 41 2 2 3 42 3 2 3 43 3 3 3 44 3 3 2 45 3 2 2 46 2 2 2 47 2 3 2 48 2 3 1 49 2 2 1 50 3 2 1 51 3 3 1 52 3 3 0 53 3 2 0 54 2 2 0 55 2 3 0 56 1 3 0 57 1 3 1 58 1 2 1 59 1 2 0 60 0 2 0 61 0 2 1 62 0 3 1 63 0 3 0 Graphics saved as "hilbert_curve_3d_r2.png" xyz_to_h_test(): xyz_to_h() converts a 3D Hilbert curve lattice point (x,y,z) to a linear coordinate H. r = 1 i x y z h 0 0 0 0 0 1 1 0 0 1 2 1 0 1 2 3 0 0 1 3 4 0 1 1 4 5 1 1 1 5 6 1 1 0 6 7 0 1 0 7 r = 2 i x y z h 0 0 0 0 0 1 0 0 1 1 2 0 1 1 2 3 0 1 0 3 4 1 1 0 4 5 1 1 1 5 6 1 0 1 6 7 1 0 0 7 8 2 0 0 8 9 2 1 0 9 10 3 1 0 10 11 3 0 0 11 12 3 0 1 12 13 3 1 1 13 14 2 1 1 14 15 2 0 1 15 16 2 0 2 16 17 2 1 2 17 18 3 1 2 18 19 3 0 2 19 20 3 0 3 20 21 3 1 3 21 22 2 1 3 22 23 2 0 3 23 24 1 0 3 24 25 0 0 3 25 26 0 0 2 26 27 1 0 2 27 28 1 1 2 28 29 0 1 2 29 30 0 1 3 30 31 1 1 3 31 32 1 2 3 32 33 0 2 3 33 34 0 2 2 34 35 1 2 2 35 36 1 3 2 36 37 0 3 2 37 38 0 3 3 38 39 1 3 3 39 40 2 3 3 40 41 2 2 3 41 42 3 2 3 42 43 3 3 3 43 44 3 3 2 44 45 3 2 2 45 46 2 2 2 46 47 2 3 2 47 48 2 3 1 48 49 2 2 1 49 50 3 2 1 50 51 3 3 1 51 52 3 3 0 52 53 3 2 0 53 54 2 2 0 54 55 2 3 0 55 56 1 3 0 56 57 1 3 1 57 58 1 2 1 58 59 1 2 0 59 60 0 2 0 60 61 0 2 1 61 62 0 3 1 62 63 0 3 0 63 hilbert_curve_3d_test(): Normal end of execution. 22-Aug-2024 18:09:50