This is a simple one-dimensional collision simulator demonstrating the principles of the conservation of momentum.  The user can define the initial velocities and masses for both balls as well as the coefficient of restitution, ε, for the collision.

  • If ε = 1, the collision is elastic and the total kinetic energy is conserved as well as the momentum.
  • If ε = 0, the collision is perfectly inelastic and the two balls will stick together.

The simulation will also handle cases where ε > 1 representing a scenario in which energy is added to the system upon collision.

The collision resolution is determined by simultaneous solution of the two linear equations,

m1v1i + m2v2i = m1v1f + m2v2f

v2f-v1f = ε(v1i-v2i), 

where the subscript i refers to the initial velocity and the subscript f refers to the final velocity.

The simulation can be paused by pressing the spacebar, permitting an opportunity in the classroom to make predictions and validate those predictions.  If you have recommendations on how this demo can be improved from either a functional or pedagogical standpoint, please leave me a comment below.

Development log

Leave a comment

Log in with itch.io to leave a comment.