A double pendulum simulator (written in Python 3) which uses the Runge-Kutta (RK) method to solve the set of differential equations from either the Lagrangian formulation or from the Hamiltonian formulation for the double pendulum problem.
All code from this project is licensed under the GPLv3. See the
LICENSE
file for more information.
The following modules are used:
numpy
pygame
You can install them with the following command:
pip3 install pygame numpy
Run ./double-pendulum -h
to get a list of simulation parameters which can
be set.
If your simulation becomes unstable, try doing one or more of the following:
- reduce the time step
- reduce the initial angular velocities
- reduce the gravitational acceleration
Diego Assencio / [email protected]