How can I extract simple polygons out of a polygon which contains collinear edges? For the very simple case below, edge 2-3 and 6-0 are collinear. I want to separate this as 0, 1, 2 and 3, 4, 5, 6.
I could compare collinearity of every edge against every other edge, but that is a slow O(n^2) approach. Is there a faster method?