In coo
you get only positively oriented points. But when used in Polygon
the coordinates order is modified by PolygonCoordinates
according rules in CanonicalizePolygon
.
poly = RandomPolygon[{"Convex", 3}, 10, DataRange -> {{0, 1}, {0, 1}}];
coo = If[PositivelyOrientedPoints[PolygonCoordinates[#]],
PolygonCoordinates[#], Reverse@PolygonCoordinates[#]] & /@ poly;
PositivelyOrientedPoints[#] & /@ coo
PositivelyOrientedPoints[PolygonCoordinates@#] & /@ (Polygon /@ coo)
{True, True, True, True, True, True, True, True, True, True}
{True, False, True, False, True, True, False, False, False, False}
Example of change of the order by PolygonCoordinates
.
Polygon[{{1, 2}, {0, 0}, {0, 1}}] // PolygonCoordinates
--
{{0, 0}, {0, 1}, {1, 2}}