[ODE] Distance between two objects

Martin C. Martin martin at metahuman.org
Wed Apr 21 08:51:11 MST 2004


Ah, then all you need is an approximation to the shortest distance, or a 
lower bound on the distance, right?  You might consider computing 
bounding spheres for each object when the simulation starts, then 
checking the shortest distance between the spheres (which is trivial). 
But to answer your original question, there's no built in "shortest 
distance between two objects" in ODE.

- Martin


Tatu Lahtela wrote:

> On Mon, 19 Apr 2004 15:12:54 -0400, Martin C. Martin 
> <martin at metahuman.org> wrote:
> 
>> Tatu Lahtela wrote:
>>
>>> I trying to create force fields to the objects that are extremely 
>>> distance dependent
>>> (electrostatic and van Der Walls) so I need know the shortest 
>>> distance between two objects
>>> and use this information to calculate the force if the objects are 
>>> closer than a given value.
>>
>>
>> In general, you'll need more than just the shortest distance, since 
>> the force will be a function of the entire distribution of charge, not 
>> just the nearest.
> 
> 
> Of course, but calculating the nearest points is the first step, and 
> calculating the force is unnecessary
> if the object are to far from each other. We have an algorithm that 
> intergrates through the
> surface(s) and calculates the total force. Also, the calculation is 
> quite heavy so I'm starting to
> be sceptical that we're ever going to get the system fast enough.




More information about the ODE mailing list