Usage of VisPy to numerically simulate and view a simple physics model.
This is just a small example, using VisPy to simulate a system with two springs, a pivot, and a mass. The system evolves in a nonlinear fashion, according to two equations:
In these equations, the J term is the polar moment of inertia of the rod, given by:
The system has the option to update once every step using the Euler Method or a more stable third-order Runge-Kutta Method. The instability of the Euler Method becomes apparent as the time step is increased.
- Python 2.7 or 3.4
- VisPy 0.5.0 (can be installed following the instructions under "Installation" on the VisPy github page)
- NumPy
- PyQt4