Perfectly elastic & inelastic colliding objects simulation.

Collisions in high-school physics usually happen in one of two ways: perfectly elastic or perfectly inelastic. Elastic means that all kinetic energy is conserved and the objects bounce opposite to each other (first formula on the right). However, inelastic collisions imply that some kinetic energy is lost and therefore the objects move together after the collision (second formula on the right).

Elastic: $$m_1v_{i1} + m_2v_{i2} = m_1v_{f1} + m_2v_{f2}$$ Inelastic: $$m_1v_1 + m_2v_2 = v_f(m_1+m_2)$$


Perfectly Elastic Collisions

These collisions have conservation of kinetic energy (KE = ½mv²). Thus, when two objects collide, both will bounce! Something important here is that two factors matter in collisions: mass and velocity. You can derive this from momentum, which is calculated by $$P=mv$$You can derive momentum from impulse, which is equivalent to momentum and defined by $$P=f \Delta t$$Both formulas result with units kgm/s².

Perfectly Inelastic Collisions

Almost the same thing happens with inelastic collisions, but the objects move together after the collision. Therefore, the result expression is both masses multiplied by their joint velocity.