16 of 16 written
Physics Engines
How physics engines work on the inside: the math, contact optimization, XPBD, and GPU-scale simulation.
Orientation
The Physics Engine Landscape
A cited map of MuJoCo, PhysX/Isaac, Drake, Bullet, Brax, Warp, Newton, RaiSim, and Genesis: what they share, and the two axes that set them apart.
What a Physics Engine Actually Computes
The simulation loop: collide, solve, integrate, and where every later chapter fits.
Mathematical Foundations
Rotations: SO(3), Quaternions, and the Exponential Map
Rotation matrices, quaternions, angular velocity, and a live gimbal-lock singularity you can drag into.
Spatial Algebra: Twists, Wrenches, and se(3)
Featherstone's 6D notation that folds linear and angular quantities into one object, with a planar twist you can steer.
Rigid-Body Dynamics: Inertia and the Mass Matrix
Newton-Euler equations, the inertia tensor, and how the configuration-dependent mass matrix arises, shown on a 2-link arm.
Maximal vs Minimal Coordinates
The core representational choice: parametrize by the degrees of freedom, or by every body plus explicit constraints. Two live pendulums make the difference (and the drift) visible.
Equations of Motion
The Manipulator Equation
Deriving M(q)q̈ + C(q,q̇)q̇ + g = τ two ways, and a live decomposition of joint torque into inertial, Coriolis, and gravity terms.
Featherstone: ABA, CRBA, and RNEA
The O(n) articulated-body algorithm at the heart of minimal-coordinate engines, and why form-and-invert is O(n³).
Time Integration
Collision Detection
Contact & Constraints
Contact as Complementarity: LCP and Signorini
Non-penetration as a complementarity condition, and where the LCP formulation comes from.
The Friction Cone and Convex Contact Optimization
Coulomb's cone, its linearized-pyramid vs true second-order-cone forms, and the convex relaxations used by MuJoCo and Drake.