# Check if points are sorted in circular order

How do you check if points are sorted in circular order (regardless of clockwise or counter-) (assuming they don't exactly form one whole circle, what matters is the points are sorted in a circular order)? • Presumably the points all lie on a common circle? – Travis Willse Apr 30 '15 at 8:35
• Also, how are the points specified? Do you have, say, $(x, y)$ coordinates for each of them? – Travis Willse Apr 30 '15 at 8:36
• yes, there are (x,y) coordinates for each of them. They don't have to lie on a common circle. @Travis – tjvg1991 May 4 '15 at 4:04
• If they don't lie on a common circle, what defines the reference point for determining circular order? Different choices of reference point will, in general, lead to different orders. – Travis Willse May 4 '15 at 4:27
• NB if the vertices are the vertices of a convex polygon (i.e., none of the points is in the interior of the convex hull of the remaining points), as is the case in the picture, then the order is the same for any reference point inside the polygon, but this is a strong restriction on the configurations of points. – Travis Willse May 4 '15 at 4:29