Shapes & spaces

As rigid as possible triangle mesh deformation calculator from handle targets

Deform a small triangular surface toward positional handles while fitting local rotations and retaining the original connectivity.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Deform a small triangular surface toward positional handles while fitting local rotations and retaining the original connectivity.

THE FORMULAE = sum_ij w_ij ||(v_i−v_j) − R_i(p_i−p_j)||²; R_i in SO(3)

A worked example

Translate all four corners of the unit square by (1,0,0). Every edge difference is unchanged, the identity rotations fit exactly, and the ARAP energy is zero.

Good to know

Connected manifold mesh up to50 vertices/100 faces, positive uniform edge weights, at least one pinned handle and enough constraints to eliminate unresolved rigid modes. Local rotation/global constrained solve with energy-decrease and iterate caps. Return a local stationary deformation only; no global minimum or self-intersection guarantee.

Deformation rather than simplification

An as rigid as possible deformation changes vertex positions while retaining which vertices and faces are connected. The requested handle positions express where selected vertices must go. Other vertices move to accommodate those constraints. The objective penalizes local changes that cannot be explained by rotations of the original edge neighborhoods.

This differs from mesh decimation, which removes vertices or edges and changes the representation itself. It also differs from a single rigid registration: different neighborhoods may rotate differently. The resulting surface can bend, but those rotations compete wherever adjacent neighborhoods share edges, creating a global deformation problem rather than independent local placements.

As rigid as possible triangle mesh deformation from handle targetsRest squareTranslate +1 in xE = 0
Scroll across to see the full diagram.
Translate all four corners of the unit square by (1,0,0). Every edge difference is unchanged, the identity rotations fit exactly, and the ARAP energy is zero.

Compare this with the Triangle mesh quadric error simplification calculator with edge collapse history. Move vertices under positional handles while retaining the original connectivity and minimizing local rigidity energy; the existing page removes edges/faces to simplify a mesh.

What the edge energy measures

For each rest edge, compare its deformed vector with the rest vector after a fitted rotation. Positive weights specify how strongly each edge contributes. Uniform weights are used in this bounded model so the energy stays nonnegative without needing special handling of negative cotangent weights on obtuse triangles.

The rotation is constrained to have determinant positive one. An unconstrained orthogonal fit could reflect a neighborhood, which would contradict the intended local rigidity model. A small edge residual does not directly measure volume preservation, area distortion or material stress. Those are different geometric or physical quantities and must not be inferred from the displayed objective.

Preparing handles and a valid mesh

Vertex rows give three-dimensional coordinates, and triangle rows reference those positions by zero-based index. Reject repeated or degenerate faces, disconnected pieces and unsupported nonmanifold structures before fitting. Each handle supplies one vertex index and its desired spatial position. Repeated contradictory targets for the same vertex are an input error.

Constraints must eliminate unresolved free motions in the global solve. A lone position handle can leave rotational freedoms, depending on the formulation and neighborhood structure. If the linear subproblem remains singular, provide additional independent handles. Artificially anchoring an extra hidden vertex would change the requested problem and is not an acceptable way to conceal that ambiguity.

Alternating rotations and positions

The local step holds positions fixed and obtains each best rotation from a small singular-value decomposition. The global step holds rotations fixed and solves the resulting constrained quadratic problem for positions. Repeating these two steps should decrease or preserve the same consistently defined energy, within the stated numerical tolerance.

Both subproblems are straightforward, but their coupled objective is not globally convex. Initialization can affect the stationary point. Consequently, a converged result is a local deformation, not proof of the least possible energy among every embedding. Report the stopping rule, iteration count, handle residual and any unexpected energy increase rather than labeling an unfinished iteration optimal.

A zero-energy translation example

The default rest mesh is a unit square split into two triangles. Every vertex is a handle translated one unit along the horizontal axis. The deformed coordinates are therefore completely determined. Choosing the identity rotation at every vertex reproduces all rest edge vectors exactly, because the common translation cancels when endpoints are subtracted.

Each squared edge residual is zero, so the total energy is zero for any positive edge weights. This is a useful implementation check because it combines handle enforcement with the expected rigid-motion invariance. It does not test whether a nontrivial bending problem reaches the best local minimum; separate examples with free interior vertices are needed for that question.

Checking the returned surface

Inspect hard-handle residuals first: a visually plausible deformation that misses a required target is not a solution of the entered constrained problem. Then inspect the energy history and the residual of each global linear solve. Small changes in energy alone can occur while an ill-conditioned position system remains poorly resolved.

Face normals and triangle areas provide additional warnings about collapsed or inverted faces. Those warnings should accompany the output rather than silently deleting faces or changing connectivity. Local rigidity energy does not prevent distant parts of the surface from intersecting, so a separate self-intersection check is appropriate when the deformed shape will be exported or manufactured.

Interpreting size and convergence limits

This calculator is designed for small educational meshes, not production sculpting assets. Limits on vertices, faces and iterations make the alternating solves inspectable and keep a failed computation distinguishable from a completed result. A resource cap says the bounded procedure did not finish; it does not prove the handles are geometrically impossible.

The model contains no elasticity law, collision response or time integration. It is a geometric editing objective. Use the rest/deformed comparison and the reported rotations to understand which neighborhoods bend and which stretch. For physical engineering predictions, the governing material model and boundary conditions would need to be supplied and validated separately.

A few questions, answered

Does ARAP preserve volume?

No. The edge-based local rigidity objective does not impose a volume constraint.

Can the mesh intersect itself?

Yes. Local energy reduction does not provide a global collision-free embedding guarantee.

Why are more handles requested?

The constrained position solve still has unresolved degrees of freedom or is numerically singular.

Is the result globally optimal?

No. Alternating local and global steps generally find a local stationary deformation.

Find your calculator

Start typing to explore the library.