Here are some phase portrait generators for a few Hamiltonian systems, and the programs are written in . . . Postscript! The postscript files contain the numerical computations along with formatting routines, so all you need to do is send the file to the printer and let it do all the work.

Each file includes documentation in the comments, and there are a number of parameters that can be set at the top of the file. The parameters should be self-explanatory, but one parameter of note is the color vs. black/white option, which should be set correctly, since the color setting does not look as nice on a greyscale printer. Additionally, for the continuous-time systems, the integrator method and stepsize must be set to ensure an accurate phase space.

Note that these files can take a very long time to print, especially on older printers. For example, the standard map file with the settings here takes 6 minutes on a Hewlett Packard 4500N color laser printer, 17 minutes on an Apple Laserwriter 12/640 PS, and 45 minutes on a Hewlett Packard Laserjet 4MP. You can reduce the time to print by selecting fewer points for output or rasterizing the postscript on a fast computer (using Ghostview or Acrobat Distiller) before sending the job to the printer.

- The standard map postscript file. This system is also known as the kicked rotor system, where a particle moves in a one-dimensional, cosinusoidal potential with the time dependence of a sequence of periodic delta functions.
- A symmetrized version of the standard map.

- The simplest example here is the pendulum postscript file, which uses 4th-order Runge-Kutta (fixed step) to do the integration, which works well since this system is not especially taxing on the integrator.
- A more interesting example is the
"sin
^{2}" system, which is similar to the kicked rotor, but the potential has a sin^{2}(t) time dependence. This time dependence results in a family of three primary resonances: one at p=0 and the others at p=±2p. A time-shifted variation on this phase space is the cos^{2}system, where the system is sampled at the temporal peaks of the potential rather than the minima. A further variation on this system is the "reduced sin^{2}" system, where the sin^{2}pulses have a (possibly) shorter duty cycle. These examples include the option to use either Runge-Kutta or Stoermer integrators (both with fixed steps); the Stoermer method seems much more efficient for these problems. - Another important system is the double resonance model, with two primary resonances at p=±2p.
- The
Duffing oscillator
is the driven version of the quartic double-well potential, with
Hamiltonian
sampled every unit time.
*H*=*p*^{2}/2 +*a*(*x*^{4}-*bx*^{2}) +*Ax*cos(2p*t*),