Try My Physics Simulations: Live in Your Browser
I built a physics simulation library that models springs, pendulums, epidemics, gravity, and more. The simulations run locally with matplotlib, but you can also explore them interactively through Jupyter notebooks, no install required.
Click any button below to launch a live notebook in your browser via Binder. It takes about 30-60 seconds to spin up the first time (it’s building a fresh Python environment from my GitHub repo), then you’re in a full Jupyter session where you can run cells, tweak parameters, and see the results.
Building a Physics Simulation Engine in Python
How the physics_modeling package is architected: base classes, numerical integrators, separation of physics from visualization, and property-based testing.
The Core Abstraction
Every physics simulation answers the same question: given a system’s current state, what is its state at the next instant? Whether you’re modeling a spring, an epidemic, or a galaxy of gravitating bodies, the computation follows one pattern: compute derivatives, advance time, repeat.
The
physics_modelingpackage encodes this pattern in aSimulationbase class:Modernizing Legacy Code: From 2004 VPython to Python 3.14
Taking old college physics simulations written twenty years ago and getting them running on modern Python.
The Time Capsule
In 2004, I was a student at The Evergreen State College in a program called Modeling Motion. We wrote Python simulations of physics phenomena (springs, gravity, epidemics, particle collisions) using a library called VPython. I was learning physics and programming simultaneously, translating equations of motion into running code for the first time.