animation of shapes when collide