Hi,
I'm curious if anyone has found an efficient way to calculate the X nearest neighbors in a pointcloud or a set of 3D points from a single 3D point.
My current method is mathematically calculating the distance from point 1 to every point in my pointcloud with the following formula and then sorting by distance.
d (P1, P2)= ((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)^1/2
It works but it's not efficient at all.
I'm curious if anybody has a more efficient idea.
Thanks,
Mark