Rigid body simulation
Problems
- Rigid body simulation
Advance the positions, orientations and velocities of rigid bodies over time under forces, collisions, contact and joints.
intro - Continuous collision detection
Find the first time in a time step at which two moving objects touch, so that fast objects do not pass through each other.
core - Penetration depth
The shortest translation that separates two overlapping solids, which gives the contact normal and the overlap distance.
core
Algorithms
- Impulse-based collision response
Change the velocities of two colliding rigid bodies by an impulse along the contact normal whose size makes the restitution law hold.
1 languagesintro - Expanding polytope algorithm
Find the penetration depth and normal of two overlapping convex shapes by growing a polytope inside their Minkowski difference from the final GJK simplex.
1 languagescore - Impulse-based simulation
Simulate all contact, including resting contact, as a series of collision impulses, with friction resolved by integrating along the impulse.
1 languagescore - Projected Gauss-Seidel
Solve a contact problem by sweeping over constraints, solving each for its impulse alone and clamping it to its bounds, for a fixed number of sweeps.
1 languagescore - Sweep and prune
Find overlapping bounding boxes by keeping their interval endpoints sorted per axis and updating the sort incrementally between time steps.
1 languagescore - Approximate convex decomposition
Split a nonconvex mesh into a few nearly convex parts whose concavity is below a tolerance, so that convex collision tests apply to each part.
1 languagesadvanced - Baraff's contact force algorithm
Compute nonnegative contact forces that prevent interpenetration of resting rigid bodies by a pivoting method on a linear complementarity problem.
1 languagesadvanced - Conservative advancement
Advance time by the distance between two bodies divided by a bound on their approaching speed, repeating until they touch or the step ends.
1 languagesadvanced - Lin-Canny closest features algorithm
Track the closest pair of features of two convex polyhedra by walking Voronoi regions. Under coherent motion a call takes few steps, which is observed, not proved.
1 languagesadvanced - Shock propagation
Make tall stacks stable by solving contacts from the ground up in a contact graph and freezing each lower level when solving the one above.
1 languagesadvanced - V-Clip
A robust closest-feature algorithm for convex polyhedra that clips edges against Voronoi regions and also handles penetration.
1 languagesadvanced - Vertex-face and edge-edge continuous collision tests
Find when a moving vertex hits a moving triangle or two edges meet by solving the cubic coplanarity equation and checking the contact point.
1 languagesadvanced
Data structures
- OBB tree
A bounding volume hierarchy of tight oriented boxes fitted by principal axes, tested for overlap with the separating axis test on 15 axes.
1 languagescore - Sphere tree
A hierarchy of spheres that cover an object, often built from the medial axis, used for fast and interruptible collision detection.
1 languagesadvanced - k-DOP tree
A bounding volume hierarchy whose volumes are intersections of k fixed slabs, so that an overlap test compares k/2 pairs of intervals.
1 languagesadvanced
Techniques
- Penalty method for contact
Push overlapping bodies apart with a stiff spring force proportional to the penetration depth, plus damping along the normal.
intro - Baumgarte stabilization
Feed back the constraint position error into the velocity constraint, so that numerical drift of joints and contacts decays over time.
core
Definitions
- Coefficient of restitution
The ratio of the relative normal velocity after a collision to that before it, from 0 for a perfectly plastic to 1 for an elastic collision.
intro - Contact manifold
The set of contact points with a shared normal and penetration depths between two touching bodies, kept across frames for stable stacking.
core
Models
- Coulomb friction law
The tangential contact force is at most mu times the normal force and opposes sliding; it reaches the bound when the contact slides.
intro