ball bounce calculation without using angles
I found a nice vector tutorial that explains how to calculate ball bounce collisions using vectors. The maths are a lot easier because they use vectors rather than angles to do the calculation.
Unfortunately, the last page (http://tonypa.pri.ee/vectors/tut11.html) he hasn't explained the rebound vector calculation properly.
Does anyone know the theory behind this?
"vc is vector between center points of balls, vcn is normal of vc. Now we project both movement vectors v1 and v2 onto vc and vcn:
v1 is broken into components v1a and v1b, same way v2 breaks into v2a and v2b. For resulting movement vectors v1a and v2a are exchanged and ball1 will get new movement vector made from v1b and v2a while ball2 will get new movement from v1a and v2b. "
SOunds like he is trying to explain the conservation of momentum. Check out Chris Hecker's docs for a better explaination.
in short
va' = va + (j / ma) * n
vb' = vb - (j / mb) * n
(va' - vb') . n = -e * (va - vb) . n
solve the equation to find the collision impulse 'j'
in short
va' = va + (j / ma) * n
vb' = vb - (j / mb) * n
(va' - vb') . n = -e * (va - vb) . n
solve the equation to find the collision impulse 'j'
Equation with different mass and a coefficient of elasticity is simple enough. With identical mass and perfect inelastic collision (e = 1), you would end up with the same thing. The velocities along the normal of collision are basically swapped around. What I provided you with is the theory behind it.
No, the formula that I linked to has nothing to do with the one you wrote.
It calculates final vectors by projecting the initial vectors on the collision line using the dot product
It calculates final vectors by projecting the initial vectors on the collision line using the dot product
Quote:Original post by captainfreedom
No, the formula that I linked to has nothing to do with the one you wrote.
It calculates final vectors by projecting the initial vectors on the collision line using the dot product
why do I bother sometimes...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement