I really need some urgent help with this problem.
I have a set of edges and vertices defining a polygon (not necessarily convex). The vertices and edges are in random order as shown in the image on the left. I want to sort/order the vertices of this polygon in clockwise (or anti-clock wise) direction, so that the desired output is as shown on the right.
Any idea how this can be achieved?