Sports Biomechanics Lab > Blog > Open source multibody simulation and animation
Personal tools

Open source multibody simulation and animation

by Jason Moore — last modified May 03, 2010 04:35 PM

Luke and I have talked at length over the years about the fact that we have no decent and somewhat painless way to animate multi-body systems. We write equations of motion for systems and integrate them, but all we ever get to see are 2D plots of the states (or various combinations of them).

Our original flow for simulation goes something like this:

1. Develop dynamic models conceptually (we typically use Kane's method, but sometimes Newton-Euler or Lagrange)
2. Set the models up in Autolev and symbolically derives the equations of motion using Kane's method and spits out code for integration in Fortran, Matlab or C
3. Integrate the equations of motion and generate time histories of states and various combinations of states using Matlab, C or Fortran
4. Make 2D plots of the states. We've mostly used Matlab for this.
5. Make 2D or 3D animations with Matlab

This all works ok except that the two critical pieces of software have become more and more of a pain to work with. Autolev is good at what it does but the fact that it is such a black box, the documentation and support is bad or non-existent, there is no community, it hasn't been updated in over 5 years (although this is just came out), and it costs a ton makes it less and less appealing to work with. Matlab is definitely better and is by far the best for control system design, but the animation is poor and it is quite slow for integration and you have to keep up on the licensing fees.

Computes the equations of motion symbolically for complex multi-body dynamical systems using Kane's method. It is closed source, costly and there is only one developer. It uses GNUPlot for 2D plotting, Animake for 3D animation and Matlab/C/Fortan for simulation. The newest version is something called MotionGenesis Kane 5.0 and seems to be Autolev 5 with integration libraries built in.
Matlab is a general purpose matrix laboratory that has many useful functions for engineers. It has its own scripting language. The controls tools are excellent. There are some dynamics toolboxes that are powerful, but I haven't used them. The 2D plotting is good, the animation isn't so good. Plenty of robust integration routines.

Luke has been working on a solution to our software dreams. It is written in Python, is open source and aspires to be able to complete steps 1 through 5, but still has some way to go before it is a solid alternative to Autolev.

(Python Dynamics) Derives equations of motion symbolically using SymPy for multi-body systems using Kane's method. Makes use of C integration routines using Python wrappers. Uses VisualPython for animations. He's also been working on animations written in C using OpenGL directly and the integration with the GNU scientific library.

There are other options in dynamics simulation too and I've had little experience with them. To start, here are a couple of lists other folks have put together: and (this deserves a wikipedia page...).

I'll start with some open source options:


At a Multi-body conference this past summer in Warsaw, I saw a presentation on a pretty cool combination of Blender and MBDyn (both open source applications!) to produce beautiful and rich animations of simulation results and even being used as a flight simulator for a conceptual tilt rotor aircraft. 

A monolithic dynamics package.

Doug Baldwin is working on the Blender scripts for MBDyn

I found this description of multi-body code in a presentation on the MBDyn site and though it was a nice way to group the types of solvers:

  • Monolithic:
    • user prepares specific model using built-in library elements
    • general-purpose solver swallows model and spits results
  • Library:user writes specific solver using library elements
    • usually needs programming skills; the solver must be compiled
    • specific solver solves the problem and spits results
  • Symbolic manipulators:user writes equations
    • symbolic manipulation engine solves equations and spits results
  • Modelica (and Modelica-like):user prepares model using a modeling language and libs
    • general-purpose interpreter generates specific solver
    • specific solver solves the problem and spits results

Here is a start at making a comparison chart of dynamic software.

Free dynamics software:

Language GUI
Symbolic Manipulation
2D Plotting
3D Viz
Closed Loop Systems

EasyAnim, Blended MBDyn,

DynaMechs C++


Mbs3d Matlab/C++
Double Step Maggi's formulation 3D  

OpenSceneGraph  yes
Open Dynamics Engine C++




EasyDyn C++


RoboTran Matlab




Kane's method 3D

Multi Matplotlib


Kane's method




Bullet Physics Library

EOM Octave                    
lib3d_mec_GiNaC C++  Yes  3D  Ginac    Multi  Yes   Yes     



Col 2 Col 3 Col 4 3D Viz
Working Model        
Autolev       Animake
MotionGenesis Kane 5.0       Animake



Name  Language Description
OpenOpt and FuncDesigner Python Has ode solvers + automatic differentiation for rapid, accurate jacobian calculations 
SciPy Python odeint and ode
GNU Scientific Libraries C & C++ There is a python interface, PyGSL
PyDx Python  automatic differentiation



Document Actions
Add comment

You can add a comment by filling out the form below. Plain text formatting.

Please enter your name.
Enter the word