Archived

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

glnefugio

To spheres colliding

Recommended Posts

How do 2 speres react when they collide? I''m trying to programm some sort of Billiard game. Now i have the problem that they don''t react proberly! Right now they are just change the speed and direction! is thre a formular available? thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
They bounce at equal and opposite angles.

the one you fired bounces at opposite.
the one you hit bounces at the angle between the two.

Hope you understand what im going on about.

Share this post


Link to post
Share on other sites
I had a similar problem myself last week... I looked at NeHe''s lesson 31 code... and I implemented the formula that he gives there for sphere-sphere response and it works beautifully...

We scratch our eternal itch
A twentieth century bitch
We are grateful for
Our Iron Lung

Share this post


Link to post
Share on other sites
taking the vector between the centres of the spheres, use this as a normal to a plane, and reflect the spheres velocity through this plane. The new velocities should obey the law that momentum is conserved, ie, momentum = mass * velocity. Therefor, after a collsion, the momentum vectors should still add up to the same as before the collision.

<-- smile :-)

Project-X

Share this post


Link to post
Share on other sites