How to generalize a Moore Curve to 3 dimensions?

975 Views Asked by At

I understand the concept of a Moore curve in 2D:

enter image description here

However I find it a bit tough to conceptualize and generalize it to 3D or higher dimensions. Can someone kindly help me out by providing some resources and maybe a computer code to do so ?

Regards

Ujjwal

1

There are 1 best solutions below

1
On

You can use a L-System but it's not trivial at all. It's also possible to use the gray-code. The trick is in 2d you have only 1 possible gray code:http://www.tiac.net/~sw/2008/10/Hilbert/ and look this answer:https://stackoverflow.com/questions/14519267/algorithm-for-generating-a-3d-hilbert-space-filling-curve-in-python