Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Seifer

Problem with basic collision response

This topic is 5485 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

I have a book in which they give me the formula for 100% elastic collision, but when I test it I don''t get the same results as the author, so I''m wondering if he made a mistake in the example. It''s about an object A that collides with an object B(pasted from the book): ma = 2 kg mb = 3 kg vai (initial velocity of A) = 4 m/s vbi (initial velocity of B)= -2 m/s vaf (final velocity of A) = (2*mb *vbi + vai *(ma – mb ))/(ma + mb ) vbf (final velocity of B= (2*ma *vai - vbi *(ma – mb ))/(ma + mb ) vaf = (2*3*(-2) + 4*(2 – 3))/(2 + 3) = (2*mb *vbi + vai *(ma – mb ))/(ma + mb ) = 1.6 m/s vbf = (2*ma *vai - vbi *(ma – mb ))/(ma + mb ) = (2*2*4 – (-2)*(2 – 3))/(2 + 3) = 2.4 m/s Is the formula correct? Help a newb, skip church for 3 months.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
both results are incorrect.
check your signs, and check your operator precedence

Share this post


Link to post
Share on other sites
ma = 2 kg
mb = 3 kg
vai = 4 m/s
vbi = -2 m/s

vaf = (2*mb *vbi + vai *(ma – mb ))/(ma + mb)
= ( 2*3*(-2) + 4*(2-3) )/( 2+3 )
= ( -12 - 4 ) / 5
= -16/5
= -3.2 m/s

vbf = (2*ma *vai - vbi *(ma – mb ))/(ma + mb)
= ( 2*2*4 - (-2)*(2-3) )/( 2+3 )
= ( 16 - 2 ) / 5
= 14 / 5
= 2.8 m/s

momentum before = 2*4 + 3*(-2)
= 8 - 6
= 2 kgm/s

momentum after = 2*(-3.2) + 3*2.8
= -6.4 + 8.4
= 2 kgm/s

kinetic energy before = 1/2*ma*vai^2 + 1/2*mb*vbi^2
= 1/2*2*4^2 + 1/2*3*(-2)^2
= 16 + 6
= 22 J

kinetic energy after = 1/2*ma*vaf^2 + 1/2*mb*vbf^2
= 1/2*2*(-3.2)^2 + 1/2*3*(2.8)^2
= 10.24 + 11.76
= 22 J

Share this post


Link to post
Share on other sites
I apologize for thinking your "(pasted from the book)" applied only to the formulas, not the calculations below them. My "You''ve just made some errors in your calculations" should have been "whoever did those calculations made some errors".

The formulas are still fine though.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!