Modeling Motion Python Examples
This page serves as an index to the program code referred to in the computer science section of Modeling Motion. I will post individual programs and saved scripts of interactive sessions from the lectures.
- driver.py A driver oscillator for the week 1 lab on resonanace.
- ca1d.py and ca.py - A 1-dimensional cellular automaton.
- mass/spring examples - A system of masses and springs for the week 2 lab on mass-spring systems.
- predprey.py - The predator prey model from Callahan chapter 8.
- predpreyvec.py - A vector field graph of the predator prey system
- pendulum.py - A phase portrait of the undamped pendulum system.
- lorenz.py - The time and phase portraits of the famous Lorenz system showing it chaotic attractor.
- sensitivity.py - A time series plot of one variable, x, in the Lorenz system plotted twice with slightly different initial conditions showing how sensitive a chaotic system is to initial conditions.
- life.py - John Conway's famous 2-D CA called "The Game of Life".
- processor files - files needed to run the MM1 processor simulator. Run "simulator.py" with the correct "*.mm1" file substituted in the definition of the
- surface.py - A program for visualizing functions of 2 variables by drawing a wireframe mesh.
- Tkinter GUI examples - My examples plus links to documentation and other examples.
- sinewave.py - Staring point for assignment due week 7.
- taylor - several versions of a program plotting taylor polynomial approximations to the sine function. taylor3.py responds to the arrow keys.
- tree - several versions of a recursive tree drawing program with some GUI controls.
- power.py, and power2.py - POWER program from Callahan and a slightly modified one to graph both the function and its power spectrum.
- detector.py, and detector2.py - DETECTOR program from Callahan and modified version.
- powerspectrum.py - The program developed in class.
- signals.py, testsignals.py - A set of classes for signal processing and a test program for exercising them.
- bouncetk.py - The bouncing red ball with a slider added to control gravity—an example similar to the take home test question (hint,hint).