A physics engine based on generalized coordinates and the Euler-Lagrange equations.