Fastest way to find the closest point to a given point in 3D, in Python

后端 未结 3 1448
长情又很酷
长情又很酷 2021-02-14 13:19

So lets say I have 10,000 points in A and 10,000 points in B and want to find out the closest point in A for every B point.

Currently, I simply loop through every point

3条回答
  •  死守一世寂寞
    2021-02-14 14:18

    You could use some spatial lookup structure. A simple option is an octree; fancier ones include the BSP tree.

提交回复
热议问题