physic model of elastic and inelastic collision