How to decompose the polygon with self intersections to the set of simple polygons?
The input polygon P = {p1, ... pn} is given by the set of n vertices with the CCW orientation. I would like to perform a decposition to a set of m polygons P1, ..., Pm.
A simple walking along the segments from the intersection to the next one does not bring any effect; there are 2 segments with the same start point represented by the intersection point.
Probably, some lexicographical sort of edges may help...