Durham Hackathon

A short intro to numerical simulation

View on GitHub

Previous step

How about balls which aren’t perfectly elastic?

A real ball will never be perfectly elastic. That means when it collides with something, the wall or another ball, it will lose some kinetic energy. This energy is lost for example as sound and heat. We can simulate this by reducing the velocity.

Add bounce:


 

Fancy a hint? You can find the solution here.