Skip to content

scottmarino/doublependulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Symplectic Double Pendulum Simulator

Double pendulum simulator using a symplectic Euler's method. The program calculates the momentum and position of each ball using Hamiltonian formulations, and uses those calculations to adjust the pendulum's course. This provides a double pendulum that stays stable and more analagous to real-life for longer periods of time, without the need of more complex math/animation modules. Mathematical methods provided in attatched PDF.

Screen Shot 2022-01-11 at 4 01 07 PM

Functionality

  • Visualization UI that shows scaled changes in pendulum lengths, masses, and starting angles
  • Generates EPS plot of path and phase diagram on command
  • Built to run on a Rasberry Pi/Linux based system

Usage Instructions

Run ./doublependulum.py in Linux terminal. If pendulum animation becomes unstable, the momenta of the masses are most likely too large for the allowed framerate of matplotlib. Try lowering masses or lengthening pendulums.

Required Modules

  • numpy
  • matplotlib
  • threading
  • time

Contributors

Scott Marino / scottmarino@icloud.com

About

Double pendulum simulator using a symplectic Euler's method and Hamiltonian mechanics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages