Affine Body Dynamics
Previously, we reviewed rigid body dynamics and implemented a simple solver using explicit integration.
When dealing with many rigid bodies — especially with complex geometry and dense contact — it’s natural to attempt IPC for contact resolution. However, representing a rigid body by its position and rotation creates a challenge: step size filtering in Newton’s method becomes nonlinear in , due to the nonlinearity of quaternion update.
Let the state of a rigid body be denoted by , where is the center of mass and is a unit quaternion representing orientation. During a Newton iteration, let the update direction be with step size , so that the updated state is given by . The position of a vertex initially located at is then transformed to:
Expanding this shows is nonlinear in :
and since depends nonlinearly on , so does . Hence, linear CCD may fail to guarantee intersection-free motion.
We could model rigid bodies as very stiff soft bodies (e.g., mass-spring or hyperelastic), but this is inefficient and negates the DOF-reduction benefit.
Affine Body Dynamics (ABD) [Lan et al. 2022] addresses this: instead of strict rigidity, we allow tiny affine deformations for each vertex of the body where denotes the rest position. The body state is where , so the vertex position becomes:
with where denotes the Kronecker product.
This linearity makes linearly dependent on the optimization step size , enabling robust linear CCD.
Let be the augmented IPC energy. Original IPC solves:
ABD solves in a reduced subspace:
Using the chain rule:
, we can solve Newton Optimization direction by solving the linear system .
With these, we can implement ABD using implicit Euler integration for a simple 2D case.
Before implementation, consider this geometric view: in 2D, an affine transformation is determined by 3 points. Choosing a triangle per rigid body, we can interpolate all vertices via barycentric coordinates. The triangle drives the simulation; the original mesh is used for collisions. This yields a reduced DOF system where the triangle controls motion—essentially what ABD does.