Simulates elastic collisions between balls