
Patrick B. answered 07/13/19
Math and computer tutor/teacher
First create the pythagorean function or macro that calculates the distance between two points.
Next create a data structure with the following field columns:
point_P1 : Point
point_P2 : Point
distance : float
Step 3, using nested for loop, calculate the distance between all possible pairs of points.
If you have N points, then there are N choose 2 pairs, which is n!/ (2! (n-2)!) =
n(n-1)/2 pairs
So if you have 10 points, there are 45 pairs, of which you must find the pythagorean distance of each.
Step 4: sort these data structures or linear search them for one within the threshold