Contents · Physics Engines
Part 0 · Orientation
Part 1 · Mathematical Foundations
Part 2 · Equations of Motion
Part 3 · Time Integration
Part 4 · Collision Detection
Part 5 · Contact & Constraints
- Contact as Complementarity: LCP and Signorini
- The Friction Cone and Convex Contact Optimization
Part 6 · Constraint Solvers
Part 7 · Position-Based Dynamics
Part 8 · GPU & Parallelism
Part 9 · Differentiable Simulation
Part 5 · Contact & Constraints
Contact as Complementarity: LCP and Signorini
A spring obeys an equality: its force is a fixed function of displacement, and it acts in both directions. Contact obeys nothing so tidy. A body can push on what it touches but never pull it back, and it feels a force only at the instant of contact. That one-sidedness is why the honest model of contact is an inequality, not an equation.
The Signorini condition
Let be the gap at contact and the normal contact impulse there. Neither may be negative: bodies cannot interpenetrate, so , and contact cannot pull, so . And the two are complementary, since a force acts only when the gap is closed:
Either there is a gap and no force, or contact and a nonnegative force, never both. When bodies are already touching the same law holds one derivative up, on the normal relative velocity :
The feasible set is not a curve but an L: the two positive axes glued at the origin.1
From condition to LCP
A solver works over a timestep at the velocity and impulse level, across all contacts at once. The post-step normal velocities depend affinely on the stacked impulses ,
where is the contact Jacobian, the mass matrix, the contact-space inverse inertia (the Delassus operator), and collects the bias from external and gravitational impulses. Stacking the Signorini condition over every contact gives a Linear Complementarity Problem (LCP): find with
which spelled out elementwise is
Same three ingredients as the scalar condition, now coupled through . Add Coulomb friction, whose force lives in a cone tied to the very same normal impulse, and you recover the classic time-stepping LCP formulations of rigid-body contact.23 That cone is the friction chapter's subject; here it is enough that friction rides on the same complementarity.
A worked two-contact LCP
Take a concrete system:
Complementarity forces an active-set choice: each contact is either active () or inactive (). Guess contact active and contact inactive, so set and . The active row of collapses to a scalar equation:
Back-substitute to recover the full pair:
Now check every condition:
The guess is consistent, so it is the solution: contact carries a positive impulse and stays closed (), while contact separates () and carries none. Guessing wrong is self-correcting. Try both contacts active, , and you must solve , which gives , violating , so that active set is rejected.
(gap, force) plane (drag the point)
- φ (gap)
- 1.50
- λ (force)
- 1.10
- φ·λ
- 1.65 (must be 0)
separated: gap > 0, force = 0
Valid states form an L: on the axes the product φ·λ is zero. Off the axes you are pushing without contact, or overlapping under load, which the Signorini condition forbids.
Why contact is hard
Nothing here is nonlinear. The difficulty is combinatorial: forces each of contacts onto one of two branches, so there are candidate active sets and only a consistent one solves the problem. Enumerating them, as we did by hand above for , does not scale. The escape is structure. When is symmetric positive semidefinite, the LCP is exactly the optimality condition of the convex program
so the next chapters can drop the enumeration and reach for convex relaxations and iterative solvers instead of guessing active sets.
Footnotes
-
Le Lidec et al., Contact Models in Robotics: a Comparative Analysis (2024). ↩
-
Stewart & Trinkle, An implicit time-stepping scheme for rigid body dynamics with inelastic collisions and Coulomb friction (IJNME 1996). ↩
-
Anitescu & Potra, Formulating Dynamic Multi-Rigid-Body Contact Problems with Friction as Solvable Linear Complementarity Problems (Nonlinear Dynamics 1997). ↩