Assignment #1:

Sqrt(3) Subdivision

# Submission date: Friday, Jan 27 2012, 23:59

Objective:

Learn to use a real-life medium size programming environment & data structure for meshes.

1.Experiment with the GUI and the mesh processing tools.

2. Perform simple data-structure operations.

Instructions:

The assignment consists of two components: installation of Meshlab and coding.

To compile the package under Windows (Visual Studio 2010), you should have Qt (ver 4.7.1 or later) and Qt VS Add-in installed on your machine (you can download both here). If you're new to Qt, please follow the instructions. It's important that you set \$QTDIR environment variable to point to your Qt installation location (e.g. "C:/Qt/4.7.1")

For other building options (e.g. Linux/MacOS, other compilers) please refer to MeshLab website

The main solution file is meshlab_mini.sln. The structure of folders on your hard drive should look like

```.../524/meshlab
.../524/meshlab/src/
.../524/vcglib
```

You can find a guide how to create simple plugins for MeshLab here or (old copy of documentation) here.

Meshlab has a plugin-based architecture, so you will implement your subdivision method in a separate plugin (filter). For your convenience, in the solution there is a sample filter project which you can modify.

Meshlab uses data structures from VCGLib, you can find a good intro on it here.

Coding:You should implement Sqrt(3) subdivision scheme for closed meshes as a filter plugin for MeshLab.

The algorithm is explained in details in the original paper, here it is in a nutshell:

One iteration of Sqrt(3) subdivision scheme for closed meshes goes like this:
1. For each triangle < pi, pj, pk > in the original mesh, split it into 3 triangles by inserting a new vertex located at its center:

2. Flip every original edge in the mesh (i.e. replace every two triangles ABC and BCD with triangles ABD and ADC, if BC is an edge in the original mesh).

3. Relaxation stage. For each old vertex p with valence n, calculate its new position S(p) using locations pi of its direct neighbors on the unrefined mesh:

Your plugin should create a menu item in Filters|Smoothing, Fairing and Deformation called Sqrt(3) subdivision, take only necessary input parameters, and perform one iteration of the algorithm on the loaded mesh. The algorithm should work correctly if run multiple times from the menu.

BONUS: You can get extra marks for implementing the sqrt(3) subdivision scheme that performs correctly on meshes with boundaries. For the description of this, please refer to the original paper, chapter 5 ("Boundaries").

Inputs:

A small set of inputs to debug your algorithm can be found here. It contains coarse meshes with and without boundary. More meshes can be downloaded from, e.g. aim@shape repository.

Submission:

Send an email to Mikhail (bmpix at cs dot ubc dot ca) with the subject “DGP assign1” containing a zip file with your plugin. Please do not include Meshlab itself or any binaries.

In the email write your name and contact e-mail address.

All emails should be received by Friday, 1/27/2012, at 23:59.

Late assignments policy:You have 3 grace days total for all of your assignments, you can use them whenever you want during the course.

This assignment is 10% of your final grade.

Good luck!