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 03

Triangulating a Polygon


Overview

Topic: Computing the Delaunay Triangulation
Related Reading: Ch. 9
Due: Monday, 3 December 2007

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


Overview

Implement the algorithm described in Chapter 9 of our text book. However, please do not shuffle the original point set; insert points in the order given. The randomization is important for the general analysis, but it will be easier to test your software by using a fixed order.

Your goal is to implement the function

def computeDelaunay(points, animationWidth=None):
    """Return a DCEL representing the delaunay triangulation of given container of Points.

    animationWidth is the width of a canvas for animation (default None designates no animaion)
    """
in the file delaunay.py. By default, you are not responsible for any graphics. So long as you return a valid DCEL instance, our driver will render the final result. However, for a more impressive program, animate the construction as you go in a separate canvas of width animateWidth.

Files we are providing

Repository: source code

Our driver is similar to the convex hull one in that it lets you either specified a fixed point set from an input file, or to generate one randomly. Usage is:

python driver.py [inputfile]  [animationWidth]


Sample Images

These are examples of the final DCEL images (that is, the result after stripping away the outer bounding triangle from the construction algorithm).

A single input point
Two input points
Four points lying on a common circle
from left side of page 193 of our text
from right side of page 193 of our text
from O'Rourke text (page 190)
Data set with degeneracies

Michael Goldwasser
CSCI 493, Fall 2007
Last modified: Wednesday, 28 November 2007
Assignments | Course Home | Schedule & Lecture Notes