Constrained rigid body simulation for 3D character animation
Java TeX Matlab OCaml Shell M Other
Switch branches/tags
Nothing to show
Clone or download


Simulation of colliding constrained rigid bodies

Martin Kleppmann <>


Please see the following links.


Apart from all the underlying data structures, algorithms and constraints,
this code repository includes a few examples of more complex systems built
from the simple components: a gyroscope, a multi-part pendulum, Newton's cradle
and a centrifuge-like thing.

The way you would use these components is probably along the lines of:

    Simulation sim = new Simulation();
    MultiPendulum.setup(sim, 3);;

You will have to sort out input and output of data, display/rendering etc.
yourself -- the purpose of this code is to demonstrate the algorithms, not
to provide a fully functional dynamics simulator.


Feedback is welcomed; please contact me at the email address above.
However, I am not actively developing this code any further.
If there is enough demand to set up a community where people can contribute
code and patches, we can make this a proper open source project.