Computer Graphics
Summer 2006
G22.2270-001

Tuesdays, 6pm - 8:20pm
WWH 101



Assigment 4
DUE: Monday 7/24/06 midnight (11:59pm)
Note the date change!

In this assignment you will implement a simple system for mesh modification and refinement.

Your program should load a mesh from an OBJ file (all fields other than vertex and face definitions can be ignored).  The filename should NOT be hard coded - make it a command line argument instead. Example meshes for testing are given below.

Your program should implement the half-edge mesh data structure for arbitrary polygonal meshes. You can assume that the input mesh is a manifold mesh (but faces are not necessarily triangles).
The mesh should be displayed with lighting enabled, using at least two lights. The user should be able to rotate the mesh using the trackball interface. See below for the implementation.


User Interface

Implement the following operations:
• Mouse click : select a mesh polygon (the selected polygon is highlighted)
• Key 'D' : Remove the selected polygon, correctly adjusting the mesh data structure.
• Key 'T'  : Triangulate the mesh ( all polygons of the mesh are converted to triangles). You can do this by choosing an arbitrary vertex and connecting it to all vertices not adjacent to it.



• Key 'S' : the Loop subdivision algorithm is applied to the mesh once (You should allow multiple applications if subdivision - the mesh will get more refined with every key press). The details of Loop  subdivision implementation will be discussed at the lecture.  


Some points to note:

Related Files

1. Trackball Interface :
2. Example meshes
3. Selection example







Adapted from one of Denis Zorin's assignments.