Exercise no. 1
Interactive Visualization of Topological Distances

Topics: B-rep, half-edge data structure

Due date : 16.12.01


Your goal in this exercise is to implement a simple interactive viewer for polygon meshes. The program should be able to read a polygon mesh object from a file and display it in a viewing window where the user can manipulate the object using an arcball. The user should be able to select a face in the mesh (for example, by clicking on it) and in response the program should color-code the faces in the mesh according to the distance from the selected face. For example, paint the selected face in red, all of its immediate neighbors in yellow, the next ring of neighbors in green, and so forth (feel free to choose your own color coding).

To make your task easier, you may use the arcball viewer program that you wrote in the computer graphics course as a starting point. You will need to implement the parsing of the text-based Wavefront obj format (look here for an informal description), construct the half-edge data structure, implement the selection mechanism, and the necessary breadth-first search.

Input Files

A collection of models in the obj format can be found at ~danix/public/models. Note that some of these models are quite large. For the purposes of this exercise you can ignore everything except vertices and faces, however, if you read in the normals, you'll be able to get smooth shaded objects in your viewer!


Good Luck !