simulation of colliding objects with gravity