I'm trying to implement the coordinate<->curve mapping logic for the Hilbert SFC, but I'm having trouble finding any kind of code/pseudocode or paper explaining how to do it. There is the two-dimensional specialization (expressed in C) in the Wikipedia article (https://en.wikipedia.org/wiki/Hilbert_curve), but I'm trying to adapt it for N-dimensions and, not being someone given naturally to math, I'm not finding the rotation function intuitive enough to simply tweak.
Does someone have a treatment for this that they'd like to share? Even a list of steps would be fine. It'd be deeply appreciated.
Thanks.