The pattern traced out by Trochor is what you’d get if you took a pencil moving in ellipses, and used it to draw on a sheet of paper that’s also moving in ellipses. It’s a bit like a spirograph, but not constrained in quite the same ways. It’s more like a harmonograph; more on that later.
Have fun, play around with the settings, especially ‘ratio’; that’s probably the best way of figuring out what’s going on. ‘Eccentricity’, by the way, is a measure of how flattened 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 (Î¸)
y = radius * sin (Î¸)
- 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 (Î¸)
+ radius2 * cos (ratio * Î¸)
y = radius1 * sin (Î¸)
+ radius2 * sin (ratio * Î¸)
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 (Î¸) + radius2 * cos (ratio * Î¸ + f)
y = radius1 * sin (Î¸) + radius2 * sin (ratio * Î¸ – 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.
Harmonograph provides an impressively clear and thorough introduction to the basics of music theory, and ways of visualising music.
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 arbitrarily restricted to whole-number ratios between the two drivers.
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
(Î¸) + axis2a * cos (ratio * Î¸ + f))
y =(1-damping)n * (axis1b * sin (Î¸) + axis1b * sin (ratio * Î¸ – f))
The code for this applet is available for anyone curious – but bear in mind I wrote most of this around eight years ago, and the rest three years or so after that, and it’s not necessarily the best code! I should probably re-do this in Processing really.