# ball bounce calculation without using angles

## Recommended Posts

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. "

##### Share on other sites
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'

##### Share on other sites
No, there method he's using is a lot simpler, just using balls of equal mass

##### Share on other sites
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.

##### Share on other sites
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

##### Share on other sites
Here's the vector math behind it. ;)

Bounce tute

##### Share on other sites
Quote:
 Original post by captainfreedomNo, 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...

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628305
• Total Posts
2981967

• 9
• 13
• 11
• 12
• 11