How joeeliang/doublependulum works
Project type and purpose
• This is a standalone Python‐based interactive visualization and simulation tool.
• Purpose: compute and display a Lyapunov‐exponent heatmap for a double pendulum, allow the user to hover over heatmap points to see chaos metrics, and animate the pendulum at a chosen starting angle.
File structure
• Top‐level scripts:
• main.py – entry point, orchestrates UI, heatmap rendering, event handling
• 3d.py – alternative 3D heatmap visualization
• animation.py – routines that animate the pendulum motion in matplotlib
• lyapunov.py – compute or load Lyapunov exponents
• pendulum.py – physics simulation of the double pendulum’s equations of motion
• dataFormat.py – load/transform CSV files (data.csv, redoData.csv)
• Data files: data.csv, redoData.csv – precomputed exponent values
• Config: requirements.txt – list of Python libraries (matplotlib, numpy, pandas, etc.)
README for additional insights
• Interactive heatmap as primary UI
• “u” key triggers an animation of the double pendulum
• 2 modes: 2D (main.py) and 3D (3d.py) heatmap
• Core workflow: load or compute exponents → render heatmap → on hover show values → on key press launch pendulum animation