COS 526: Advanced
Computer Graphics
Fall 2008

General | Syllabus | Assignments

Assignment 2: Laplacian Surface Editing (due Thurs October 23)

Update: For this assignment, you may want to have a look at the course lecture notes on Laplacian editing or the first few pages of the star report by Sorkine.

In this assignment you will be working with meshes. You may use either as reference or as a starting point the base code for the mesh processing assignment for COS 426. The base code also supplies an OpenGL-based mesh viewer, which you may use to view meshes and/or modify to add your own visualizations; or you may use one of any other viewer you find. Finally, at that link above you will also see sources of models in those formats, and there are also many at Aim@Shape.

You should be able to implement the required features as command-line based programs, as in the first assignment. However, as an optional variation you may choose to implement an interactive application for viewing the results or progress of your algorithm, or for controlling your programs.

As in all assignments, you may also use any other source code as reference material, and also as library source, provided it doesn't directly solve the assigned problems. When you use other people's sources, please reference it in your writeup.

Part 1: Warmup - Mesh Class and Normals

Create a mesh class that can read and write models files in OBJ and OFF formats. In addition to the simplified description of the OBJ format described there, the full version supports normals and texture coordinates. Your implementation need not handle arbitrary meshes -- support only for triangle meshes is sufficient. In addition, your mesh class will need to support an adjacency matrix which allows you to find neighboring vertices for a given vertex. (The easiest way to do this is to simply record a list of neighbors for every vertex.) It is fine to start with the code given for COS426 (linked above) which reads and writes file in several formats (but does not yet support normals, colors and textures in OBJ.)

Compute the normals at every vertex, using each of these methods:

To your normal computations to work, implement the following operations:

Part 2: Constructing the Laplacian Matrix

Set up the system of equations (in matrix form) so that you can convert from a mesh in Cartesian representation into the corresponding Laplacian represention, and back. To test this part, convert a mesh back and forth (setting one vertex to a known position on the way back) and compare the "before" and "after" versions.

For this part of the assignment you will probably want to find a matrix library that can solve systems of equations (or invert matrices). Some possibilities are:

Part 3: Applications

This is the fun part. Implement these applications:

Part 4: (optional) Art Contest

In your writeup you may note one or two example images from your program that you wish to submit to our "art contest". They may be technically cool, or weird, or beautiful. We'll review the art contest images in class.