I thought about finding the convex hull first, but since it's a convex polygon, it shouldn't matter. If you find the lowest point in the set, and sort the others in increasing polar angles, with respect to that lowest point, then since it's convex, you will have the points in counter-clockwise order ...