3 ms·
There's an even stronger result. Every space filling curve's inverse is necessarily not locality preserving. Should an inverse exist that is continuous then 2D
by contravariant 2y ago
There's an even stronger result. Every space filling curve's inverse is necessarily not locality preserving.
Should an inverse exist that is continuous then 2D space would be homeomorphic to 1D, but they're obviously different (if you want a proof, consider that removing a point from a line makes it disconnected while in 2D the space remains connected, now note that 'connectedness' is preserved by homeomorphisms).
- animal531 2y agoYeah for perfect data its a bit soso, but if you don't care about that its great. I'm using some Morton curves for finding neighbours for movement and targeting in a 2d space for a large amount of points (in a compute shader). One can divide the space into buckets, but for example for targeting at say 10 units the bucket can be 5k long for 1 million entities in a smallish area. Using Morton which is fast to compute I can usually get a great selection of good candidates within a max set left/right distance and/or under an x,y distance check of some bigger value (as in allow 2d distances to climb to 3x max of our desired distance before breaking).