Appendix 2: Pendulum Problem Complete Code
Damien André, Jean‐Luc Charles, Ivan Iordanoff · 2015
Pendulum Problem Complete CodeThe following C ++ code block shows the complete code of the pendulum problem detailed in section 3.1.8.The elastic pendulum problem that involves the dynamics of rigid bodies is solved with less than 80 lines of code.#include #include #include "libGeometrical/SRC/All.hpp" using namespace CommonLibs::Geometrical; // // Global variables (can be used from any place) // Be carefull !!! // Only const variables should be Global !// // Declaration of L0, L, R m1 and K : const double L0 = 1.; const double L = 2.; const double R = 0.1; const double m1 = 10.; const double K = 100.;// // Global Frame : F0 //