You can try a monster curve (space filling curve). A fast algorithm is to simply interleave the x and y coordinate. It also possible for 3 dimensions.

dynamic space partitioning tree data structures?
What is the difference in being physically capable and physically able?

When would one choose one over the other?
