# Which formula for elastic collision?

When researching a bit about elastic collisions, I've been confused about how many different ways there are to do this. I've seen multiple methods, some of which are extremely complex (using sine and cosine) and some which are more simple.

For example, this StackOverflow answer provides a simple solution, while this tutplus article uses a more complex solution.

I'm trying to make a simple simulation which there are balls that bouncing around borders and other balls. What formula should I use and what are the differences between them?

• Complexity of the computation will increase if both the colliding objects are moving and-or if they have different masses and-or sizes. Mar 2, 2019 at 8:30
• The stackoverflow one seems simple because ut uses the right objects for the job: vectors. Mar 2, 2019 at 8:33
• What exactly are you looking for or trying calculate? Mar 2, 2019 at 8:38
• @TechDroid I'm wondering why there are different methods of calculating elastic collisions, why they differ, and which one would be the best to use. Mar 2, 2019 at 9:03
• The velocity component of the formula of momentum is a vector, the sine and cosine involved is meant to calculate the velocity vector component of the masses involved parallel to each other. You don't get the sines and cosines only when the collision is head on aligned. Elastic collision conserves kinetic energy too, so you'll have to to calculatr for final kinetic energy if required. Mar 2, 2019 at 9:18