Question

I'm doing triangulation of polygon in C#. I wrote code for triangulating monotone polygon, but I can't find a way to break polygon in monotone parts. I found many algorithms, for example ( http://research.engineering.wustl.edu/~pless/546/lectures/l7.html ), plane sweep method where events are vertices of polygon, and depending if vertex is start, end, regular, split or merge, I do different things with it. I understand how algorithm works, but I don't know how to check if vertex is split/merge or just start/end?

Was it helpful?

Solution

It looks like you have to know which side of an edge is inside/outside or the case is indeed ambiguous. If this is given by the winding/order of the vertices, it's easy - always take the angle clockwise or counter clockwise from the first to the second edge (or adjacent vertices) hence the 180 degrees mentioned. If vertex order is arbitrary, I can only assume you have to keep track of the inside/outside direction explicitly which might require an initial classification pass.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top