I have the following information:
I have a set of 3d points (much more and well distributed than the ones shown in the image) and some cubes plotted. I want to find which cube each point is closest to. I had the 8 vertices of the cubes which I used to plot them.
I know I can make a plane from the vertices and find distance of the points from each of the planes and proceed in that manner. Is there an easier way?
You could try first evaluating the distance of each point to the centre of each cube and set a first association "points - cube".
Then you can consider the distances between the centre of the cubes: if the centres are close enough so that one cube intersects the other, perhaps the association "points - cube" should be reviewed (e. g. considering your initial approach - the planes).
Hope this helps.