Polygon Triangulation
Daniel Vlasic
Algorithm -- Triangulating a Monotone Polygon -- Adding
Diagonals
-
if vj is on the same chain as the reflex
vertices on the stack
-
we may not be able to add diagonals to all vertices on stack
-
but those we can connect to vj are consecutive
on top of the stack
-
so
-
pop the first vertex (already connected to vj)
-
keep popping vertices and connecting them to vj
while possible
-
push the last popped vertex back onto S
-
push vj onto the stack

back next