Elastic Collision
Theo McGee
8/17/2020
Collision in 1D
- Kinetic energy of a moving object = 1/2mv^2
- Momentum of a moving object = mv
- m = mass of the object, v = the velocity of the object
- In elastic collision, both the kinetic energy and the momentum of the system are conserved (the total is the same before and after the collision)
- If the mass of the objects are the same, the equations can be simplified: two colliding objects exchange velocity with each other.
Collision in 2D
- In 2d, you can figure out if two objects are colliding by using the Pythagorus Theorum to find the distance between the center of the two balls.
- You can use arctangent to find the angle of the axis of collision.
- You can then decompose the velocity vector into two components: 1 parallel to the axis of collision, the other perpendicular.
- You can exchange the velocity components parallel to the axis of collision of the two balls that are colliding just like in the 1d problem. The perpindicular component does not change.
- After that, you can find the new speed and the new angle of the two colliding balls.
- You can find the math that I used by looking at the code by right clicking and then clicking inspect.
❮
❯