n-dimensional rigid body physics engine.