Sign in to follow this  
captainfreedom

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this