SUNY Geneseo Department of Computer Science


Drawing Polygons with Holes

Tuesday, April 9

CSci 242, Spring 2013
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Misc

CIT has student jobs for a database programmer and a Web assistant for fall 2013

Exam 2 is Thursday (April 11)

Questions?

Third question on minimum spanning tree problem set (divide-and-conquer algorithm): Just prove or disprove the claim that the given method finds minimum spanning trees, you don’t have to write out the algorithm

Second question: summarize class discussion for why Prim’s algorithm doesn’t need modification, and then find an answer re Kruskal’s

A Greedy Approach to Drawing Holes

Problem: draw a polygon with a hole by filling the space outside the hole with triangles without any triangle overlapping the hole

Polygon with a polygonal hole

Set up the problem by numbering the vertices around the hole and rim of the polygon.

Triangles with edge on hole, on rim, and overlapping hole

Instinct is for a triangulation algorithm to loop through both sets of vertices simultaneously, adding either a hole or rim triangle to a growing set of triangles according to which kind is locally safe; arbitrarily add either if both triangles are safe.

Series of rim triangles followed by hole triangle becomes hole triangle followed by rim triangles

Next

Thursday: hour exam

Tuesday (4/16): GREAT Day, no class (so you can give/hear presentations)

April 18: Introduction to backtracking (not in book)


Next Lecture