The three-dimensional Collision of two Spheres
The central elastic to perfectly inelastic collision between two spheres is a fundamental function of a physics engine. Here, I explain the physics, the mathematics, and provide a complete implementation in C++.