Assignment #3:
Mesh Parameterization

Submission date: Friday, 11/5/21, 23:59

Objective:

1. Implement fixed-boundary and free-boundary mesh parameterization.
2. Experiment constructing and solving a linear system in geometry processing algorithms.
3. Experiment with a linear solver library.

1. (50%) Implement a fixed-boundary 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 mean-value energy.
2. (50%) Implement a free-boundary Least Squares Conformal (LSCM) prameterization.

Instructions:

2. Implement a fixed-boundary 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 mean-value 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.
3. Implement a free-boundary 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.
4. 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.
5. 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 (non-zero 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 non-symmetric 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: