Settings

Theme

Show HN: Simple, multi-key sorting algorithm for 2D+ points gridification

github.com

1 points by adec314 · 1 comment

Reader

1 thread
adec314OP

Cartesian grid sort assign raw input points (x_k, y_k) to a grid by mapping the initial flat index k to a multi-index [ij]. Point set become (x_[ij], y_[ij]).

Alternated 1d sorts make the [ij] grid structure converge to monotonic, spatially coherent multi index with a simple and fast algorithm (<80 lines basic C++ code, <200 ms runtime / million points)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection