[ODE] Distance between two objects

Andrew Hannon hannon at cs.umass.edu
Mon Apr 19 13:39:50 MST 2004


Also, look at vClip. I implemented it in Lisp over a year ago, and 
found that it was quite a nice algorithm. I think there is C++ source 
code available. Link:

http://www.merl.com/projects/vclip/

On Apr 19, 2004, at 10:59 AM, Jeffrey Smith wrote:

> Roel van Dijk wrote:
>> On Monday 19 April 2004 15:00, Tatu Lahtela wrote:
>>> Is there a ready made function to calculate the (shortest) distance
>>> between two objects?
>>
>> I'm not quite sure what you mean with the shortest distance. The 
>> shortest
>> distance between any two objects is always a straight line.
>
> The code snippet you pasted will tell him the distance between two 
> geom's
> centers, not the shortest distance between the surfaces of two geoms. 
> This
> can be a significantly more difficult problem.
>
> For the geometric primitives, analytic solutions can be derived with 
> more
> or less difficulty.  However, if you're using arbitrary trimeshes, the
> problem is very hard, and you may have to suffer approximations. If you
> are comfortable assuming that your objects can be approximated with 
> convex
> hulls, you can use the Gilbert, Johnson and Keerthi (GJK) algorithm:
>
> http://web.comlab.ox.ac.uk/oucl/work/stephen.cameron/distances/
>
> There are some free (for noncommerical applications) implementations 
> of GJK
> on the web that you can download and try.
>
> -jeff
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list