"Trochoid style"

Animated Virtual Harmonograph

Have fun, play around with the settings; that's probably the best way of figuring out what's going on.
It's pretty hard to give a concise description of it in English.
So far, the best I've come up with is to say that it's two interacting ellipses, a bit like a spirograph.
'Eccentricity', by the way, is a measure of how non-circular an ellipse is - an ellipse with 0 eccentricity is a circle, one with 1 is a line.

The Long Version

I first stumbled on trochoids by playing around with plotting trigonometric functions.
I wondered what would happen if you took the basic parametric equations for plotting a circle -

x = radius * cos (q)
y = radius * sin (q)

- and added them to the equation for another circle, turning more than one circle in the time it takes to draw the first one,
so we get something like the trails left by a point on a wheel rolling around another wheel (an epitrochoid or hypotrochoid), with these equations:

x = radius1 * cos (q) + radius2 * cos (ratio * q)
y = radius1 * sin (q) + radius2 * sin (ratio * q)

This makes some pleasing shapes, so I thought I would try animating it.
The most obvious thing to do is to change the relative phase of the first and second circles, but this just turns the whole thing round.
What's more interesting is to animate the phase of the x component (the cosine) in the opposite direction to the y component (sine):

 x = radius1 * cos (q) + radius2 * cos (ratio * q + f)
y = radius1 * sin (q) + radius2 * sin (ratio * q - f)

This makes the circle shrink to a line, then grow into a circle flowing the opposite way, and then go through the same cycle again.
Combined with the first circle, this makes the sort of animations you can see above.

Pleased with the results of this, in 2001 I made an applet to let people play with it, and that's where things stood till September 2004.

Then I read a gorgeously produced wee book called Harmonograph: A Visual Guide to the Mathematics of Music.
provides an impressively clear and thorough introduction to the basics of music theory, and ways of visualising music.
It does this in 50-odd pages, replete with beautiful illustrations of harmony made by harmonographs, kaleidophones, Chladni plates and the like.

A harmonograph is an instrument invented in the mid-nineteenth century, using two or more pendulums to produce beautiful pictures.
The pictures are especially beautiful when the ratios of the frequencies of the pendulums are close to whole numbers,
just as chords are especially beautiful when the ratios of the frequencies notes making them up are close to whole numbers.
The pictures I was making with Trochor were almost the same pictures produced by a rotary harmonograph,
except that the pendulums of a harmonograph steadily wind down as they draw, and Trochor was restricted to whole numbers.

A kaleidophone, like a harmonograph, creates images of harmonics, but these are made only fleetingly, in light.
It consists of a metal rod fixed in a stand, with a reflective bead on top, which is struck and then stroked with a bow.
A beam of light reflected from the top of it casts patterns onto a screen, rather like those of a rotary harmonograph, but more complex.
The biggest difference, judging by the illustrations I have seen, is that it is not restricted to circular motion:
Free to vibrate in any direction, it produces patterns composed of interacting linear waves and ellipses.

I have incorporated the idea of using ellipses, together with the damped spiralling motion and non-integer ratios of the harmonograph, into Trochor.
With 0 eccentricity, we are back to the rotary harmonograph; with 1, we have the linear harmonograph, producing Lissajous-type figures.

The equations of this version are as follow:

 x = (1-damping)n * (axis1a * cos (q) + axis2a * cos (ratio * q + f))
y =(1-damping)n * (axis1b * sin (q) + axis1b * sin (ratio * q - f))

See also:



The code for this applet

My main page

Animation page

Interactive animation page

Email me

(site-wide visits since 14/05/2005)