3 ms·
Yes, I only needed 2D so that's all I did. I looked at the C code in [0]. It looks like it goes to/from the x,y,z coordinates each time, which certainly works,
by dalke 3y ago
Yes, I only needed 2D so that's all I did.
I looked at the C code in [0]. It looks like it goes to/from the x,y,z coordinates each time, which certainly works, but is not all that fast, and I was interested in higher performance.
If you haven't read it, take a look at Hacker's Delight, which goes into space-filling curves.
I believe the Perdacher et al. code handles 2D generalized Hilbert curves without a kink, but it doesn't look as nice. That's the code I link to at https://gitlab.cs.univie.ac.at/martinp16cs/mortonlu/-/blob/master/sf_curves/hilloop.h https://gitlab.cs.univie.ac.at/martinp16cs/mortonlu/-/blob/m... but in the HILLOOP code. You'll also need the .c file next to it.
It's not easy to extract. I've mostly ported it to standalone C. Try http://dalkescientific.com/hilbert8.c http://dalkescientific.com/hilbert8.c . I last touched it last summer and don't recall the status.
What I remember was it wasn't as evenly distributed as the gilbert code, and for my code I wanted to prefer nearness over strict neighborhoods.
- abetusk 3y agoAwesome, thank you. I managed to find a paper by Bohm, Perdacher and Plant [0] which looks to describe what's in that repo and also looks to answer my basic question. [0] ttps://eprints.cs.univie.ac.at/5726/1/loops.pdf