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

Implementaion of a user-interactive deformation of 3D meshes. Mesh vertices can be re-positioned by clicking and dragging. The system will update the rest of the mesh in response to these user interactions such that it moves as-rigidly-as-possible (i.e. the deformation it exhibits is close to a rigid transformation). The end result is a deformation that looks physically-plausible, as if the mesh has an underlying rig / skeletal armature. To achieve this goal, the deformation process will be formulated as an optimization problem which alternates between estimating the best-fit rigid transformation for each mesh vertex and solving a sparse linear system to find new mesh vertex positions.

Algorithm

Each time the user initiates an interaction, the code will do the following:

  1. Initialize
    • Set an initial value for the new vertex positions p'.

    • Build the L matrix
    • Determine the one-ring neighbors of each vertex.

    • Calculate the cotangent weight w for each vertex.

    • Fill in the L matrix entries.

    • Apply the user constraints by deleting rows/columns from L.

    • Pre-compute the decomposition of the L matrix
  2. Iterate between
    • Determining the best-fit rotation transformation R for the moved point p' from original point p.
    • Optimize the position p' given p and R by solving a sparse linear system. The right-hand side of the equation is updated accordingly.

Note that for simplicity, the code to work on closed, manifold meshes.

User controls: the controls offered by the starter code are:

Example Video