### Overview

In this assignment you will implement a Laplacian mesh representation and use it for several applications. The following is a list of features that you may implement -- the features in bold face are required, and the others are optional. In addition to implementing these features, you should submit an image generated by your program to the art contest. The winner will get extra credit and a note on the course web page.
• Basic Laplacian mesh representation: Fill in the definition and implementation for the R3LaplacianMesh class to make it store the Laplacian matrix and the Laplacian coordinates for every vertex, as well as the info that it already stores.
• Mesh reconstruction: Test your implementation of the Laplacian mesh by reconstructing the original Cartesian coordinates from the Laplacian coordinates (after anchoring the position of one vertex). Demonstrate this feature by reading a mesh, computing the Laplacian mesh, reconstructing a new mesh, and writing it to a new file (e.g., `lap input.off -output_mesh output.off -anchor 0 0 0 0`).
• Mesh deformation: Use the Laplacian mesh representation to deform a mesh while maintaining local details. Your program should read a mesh and a set of anchors (or specify anchors interactively) and output a new mesh with vertices "anchored" at given positions. (e.g., `lap input.off -output_mesh output.off -anchor 0 0 0 0 -anchor 1 10 0 0`).
• Parameterization: Use the Laplacian mesh representation to produce a 2D parameterization for mesh vertices. Remove two neighboring triangles from a mesh. Set the coordinates for the 4 vertices to be the corners of a unit square (2D). Now map the remaining vertices to the interior of the square by setting the Laplacian to zero and solving for x and y coordinates of the remaining vertices. D
• Membrane surface:. Use the Laplacian mesh representation to output a new mesh with vertices "anchored" at given positions and the other vertices interpolating them with soap-bubble-like membrane (Laplacian = 0).
• Surface function interpolation: Use the Laplacian to interpolate values of a funciton specified at a subset of vertices to estimate values at all vertices. Input a mesh and a function (a file with one value per vertex, where most of the values are 0, indicating that the value is to be interpolated) and outputs a function with values for all vertices.
• Mean curvature: Use the Laplacian mesh representation to estimate the mean curvature at every vertex. You should provide a feature to your batch program that outputs the mean curvatures to a file `curvature.txt` with one value per vertex on its own line. Then you can use `lap foo.off -input_function curvature.txt` to render those values as colors on the mesh (hit 'F' to toggle display of the function).
• Circular region of interest: Provide a different interface to your mesh deformation feature that allows the user to select a vertex V and a radius R for the region of interest. Your program should anchor all vertices beyond geodesic distance R from V, allow the user to move the position of V, and then recompute the Cartesian coordinates for all other vertices inside the region of interest. To implement this feature, you will need to implement an approximate one-to-many geodesic distance algorithm based on Dijkstra's algorithm to find vertices within the region of interest.
• Texture mapping: Use the parameterization feature described above to produce texture coordinates for each vertex. Then, render an image of the mesh with a checkerboard texture applied according to those texture coordinates.
• Rotation of coordinate frames: Augment your mesh deformation code to perform better for large rotations. To do this, apply the mesh deformation as usual, estimate a local coordinate frame for every vertex, rotate the Laplacian coordinates to the new local coordinate frame, and then recompute the Cartesian coordinates from the rotated Laplacian coordinates (as in section 4.3 of [sorkine05]).
• Eigenanalysis of the Laplacian: Compute eigenvalues and eigenvectors of the symmetric Laplacian matrix. Output the eigenvectors to a set of files and visualize them.

To get started, you can use the code in (cos526_assn2.zip). This C++ code provides the basic infrastructre for a Laplacian mesh class (R3LaplacianMesh.cpp) that can read and write files in off, ply, and obj formats. It also provides a simple program (lap) for editing meshes and viewing properties on meshes. You will probably need to augment this program to include command line arguments of your own to turn on and off specific features and/or provide parameters for specific applications.

### What to Submit

You should submit one zip file named `PUID_cos526_assn2.zip` (i.e. funk_cos526_assn2.zip) with the following internal directory structure:
• `PUID_cos526_assn1/`
• `writeup.html` (your writeup, see the description below)
• `Makefile` (a unix Makefile useful for making output files from input files)
• `input/` (all the input data for the examples in your writeup)
• `output/` (all the output images for the examples in your writeup)
• `art/` (all images submitted for the art contest)
• `src/` (the complete source code)

`writeup.html` should be an HTML document demonstrating the effects of the features you have implemented. There should be one "section" per feature. with a brief description of what you implemented and some images showing your results. For all features, it is sufficient to include images of your input and output -- you do not have to submit the mesh files. Wherever possible, you should show results for at least two sets of inputs.

The `src` directory should have all code required to compile and link your program (including the files provided with the assignment), along with a Visual Studio Solution file and a Makefile to rebuild the code.

Please submit images in JPEG format to save space. Also, to further save space, please remove binaries and backup files from the src directory (i.e., run `make distclean` (under Mac OS) and execute "Clean Solution" on the "Build menu" in MS Visual Studio) before submitting.