Advertisement

Hell of multibody dynamic

Started by June 22, 2002 06:17 AM
2 comments, last by Fantasio 22 years, 7 months ago
I started to understand how to link multibody, but all tutorial talk about too complicated math.. Anyone have an idea to make a multibody soft constraint, not too complicated ? with vector,dotprodut,ect...?
can i please have a link to those tuts? thanks.

---
shurcool
my project
Advertisement
check David Baraff papers...
The easiest way to code a multibody simulation may be to put a spring between the degrees of freedoms that are constrained together, and apply a spring force as the bodies become separate. For example, since the bodies are physically tied together, you''d have 1 spring for each coordinate value (x,y,z), giving you 3 springs total for positional linking (e.g., 1 spring ties x of one body to x of the other, etc.). Then you''d have additional springs to tie the rotations together if you need to constrain rotations.

This is easy to implement. You simulate each body separately, and merely apply the spring forces to pull the bodies together.

You can try this simple approach; HOWEVER, there is a reason why Baraff and everyone else does the complicated math for true multibody simulation. The approach I describe above has many problems that make it impractical for many real problems, which I''ll mention below.

First, the bodies are not truly constrained to be tied together. There are loosely tied with a spring----and because of this the bodies will usually float away from each other, and just kind of oscillate around their linked point. It just won''t look right.

Second, and perhaps more problematic, it is quite difficult to simulate physics with springs in a stable manner. This is a whole area of discussion in itself, which I won''t discuss. Suffice to say that you should not use simple Euler integration. Runge-Kutta is better, but you still have to keep you springs relatively loose/weak. Stiff springs make most integration methods blow up (overflow error).

There is an alternative to the simple spring approach and Baraff''s approach. That alternative is to represent your multibody parametrically, where you write your equations of motion only for those degrees of freedom that can move. Shabana (see below) describes this.

Another reference, which I find to be a good complement to the Baraff papers, is the books by Ahmed Shabana (i.e., "Computational Dynamics," "Dynamics of Multibody Systems")----do a search at www.bookfinder.com to look for used copies because new ones are not cheap.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement