Harmonograms, Spirographs, and Lissajous Figures

Encyclogram draws harmonograms, spirographs, and Lissajous figures. The decaying motion of the plot fills in the shapes with their spiralling-in echo. Encyclogram can also draw the curves in varying colors against a black background, resulting in breath-taking works of art that can be as beautiful as fractals. See the gallery of examples.

Harmonograms are mathematically the sums of several harmonic motions in the x and y directions, decayed over time. If the decay is removed, and there are only two harmonic motions (sinusoids), one in x and one in y, then the graphs are Lissajous figures. If another harmonic motion is added to each axis, and they are all in a specific phase relationship, then spirographs can be generated. These are better-known as the result of rolling a (toothed) wheel around inside another wheel, with a pencil point through a hole in the rolling wheel.

You don't have to know any mathematics to use Encyclogram (though if you're studying trigonometry you'll find this applet is an interesting example of what can be done with sine curves!). Simply move the sliders around, and try the check boxes. Here's how it works:

For a quick start, click the Random button a few times; then check the Spiro box and click on Random a few times more. Check the Color button (and wait - it'll be slower).

At the left of the applet are two sets of x-pendulum controls; at the right of the applet are two sets of y-pendulum controls. x is the horizontal direction in the drawing area, and y is the vertical direction. Each pendulum (2 per axis) has an amplitude, frequency, and phase.

640x480, 800x600, 1024x768

Frequency generally has the greatest effect, controlling the number of lobes. Amplitude controls the lobe sizes. Phase controls lobe orientations. Spiro gangs the x and y amplitude and frequency controls, and sets the phases for symmetric spirographs. Decay makes the curve spiral inwards. Color sets a black background, and draws the picture in color. WARNING: selecting the color option slows down the picture drawing. Thick draws a thick line. This also slows the drawing speed.

Harmonograms: select the decay option.

Spirographs: select the spiro option. Leave the phases alone for true spirographs. You can change them for interesting effects, but the pictures won't then generally be spirographs.

Lissajous: unselect spiro and decay. Set one amplitude on each side to zero; adjust the sliders in the non-zero groups (e.g. if you set the top sliders each side to zero, adjust the bottom three sliders).

FREE for your website!

Click on the above link to download a zip file of the classes and HTML.

After conducting several searches, I believe this applet is unique in being the only one that makes it easy to draw spirographs and Lissajous figures, as special cases of harmonograms. The most popular applet for drawing so-called spirographs actually approximates them with overly long straight line segments, and has a few other weaknesses which Encyclogram remedies. There are very few applets drawing these kinds of curves.

Encyclogram will appeal to mathematicians and physicists, as an example of the resultant trace of perpendicular damped harmonic motions; to artists and graphic designers as a tool for exploring patterns in curves; and to almost everyone as a fun visual toy. Web designers may add it to their sites for visitors' use and entertainment. Teachers especially could use it to illustrate aspects of physics, maths, and art.

Future Plans:

  • Add an animation mode.
  • Display the curve's equation?
  • Allow to change the rate of decay?
  • Allow to select some preset curves?
  • Allow variation of the drawing increment?
  • Document the mathematics of harmonograms etc.
  • Allow initial display to be set by external parameters.
  • Create a version w/o explicit controls, e.g. for page decor.

A Little Math

Harmonograph

Mathematically, a typical 4-pendulum harmonograph may be modelled by

x = ( Ax1 * sin ( Fx1 * t + Px1 ) + Ax2 * sin ( Fx2 * t + Px2 ) ) * dk
y = ( Ay1 * sin ( Fy1 * t + Py1 ) + Ay2 * sin ( Fy2 * t + Py2 ) ) * dk

where the As are amplitudes, the Fs are frequencies, the Ps are phases, and dk = exp ( -k * t ), for some constant k.

Spirograph

The spirograph is

x = ( R + r ) * cos ( t ) - ( r + O ) * cos ( ( (R + r ) / r ) * t )
y = ( R + r ) * sin ( t ) - ( r + O ) * sin ( ( (R + r ) / r ) * t )

which is a harmonogram, by setting the decay constant to zero, Ax1 = R + r, etc, and adjusting the phase offsets to transform sine to cosine and to switch + to -.

Lissajous

Lissajous is simply

x = sin ( n * t + c )
y = cos ( t )

which again, can be derived from the harmonogram by suitable choice of parameters.

A Lissajous figure is a path traced out in the plane by a particle each of whose coordinates are under simple harmonic motion. Such trajectories are often encountered in physics.

Lissajous figures are sometimes called Bowditch curves after Nathaniel Bowditch who considered them in 1815. They were studied in more detail (independently) by Jules-Antoine Lissajous in 1857.

Harmonographs

Typically found in science museums, there are two basic forms: one comprises a large, heavy, rectangular platform suspended at all four corners by wires. The platform can be swung and twisted, and it can wobble forwards and backwards, side to side, and rotate a bit too. The other basic form comprises two or more pendula (or pendulums...) whose top ends extend a little bit above their axis, and are coupled to a pen suspended resting on a piece of paper placed on the platform of the Harmonograph.

The platform or the pendula are set in motion by hand. The oscillations decay, with the resulting curves getting smaller and smaller, spiralling in in a highly wobbly way. Weights are often located at various positions on the table to produce different oscillatory patterns, or the pendula lengths are adjusted.

The harmonograph was pioneered by the French physicist, Jules Antoine Lissajous in 1857. The first harmonograph actually used a light beam on a screen instead of the pens on paper that are used today. You can make your own by suspending a pencil flashlight from the ceiling by a number (e.g. 3) of strings (connect the flashlight by a few feet of string to the knot where you join the ceiling strings). Place a camera under the flashlight, darken the room and open the lens shutter for several seconds, and set the flashlight swinging in an arc.

Following the invention of the harmonograph it became a very popular device and was found in many homes. After the early 1900s it decreased in popularity and is rarely seen today.

References

Cundy, H. and Rollett, A.
The Harmonograph
Mathematical Models, 3rd ed. Stradbroke,
England: Tarquin Pub., pp. 244-248, 1989.

Wells, D.
The Penguin Dictionary of Curious and Interesting Geometry.
London: Penguin, pp. 92-93, 1991.

Search the web for Harmonograms, Spirographs, and Lissajous Figures. Search the web for Java OR Mathematics OR Science OR Optical Illusions and Moiré Patterns.