pydyn --- visualizing dynamical systems
Emily Gunawan
- pydyn.py:
pydyn.py runs Lorenz and Rossler attractors with triangle-shaped trajectories. It was written during illiMath 2004, University of Illinois at Urbana-Champaign. It is a simple program that uses the three classes, Node, Polygon, and SceneGraph defined by pytree.py as well as a class Trail from trail.py and ButtonEvent from ButtonEvent.py. It also defines its own class Panel. The program can toggles between a vizualization of a 3-dimensional attractor called the Lorenz Mask to another one called the Rossler attractor. User may go through a bifurcation diagram and change the values of the coefficients in the system, reseed random initial points, lengthen and add trajectories. The three coefficients in the Lorenz system are called a, R (for 'Rayleigh'), and b, and in the Rossler system they are called A,B, and C in this code. pydyn.py may also be run interactively in python by typing the command python pydyn.py -i
- trail.py:
Using scene graph API, trail.py defines a class Trail and a subclass which is be used by pydyn.py. The Trail class may be used to create trajectories that belong to up to 3-dimensional dynamical system.
- ButtonEvent.py: is a button class that is needed for its newlydown()
function
- Miscellaneous Python programs
There are six buttons that do the following tasks:
- a: Rotate phase plane
- b: Reseed random initial values; Parameters stay the same.
- c: Go through a bifurcation diagram (Rayleigh coefficient for the Lorenz system and parameter A for the Rossler)
- x: add more trails
- y: lengthen all trails
- z: switch back and forth between Lorenz and Rossler and zap trails back to its original position and values.
Screen shots: