[ODE] what a drag
Nate W
coding at natew.com
Fri Apr 4 12:23:02 2003
On Fri, 4 Apr 2003 david@csworkbench.com wrote:
> Aerodynamic drag *can't* be implemented internally. ODE uses point masses
> to represent it's bodies, and geoms are created in the separate collision
> detection engine. However, the collision detection engine is designed to
> be modular so it can be replaced by your own CD routines if you want to.
> This means that the internal ODE functions don't really have access to the
> goem, and thus the shape of an object. So aerodynamic drag *must* be
> implemented externally.
Good points. My biggest concern is that computing the coefficient of drag
could be a hard problem, even just for the simple ODE collision
primitives.
However, if operating in a "universe" with uniform viscosity (if that's
the right word - I mean no air/water or air/vacuum boundaries), it should
be possible to approximage aerodynamic effects with just one function call
right after the collision step. Let's call it fluid drag just to be
general...
The one function would iterate the list of ODE bodies, get their
velocities and geoms, compute the cross-section area of the geom as viewed
from the velocity direction, and apply a force proportional to the cross
section area and the velocity vector. Easy, right? :-)
The part about computing the cross section sounds hard, unless the geoms
are all spheres. Anyone know of a simple and/or fast way to do that for
boxes at arbitrary orientations? Cylinders?
--
Nate Waddoups
Redmond WA USA
http://www.natew.com