Here are some simple applets demonstrating algorithms for linked rigid bodies. Note that you must have Java 1.6 installed for some of these to work.

A simple IK demo

IK stands for inverse kinematics. Forward kinematics stands for the function that maps joint angles to positions on the articulated object. Inverse kinematics maps positions to joint angles. For this simple system, you can use an analytic solver to invert the dynamics. Note that there is not a unique inverse, even in this simple case. More complicated systems require numerical iterative solvers.

Forward Dynamics demo

Double-click to start or stop a physical simulation of the double pendulum. You can position the double-pendulum as in the ik applet. Gravity and damping eventually bring the system to rest in the stable equilibrium point. The equations of motion for this system can easily be derived using Euler-Lagrange mechanics (least action principle).

Inverse Dynamics demo

Now the movement of the double pendulum is controlled using inverse dynamics, or computed torques, to stabilize around the unstable equilibrium point. A precise model of the system dynamics is used to drive the system to that point in a spring-like fashion. You can grab the double pendulum during simulation and watch it react to perturbations.
Marco da Silva
Last modified: Tue Aug 19 14:05:02 EDT 2008