3D pendulum model generated with Mathematica. Mathematica expressions are converted to Octave format using a python script that is included. Simulation code is written in Octave, but should be compatible with Matlab.