Collect HW1!
Handouts: HW2
2/13/08: Triangulations of simple polygons and geometric primitives


Bottom line: One can triangulate a simple polygon in linear time (O(n)). However, this algorithm, by Chazelle, is VERY complex and we do not cover it. (It is assumed not to be at all practical.) You are expected to know, though, from a theoretical point of view, the time it takes to triangulate a simple polygon (no holes) is O(n).
Later, we will cover Chapter 2 material, which includes an O(n log n) time algorithm for triangulation.
We discuss a sequence of algorithms:
Algorithm 1 is O(n^4), and simply checks all O(n^2) candidate diagonals, testing each in time O(n); thus, in time O(n^3), we find a diagonal (which we know exists), and then repeat, in order to find all n-3 diagonals in total O(n^4). Algorithm 2 is O(n^3), based on the observation that we can limit ourselves to O(n) candidates corresponding to ear diagonals.
Algorithm 3 is an ear-clipping algorithm having worst-case time O(n^2), based on the observation that once one ear is clipped, we can update the "ear tip status" of just the O(1) nearby vertices; it is implemented in the text as Triangulate(). We manually show in detail how this procedure works on an exampls.