aboutsummaryrefslogtreecommitdiff

As-Rigid-As-Possible Surface Modeling (ARAP)

README

Your README (5 points) should describe:

  1. How to run your program, such as how to load a specific mesh; and

To run my program, you use the basic clion run configuration. Use release mode for best performance.

There are two parameters you must modify: 1) the number of iterations and 2) the mesh to load. Both are modifiable on the first two lines in the arap.cpp's init function. Use an integer for the num iterations and a string to the path for the mesh.

  1. Briefly, all the features your code implements, including any known bugs.

I implemented the basics of arap under the move() function. The order of the overall implementation is as follows: - Estimate pprime from p. - When the number of anchors changes: - Compute the cotan weights. - Define the constraints map. - Compute the L matrix. - For the number of iterations: - Estimate the rotation matrices. - Estimate the positions. - Update the mesh vertices.

The number of iterations is statically defined as a parameter.

You should also have all the example videos described in the next section embedded in your README.

Example Videos

For this project, we ask that you demonstrate to us that your program achieves the following behavior specifications. You will do so by providing ≥1 video(s) per specification point below.

Program Specification My Example
Anchoring exactly one point, then moving that point, results in perfectly rigid motion (mostly translation, though some rotation for smaller meshes is acceptable).
Anchoring exactly two points, then rotating one point around the other at a fixed distance, results in perfectly rigid rotation.
Deformations are "permanent"; i.e. un-anchoring previously moved points leaves the mesh in its deformed state, and further deformations can be made on the deformed mesh.
You should be able to make the armadillo wave.
Attempting to deform tetrahedron.obj should not cause it to collapse or behave erratically.
Attempting to deform a (large) mesh like bunny.obj or peter.obj should not cause your code to crash.

Extra Feature: Parallelization

For the solving algorithm, I divided the dimensions and parallelized my code using the QTFramework to concurrently calculate the estimated positions. See line 286 in arap.c for the implementation. The video below shows both implementations (concurrent and normal) when deforming bunny.obj, a large mesh, at 1000 iterations. For this case, it appears the concurrent implementation is faster by 2 seconds (9sec vs 11sec).

Program Specification Video
Modifying Bunny at 1000 iterations with no concurrent framework.
Modifying Bunny at 1000 iterations using QTConcurrent blocking-map.

Citations/references

  • https://igl.ethz.ch/projects/deformation-survey/deformation_survey.pdf for how to handle deformed triangles
  • https://github.com/cheind for how to create a space matrix efficiently using triplets
  • github co-pilot was enabled in my clion ide for code suggestions