Skip to content

Two-body collision simulator

Two bodies move in a plane and collide. Adjusting the masses, the speeds and the angle between the two directions reveals what is conserved in a collision and what is not. The view is fixed and centred on the point of impact: the bodies enter the scene, collide at the centre and leave through the edges, while the histograms below track momentum and kinetic energy in real time.

body 1body 2centre of mass

1.00×

The two bodies are treated as point masses: they are drawn as spheres of radius r=m3r = \sqrt[3]{m} only to make them visible and to keep them from overlapping, but the collision is computed with no rotation and no deformation. Since both bodies travel in a straight line at constant speed towards the same meeting point, the line joining their centres is parallel to the relative velocity at every instant: the impact is therefore always central, and the radius of the spheres does not affect the final velocities.

Total momentum is conserved in every collision:

m1v1+m2v2=m1v1+m2v2m_1\mathbf{v}_1 + m_2\mathbf{v}_2 = m_1\mathbf{v}_1' + m_2\mathbf{v}_2'

Kinetic energy, on the other hand, is conserved only in the elastic case. The coefficient of restitution ee measures what fraction of the relative velocity is given back after impact:

e=v2v1v2v1e = \frac{|\mathbf{v}_2' - \mathbf{v}_1'|}{|\mathbf{v}_2 - \mathbf{v}_1|}
  • e=1e = 1: elastic collision, kinetic energy is conserved;
  • 0<e<10 < e < 1: inelastic collision, some energy becomes heat, sound and deformation;
  • e=0e = 0: perfectly inelastic collision, the two bodies move on together.

The dissipated energy is

ΔE=12μ(1e2)Δv2,μ=m1m2m1+m2\Delta E = \tfrac{1}{2}\,\mu\,(1 - e^2)\,|\Delta \mathbf{v}|^2, \qquad \mu = \frac{m_1 m_2}{m_1 + m_2}

where μ\mu is the reduced mass. The dependence is on e2e^2, not on ee: going from e=1e = 1 to e=0.9e = 0.9 already loses 19% of the relative kinetic energy.

The view is fixed and centred on the point of impact. The purple marker is the centre of mass of the system: it crosses the scene in uniform straight-line motion, before and after the collision, entirely unaffected by it. This follows directly from conservation of momentum, since no external force acts on the system. The trails make it visible: the paths of the two bodies break at the point of impact, the path of the centre of mass does not.

In a perfectly inelastic collision the two bodies weld into a single sphere of radius m1+m23\sqrt[3]{m_1 + m_2}, split by a plane perpendicular to the impact direction into a blue and a red portion whose areas are proportional to the two masses. This is only a graphical convention to show where each part came from: the model is still that of point masses, and the merged body translates without rotating.