Handouts:
2/11/09: Algorithm Triangulate(). Geometric primitives.

We go through in detail 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 example.
I give a detailed list of primitives used in Chapter 1. We go into detail on each and give complexities, etc. Some review of basic C syntax. I use some slides that are just snippets from Chapter 1 of O'Rourke, showing and discussing the code fragments and data structures.

Preview of triangulation algorithms: Bottom line -- any simple polygon with n vertices can be triangulated in time O(n) using an algorithm by Bernard Chazelle (hopelessly complex, huge constant in big-Oh, and nobody would want to implement it!). We present instead an O(n log n) algorithm based on decomposing a polygon (using a "sweep" algorithm) into monotone mountains, and then using a simple algorithm on each mountain.