Hi,(adsbygoogle = window.adsbygoogle || []).push({});

Suppose I have a data structure that models a polygon, by storing all the nodes of the given polygon, and their connections (i.e. edges).

I understand that sorting a set of nodes that may form a concave hull is ill-defined, as there could be many polygons that can be formed with those. But I'm asking about the case where the polygon is already defined by the edges. I'm attaching a drawing of such a polygon.

Is there an efficient and generic way to order the nodes of any such polygon, which may be concave, in ccw or cw?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# CCW or CW ordering of the points of a generic polygon

Loading...

**Physics Forums | Science Articles, Homework Help, Discussion**