The conservation of momentum as well as the conservation of kinetic energy define the elastic collision. You can change the masses and speeds of the colliding objects by clicking on them. Note that the trajectory of the center of mass is not disturbed by the collision.