This Qt-Application simulates and animates the motion of a 3-stick pendulum.
The system is build up with a carret, constraint to horizontal movement. Then a chain of 3 sticks is mounted onto the carret.
The calculation of the model is done in wxMaxima.
- user defined masses, lengths and inertias, springs, dampings
- user defined initial coordinates
- user can drag the carret with the mouse, and try to balance the the inverse pendulum (easier with time lapse)
- user defined damping factors of each joint and for the carret
- slow motion by changing timefactor
- the springs are fixed to the initial relative angle between 2 linked sticks.
- a working regulator
- set dampings to zero, and watch the chaotic movement. Is like a burning fire - you can watch it for ever without getting bored. :)
- Enable "Pull by Mouse", set Time-Factor to 10, and try to balance the pendulum. It works for about 3 seconds, then normally it is too instable for balancing any more.
- memory leak (C++ has no garbage collector :) )
- numeric (hopefully numeric only) instability, when spring constants are high, and dampings are low.
- calculate and print system-energy (if it should not increase with time, without any input)
- improved numerical stable solver
Tested with Qt5.9 on Linux Mint 19 (based on Ubuntu 18.04)
mkdir build
cd build
qmake ..
make
chmod +x inverse-tripple-pendulum
./inverse-tripple-pendulum