Use a 3D physics engine, like ODE, Newton, Tokamak(spelling?), etc.
The tricky part would be to draw all those 2D pictures, and then select which one to show during runtime. :)
The tricky part would be to draw all those 2D pictures, and then select which one to show during runtime. :)