Homework 4 due
4/30/09
This assignment is a
programming only assignment. The goal is
to load a surface defined as an obj file and to
simplify the surface down to a specified number of polygons. To do so, you should implement a
mesh-traversal data structure (I suggest the half-edge data structure) and an
edge-collapse operator for the surface.
This edge-collapse should preserve the topology of the surface. To simplify the assignment, we will not be
using the distance to adjacent planes as the error metric since degenerate
cases make the problem more difficult to solve.
Instead, we will use distance to vertices with the derivation below. You should collapse edges in the order
dictated by the error function below and place new vertices at the minimum of
this error function.
Let be the error function
associated with each vertex of the mesh
whose minimizer is given by
which is 5
numbers. Furthermore, to create the
combined quadratic for the union of two vertices, we simply need to these 5
numbers together for the different vertices.
Your program should
take two arguments: the first will be the name of the obj
file to simplify and the second should be the desired number of polygons in the
simplified surface
We will be using a simplified form of obj file for this project. The file is a text-based, format where each line either starts with a