I have a 2D polygon defined by a list of $ n$ points: $ A$ , $ B$ , $ C$ … These points are sorted in clockwise order. Example:
I would like to find the most performant algorithm to detect all points which are close together (distance < $ x$ ).In the above example, it is $ (H, I)$ and $ (B, F)$ . I could compare each points with all others points and check their distance => complexity $ O(n^2)$ . Is it possible to have a better performance knowning that points are already sorted in clockwise order ?