I have two sets of points, A and B, and I'm trying to find the closest pair of points where one point is taken from each set. That is, if you were to use points that two drew lines, I want the two points to allow me to draw the shortest line segment between two lines.
Looking around, almost everything seems to be dealing with finding the nearest points in 1 set. Although I found one solution recommending voronoi tesselation for a start, which seems a bit like overkill, I'm just looking for something more enjoyable than O (n ^ 2).
If this helps, the two sets compare string strings, although they are not necessarily straight, and I am writing this in C #.
Thanks.
source
share