Given a triangulated mesh (no self intersection, no holes, possibly concave) represented as an unordered list of triangles (list of 3 vertices) or rectangles (list of 4 vertices), i.e.
[
[[x1, y1], [x2, y2], [x3, y3]],
[[x4, y4], [x5, y5], [x6, y6], [x7, y7],
....
]
How can I sort the vertices in a clockwise order?