Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Collision related question. Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 18, 2005, 08:26 AM

I am doing some collision detection stuff but confused about way i'm going let me explain what i want to do .

Now i have one two objects to collide. One object may be convex or concave and other object is fixed object like ellipsoid. Ellipsoid is inside convex or concave object (concav/vex is transperent).Now what i am doing is trying to grow ellipsoid by increasing it's radius and also check for collision and nearest distance by finding best ellipsoid radius inside object So i'm trying to move or rotate and growing to best radius But i have to use nearest distance to find which direction i have to grow.

So can i find whithout nearest distance ?? I mean with only collision detection how can i know which direction should i go ???

I tried to explain everything but if anyone has question i can explain more.

Suggestion Welcome


Rui Martins

March 18, 2005, 09:04 AM

I would grow in the 3 axis, 50% of the available distance for that axel.
Then recheck distances to concave/vex interioro and reposition elipsoide so that it's relativelly centered to the volume available.
Then repeat, until when you grow all axis elargments will hit (collide) with the object interior.
While their is at least one axis that doesn't collide, keep enlarging that axis.

Note that this is an interative solution, and doesn't account for needs/optimizations like rotating the elipsoide.

Not also that this may not find a good solution for very long and narrow, objects, and rotation is a major factor for best fitness in this situation.

Another way is to try to find the largest line inside the object, and use that as one of the initials axels of the elipsoide.
then determine the largest distance on the perpendicular plane that passes through the center of the initial axis. Use the direction of this distance to define another axis of the elipsoide.
Now define the last missing axis, but determining it's direction through the crossproduct of the other two, and use the largest distance (radius) possible.

if in the end the elipsoide collides with interior of the other object, interactivelly, reduce the axis where the penetration is largest, until no penetration occurs.

But nothing beats a human setup by hand.

NOTE: Using arbitrary concave objects this is most probably an NP complete problem, which means you can't reach to "The Optimum Solution" in a reasonably amount of time, an aproximation will have to do, just make it as good as reasonably possible.

This thread contains 2 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.