Non-square Moore-curve-like space filling curve in three dimensions

39 Views Asked by At

I wonder whether there is a space filling curve that looks like the following

Moore-curve-like space filling curve

if the width of the domain has an odd number of cells and looks like the following

Moore-curve-like space filling curve

if the width of the domain has an even number of cells.

I would like to fill a three dimensional grid none of whose sides (lengths) are guaranteed to be a power of two or even.