Skip to main content
GameDev.net gamedev.net
🔒 Locked

elastic collision

Started by andyZER0 Dec 31, 2004 at 11:00 AM 1 replies 1.7k views
Original Post
andyZER0
andyZER0
My physics teacher only taught me to solve elastic collision problems with a velocity after the collision given (and then we gotta find the after velocity for the other object). So, I consulted my physics book, and it only gave me the equation for if only one of the objects was stationary during the collision. What I'm trying to find: how do I find the velocities of two moving objects after an elastic collision?
oliii
oliii
I'll keep it simple...

the generally accepted equation for finding the collision impulse between two objects is

j = (-(1 + CoR) * (Vab . Nab)) / (1/ma + 1/mb);

CoR is the coefficient of restitution. between 0 and 1.

without considering rotational movement.

See Chris Hecker's physics tutorial for a demonstration.

note that if (j < 0.0f), the objects are already moving away from each other, and you can ignore th impulse (and you should or they will stick to each other).

the collision impulse vector is then

Jab = j * Nab;

then the impulse will induce a change in momentum on both objects as such...

Va -= Jab * (1/ma);
Vb += Jab * (1/mb);

I think the signs are correct here, but in case, try swpping the '-=' and '+='.

Vab = Vb - Va.
Nab is the normal of collision, pointing from object A towards the object B.

to be more accurate, Vb is the velocity at the point of contact on ObjectB. Idem for Va. Since you have no rotational movement, it is the velocities of both objects.


you can also derive the equations by using the two equations

maVa + mbVb = maVa'+ mbVb'
1/2 maVa2 + 1/2 mbVb2 = 1/2 maVa'2 + 1/2 mbVb'2
Everything is better with Metal.
Daerax
Daerax
Basically that scenario simplifies to one in which one of the bodies was still.

For a head on elastic collision, if you choose a frame of reference that is of a velocity equal to one of the masses then one of the objects should have a velocity of 0. This simplifies to the equations your physics teacher probably gave you.

v1f = (m1 - m2)/ (m1 + m2)*v1i
v2f = 2m1/(m1 + m2) *v1i

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.