i need formula for my collision
simulation program.In that i am using vector concept to detect the collision and the path after collision.But i cannot able to trace the path after collision.
Expert's answer
I need a formula for my collision simulation program. In that I am using vector concept to detect the collision and the path after collision. But I'm not able to trace the path after collision.
If you are simulating the central perfectly elastic collision of two bodies, then according to the law of conservation of momentum we can write m1⋅ν01+m2⋅ν02=m1⋅ν1+m2⋅ν2 (it should be written in scalar form with corresponding signs). According to the law of conservation of energy we can write an equation 2m1⋅ν012+2m2⋅ν022=2m1⋅ν12+2m2⋅ν22 (it can be written in scalar form only).
We can omit the vector signs in the first equation when considering two cases:
1) If both bodies are moving in the positive direction before the collision with ν01>ν02>0 , then the law of conservation of momentum in the scalar form will be: m1⋅(ν01−ν1)=m2⋅(ν2−ν02)
Then we can divide the above equations: m1⋅(v01−v1)m1⋅(v012−v12)=m2⋅(v2−v02)m2⋅(v22−v022),v01+v1=v2+v02 .
Solution of the obtained system of equations {m1⋅(v01−v1)=m2⋅(v2−v02)v01+v1=v2+v02 will be:
v1=m1+m2m1−m2⋅v01+m1+m22m2⋅v02,v2=m1+m2m2−m1⋅v02+m1+m22m1v01 , you can calculate the values of velocities after the collision. If the value is positive, then the body moves in positive direction and vice versa.
2) If the bodies are in the counter movement before the collision, ν01>0 , ν02<0 , then the law of conservation of momentum in the scalar form will be: m1⋅(ν01−ν1)=m2⋅(ν2+ν02) ,
v1=m1+m2m1−m2⋅v01−m1+m22m2⋅v02,v2=m1+m2m1−m2⋅v02+m1+m22m1v01 , you can calculate the values of velocities after the collision. If the value is positive, then the body moves in positive direction and vice versa.