Assignment #3:
Mesh Parameterization
Submission date: Friday, 11/5/21, 23:59
Objective:
 Implement fixedboundary and freeboundary mesh parameterization.
 Experiment constructing and solving a linear system in geometry processing algorithms.
 Experiment with a linear solver library.
Tasks:

(50%) Implement a fixedboundary parameterization.
You will need to map the mesh boundary to a unit circle is the UV plane centered at the origin.
You could choose the confromal or meanvalue energy.

(50%) Implement a freeboundary Least Squares Conformal (LSCM) prameterization.
Instructions:
 Download example open meshes from here.

Implement a fixedboundary parameterization. You will first map the mesh boundary to a unit circle in
the UV plane. The U and V coordinates are then calculated by solving the Laplace equation with boundary
conditions. This involves two separate linear system solves (Solve separately for U and V).
You could choose from the conformal or meanvalue weights as discussed in the class.
You could use minimesh visualization as your UI. For examole, using button or key click to trigger
the parameterization. Visualize the computed mapping inside the UI or store as a separate 2D mesh.

Implement a freeboundary LSCM parameterization.
The process is again a linear system solve, but in this case the U and V functions are entwined into
a single linear system. To solve the system, you need to fix two vertices. Think how to find the BEST vertex pair for this task.
You could use minimesh visualization as your UI. For examole, using button or key click to trigger the
parameterization. Visualize the computed mapping inside the UI or store as a separate 2D mesh.

For solving the linear system(s) you obtain you can use either the EIGEN library which comes
with minimesh (see below) or another solver, as long as you are WELL familiar with it.

While you should work independently, it is a good idea to compare your results with other students,
to verify code correctness. You can also use the video provided here as a reference.
Solver:
Eigen is quite easy to use, and you are already familiar with many of its types. The most important thing
to be aware of when solving a system with more than ~1000 variables is that you should be using a Sparse
solver. If you are solving the system Ax = b. You would proceed as below:
Eigen::VectorXd b;
Eigen::VectorXd x;
Eigen::SparseMatrix<double> A(m, n);
// populate b
...
// populate A
std::vector<Eigen::Triplet<double>> A_elem;
for (nonzero elements) {
A_elem.push_back( Eigen::Triplet<double>(row, column, value) );
}
A.setFromTriplets(A_elem.begin(), A_elem.end());
// solve using your prefered solver.
// For symmetric systems use LDLT or LLT
// For nonsymmetric systems use PartialPivLU or FullPivLU
Eigen::SimplicialLDLT< Eigen::SparseMatrix<double> > solver;
// Call this only once for each value of A
solver.compute(A);
// Call this as many times as you want for one or different values of b,
// as long as A is not changed.
x = solver.solve(b);
// Remember that calling solver.compute() is much more expensive that solver.solve().
// Therefore, if the matrix A has not changed, be careful not to call solver.compute()
// more than required.
Submission:
 Write a README file containing your name and how to run your code.
 Use the same procedure as assignment 1 to use the handin system to submit your assignment.
 Don't forget to hand in your assignment by Friday, 11/5/21, at 23:59.
You can use your grace days (if you still have them). No late assignments, beyond those, will be accepted.
This assignment is 15% of your final grade.