This is a Coding Challenge where I attempt to try and code a Collision simulation using the law of conservation of momentum. This Project is avalible on : https://karan-gandhi.github.io/Physics-Collision-Simulator/
Here there are two blocks which collide with each other having a perfectly elastic collision :
Elastic collision of unequal masses.
Elastic collision of equal masses
Elastic collision of masses in a system with a moving frame of reference
Consider particles 1 and 2 with masses m1, m2, and velocities u1, u2 before collision, v1, v2 after collision.
The conservation of the total momentum before and after the collision is expressed by:
Likewise, the conservation of the total kinetic energy is expressed by:
These equations may be solved directly to find v1, v2 when u1, u2 are known:
This simply corresponds to the bodies exchanging their initial velocities to each other.