0
\$\begingroup\$

Let's say I have a bunch of points:

enter image description here

What is the best way to get a certain amount of closest neighbors. For example I wan't the 8 closest points for point no 57.

This without using brute force.

O yeah, if possible, it would be great if it's efficient for moving points as well.

\$\endgroup\$
4
  • \$\begingroup\$ Do you have the coordinates of all the points? Seems like a stupid question but I have to ask... \$\endgroup\$ Commented Mar 20, 2015 at 18:42
  • \$\begingroup\$ Also: gamedev.stackexchange.com/questions/14373/… \$\endgroup\$
    – House
    Commented Mar 20, 2015 at 18:44
  • 1
    \$\begingroup\$ This question might also help: gamedev.stackexchange.com/questions/79842/… \$\endgroup\$
    – Philipp
    Commented Mar 20, 2015 at 18:44
  • 1
    \$\begingroup\$ Basically, look up spatial partitioning and nearest neighbor algorithms. \$\endgroup\$
    – House
    Commented Mar 20, 2015 at 18:45

0

Browse other questions tagged .