It has been some time since I last made a post. I have been a bit busy with college and some personal projects, but I have some time now to talk about the last subject of what I wanted to share about physics: Elastic collision.
Just like previously, let’s take a look at what Wikipedia has to say about Elastic Collision:
An elastic collision is an encounter between two bodies in which the total kinetic energy of the two bodies after the encounter is equal to their total kinetic energy before the encounter. Elastic collisions occur only if there is no net conversion of kinetic energy into other forms.
During the collision of small objects, kinetic energy is first converted to potential energy associated with a repulsive force between the particles (when the particles move against this force, i.e. the angle between the force and the relative velocity is obtuse), then this potential energy is converted back to kinetic energy (when the particles move with this force, i.e. the angle between the force and the relative velocity is acute).
To fully understand this, you must understand what kinetic energy is. I’ll let you follow the link in the Wikipedia quote if you want a broad explanation on the matter, but for the most basic explanation, you can think of it that every moving object has energy due to its motion. This energy can be transferred to another object on impact and that is exactly what we are going to do here.
To calculate the new motion of an object after collision, we will need to know at least the mass and the current velocity. Let’s initialize some spheres for our simulation:
for(int i =