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

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
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