This simulation was created to be used as skeleton code as part of Hack Club's Accelerate Program.
app.py— Flask app,DoublePendulumclass, background simulation, routestemplates/index.html— Canvas animation and polling logicrequirements.txt— Python dependencies
py -m venv .venv; .\.venv\Scripts\Activate.ps1pip install -r requirements.txt$env:FLASK_APP = "app"
flask runThen open http://127.0.0.1:5000 in your browser.
- If you see ImportErrors, ensure you installed from
requirements.txtinto the active venv. - If animation stutters, lower
dt, increase poll frequency, or reduceMAX_TRAIL.
MIT — see project materials.