• Advertisement
Sign in to follow this  

bouncing balls of love

This topic is 4793 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys. Suppose you have two circles, with radius R1, R2 Position (x1,y1),(x2,y2) velocity (xv1,yv1),(xv2,yv2) ...and they collide. What will happen to their velocities after the collision?

Share this post


Link to post
Share on other sites
Advertisement
ok, dodgy puns aside, here is the process to calculate the change of momentum between two colliding objects.

Assuming the objects do not undergo rotational movement (infinite inertia), the equation for calculating the collision impulse is

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

the change of momentum induced by the impulse will be

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

va and vb are the velocities on objects A and B at the point of contact. Because there is no rotational movement, the va and vb are ust the linear velocities of objects A and B.

Vab is the relative velocity at the point of collision. vab = Vb - Va.
Nab is the contact normal, going from object A towards object B.

note that if (j < 0), equivalent to (Vab.Nab < 0) then the objects are separating, and no collision impulse should be applied.

for the demonstration of the coalculation of the collision impulse, refer to Chris Hecker's physics Docs.

I've got some sample code too somewhere.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement