Advertisement

collision between two ellipsiods

Started by September 05, 2002 02:41 PM
2 comments, last by Zumichu 22 years, 5 months ago
I''ve gotten a system working pretty well that handles collisions between a bunch of spheres. I am trying to change it to use ellipse objects instead, but it''s not working. I''ve found some articles explaining collision between an ellipse and a polygon and how to scale the polygon and the ellipse with the radius vector of the ellipse, but how does this work when between ellipse and ellipse?? If you scale one into a unit sphere, the other one will still be an ellipse (unless it has the same shape and size). It would be nice to have a solution that can use my existing sphere collision code. thanks.
[I did absolutely nothing, and it was everything that I thought it could be]
Have you tried playing with the distance between the focal points? It seems like it might be possible that the distance between each focal point in one ellipse to each focal point in the other would be less than or equal to a constant when they collide. The idea being basically equivalent to checking the distance between the center of two circles against their radii to detect a collision. If you did the centers twice it would be twice the sum of their radii. So it seems reasonable that the sum of the distance from each of the focal points of one ellipse to each of the focal points of the other would be twice whatever you call the constant distance for an ellipse. It would take more time than I have right now to prove/disprove that though.

Perhaps a bit faster would be to just write a quick program to see if it is reasonable. It won''t prove anything, but it might well quickly disprove it.
Keys to success: Ability, ambition and opportunity.
Advertisement
Sounded good, but not true. A counter example is the ellipse (5*cos(t1),3*sin(t1)) and the circle (4*cos(t2),4*sin(t)+7). The distance of the focal points from the center of the ellipse is sqrt(5^2-3^2)=4 so the focal points are at (-4,0) and (4,0). The constant for the ellipse is 2*5=10. The constant for the circle would be 8. So if my theory was right then the sum of the distance from each of the focal points to the center of the circle would be 18, but it is actually 2*sqrt(4^2+(3+4)^2)=2*sqrt(65) which is roughly 16.125.
Keys to success: Ability, ambition and opportunity.
hmm, I don''t know. I haven''t had much more time to play with it. Thanks for looking into that for me though. If you have any more ideas, please let me know.
[I did absolutely nothing, and it was everything that I thought it could be]

This topic is closed to new replies.

Advertisement