Assignments | Course Home | Schedule & Lecture Notes

Saint Louis University

Computer Science 493
Special Topics: Computational Geometry

Michael Goldwasser

Fall 2007

Dept. of Math & Computer Science

Homework Assignment 02

Triangulating a Polygon


Overview

Topic: Triangulating a Polygon
Related Reading: Ch. 3
Due: Friday, 26 October 2007, 4:10pm

Please make sure you adhere to the policies on academic integrity.


Overview

The goal of this assignment is to implement the algorithm for triangulating a simple polygon, as described in Chapter 3 of our text book. This algorithm proceeds by breaking the initial polygon into one or more monotone polygon, and then by independently triangulating each of those monotone pieces.

Files we are providing

Repository: source code

Documentation is embedded directly in the source code, however we provide a brief overview of the major components.

Examples

The red lines in the folloiwng diagrams are added during the phase of divising into monotone polygons. The green lines are added when triangulating those monotonoe polygons.

filename original monotone triangulated
page54.txt
rectilinearSimple.txt
rectilinear.txt

Extra Challenges

You are only required to implement the triangulation for a subdivision which is assumed to represent a simple polygon (without holes). However, the end of the chapter in the book discusses how this very same approch can be used to triangulate an arbitrary plana subdivision. Design the triangulate(subdivision) to work with arbitrary DCEL configurations.

The same driver can be used for the more general case, giving a file that gives a complete list of edges (in arbitrary order).

Here are a few examples, taken from figures in the book. Please note that the triangulation that results from the sweepline algorithm is not actually the one shown in the book.

filename original monotone triangulated
page58.txt
page59.txt

Michael Goldwasser
CSCI 493, Fall 2007
Last modified: Friday, 12 October 2007
Assignments | Course Home | Schedule & Lecture Notes