Circular collision with rotation
Author |
Message |
zwnage
|
Posted: Sat Mar 17, 2007 9:05 pm Post subject: Circular collision with rotation |
|
|
Lets say I have two balls hitting, but not only that, they are also spinning. How to I add the spin into the resultant vectors?
So far, I'm using the perfect circle collision tutorial. For the spin, I'm using a method where I translate the rotation of the circle into the distance a point on the circle travels per rotation, and use that distance as the velocities of an imaginary ball. I then use the imaginary ball and have it hit the circle, so the circle is hit twice, once by using normal collision detection, and once by the turning of the other ball. I think this is somewhat like the rotational force acting on the ball. I am also assuming there is a lot of friction. The problem is, the code is very long since it needs different calculations for each quadrant, and for the direction of the rotation, and for both circles. Plus, It doesn't seem to be working too well.
Now my question is: is there a better way to do this, or is there an example code using something like that? Thanks. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Skynet
|
Posted: Sun Mar 18, 2007 5:53 pm Post subject: Re: Circular collision with rotation |
|
|
Spin will not affect the resultant vectors, assuming that the time the objects are in contact is small. If you're assuming "rigid bodies", (objects that do not deform) this is a reasonable assumption. Making this assumption means you can use conservation of momentum to solve for the new vectors.
I believe (I don't have my Dynamics text handy to confirm) that you can also solve for new spins by using conservation of angular momentum. If anyone's got a Mechanics/Dynamics text around, feel free to chip in. I can probably give you better advice if I know what you're simulating. |
|
|
|
|
|
|
|