Skip to main content
gamedev.net
🔒 Locked

Simple physics problem

Started by cybrgeek 5 replies 1k views
Original Post
cybrgeek
cybrgeek
I think this is a simple physics problem, but I havn''t taken physics. I looked through a few books, and talked to a few teachers, but nobody was able help. I''ll make this problem simple, and not worry about energy loss through friction, or anything else, and only use 1 demension. If two steel balls collide, either going the same direction or different directions, based on their veolcity and mass how do you calulate the new velocity for both of the balls. I need this for collision response, but this is all I need, the rest I have done all ready. Thanks for your help.
coelurus
coelurus
I''m not sure what you''re finished with, but here''s a little clue:

If two balls are colliding, and you want proper collision response, you should now their radiuses (radii perhaps?), their masses, their ability to bounce etc. Let''s skip some of it

Are the balls equal in size etc? In that case, a collision has taken place when the distance between the balls is 2r (r being the radius of one ball).
If you find a collision, get a vector between the center of the balls. Create a vector perpendicular to the last vector, and mirror the direction of the balls around this perpendicular vector. These are the new directions.

About the velocity:
Just lower it somehow. If the velocities before the collision is 1, it might be 0.8 or something afterwards as a first test.
origil
origil
I''m have no idea about how the energy is distributed among the 2 steel balls after a collision but you will probably need this equation somewhen:
M1V1+M2V2 = M1U1+M2U2

M1 - Mass of the first ball

V1 - Velocity of first ball before the collision.
U1 - Velocity of first ball after the collision.

It probably doesn''t help you much since it can be found in almost every physics book concerning collisions but that''s all I know about this issue.
intransigent-seal
intransigent-seal
I believe there was an article over on gamasutra about collisions between balls (err, I just checked - the article is here).

And check this thread. It''s about almost exactly the same problem.

And don''t forget to check the reference section of GameDev.

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
cybrgeek
cybrgeek
Thanks, I saw that post right after I posted my question.
glJunkie
glJunkie
This is a good one:

http://www20.brinkster.com/ahab/tutorials/tdcollphys.htm
cybrgeek
cybrgeek
Thanks, that site has exactly what I need.

Topic Locked

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

Sign in to reply to this topic.