## Spirographs and the third dimension The basic geometric ideas are straight lines and circles. The famous compass and straight edge.  There is a great deal that can be done with just these, but what if you want something more complex? Spirographs are a very simple idea, let one circle run around a second. You can make the circles as cogs and then you get a classic toy. In mathematics there is a mess of names to describe the curves produced, I shall just list them, understanding the differences is a good way of learning the subject: epicycloid, hypocycloid, epitrochoid, hypotrochoid. It is easy to find lots of examples of these curves online.

So where can we go to generalise. The first trick is to add more circles. Adding circles like this gave one of the first predictive models of the planets as they move in their strange paths across the sky.  Unfortunately if you add enough circles you can actually get any curve you want, so the method could never be disproved, though it was eventually replaced starting with the brilliance of Copernicus who put forward a model of the solar system with the sun at the center. To make images with more than two circle you obviously need a more complicated device as the circles might bump into each other (just think of three cogs). Luckily humanity was up to the challenge and produced the geometric chuck.

Now we want to go further, to try to make similar figures in 3d. The first step is to get tools we can play with more easily than simply describing the geometry. We need a more algebraic form that we can give to the computer, and some way of simply describing the circles. The geometry comes first.  Here are the cogs: The sizes of the two cogs show how fast they go round each other. In this case, we have a cog with 30 pegs and a cog with 10. The smaller cog will therefore go round 3 times every time it goes once round the big cog.  We now look at the red point on the smaller cog and watch it move along the green line.  How do we model this?

Firstly lets consider circles. We have the circles for the two cogs, but these are not very useful. We can look instead at the grey circle. The centre of the small cog moves round this circle. The black circle on the small cog then shows how the red dot moves. The final position is the position on the two circles added together. To plot the curve we need to consider both circles moving round. If we let the big circle go round once, the small circle will go round four times (once for the large circle rotating and three going round the large circle).  We also need to know the sizes of the two circles, in this case 5 and 1 (I will not give units as only the relative sizes effect the shape).  The path given by these cogs can therefore be encoded as (1,5) + (4,1).

Now recall the parametric formula for a circle: $(sin(x),cos(x))$, for x between 0 and $2 \pi$. This equation allow a computer to draw a circle as we put in values of x and plot the point in 2d. Adding the two circles together therefore we get a parametric formula: $5 (sin(x), (cos(x))+(sin(4x),cos(4x)) = (5 sin(x) + sin (4x), 5 cos(x) + cos (4x))$

Note how we would just get the points in the circle repeated four times from the second part $(sin(4x),cos(4x))$, were it not for the addition. We can therefore consider epicycles as adding circles of different radii, moving at different speeds, together.

Finally we can get to the title and leap to 3d. We can have circles in 3d, so lets add them together. We have an additional problem however. Circles are flat, so the same circle can be put in 3d at different angles, we must also consider the plane in which each circle lies. If we put all circles in the same plane we are stuck in 2d, so where can we put them?

One simple solution is to put the three circles on the faces of a cube: Cube face epicycles: Left: (2,1)+(17,1)+(23,1) Right: (2,1)+(17,2)+(19,3)

There is something unsatisfying about these curves. For one thing the circles moving on faces reminds more of Lissajous curves rather than spirographs. Although we are adding circles it is hard to see where the cogs might be. Maybe another approach is required. A different approach would be to consider cogs with 45 degree angles. In other words one gear is at right angles to the previous one:

Each circle other than the first now moves on a plane that itself is moving, staying at right angles to the plane of the previous circle.  It takes a bit of thinking to work out what is happening! So lets cut to two more items from my mathematical museum of dreams: 3d cog spirographs: Left: (1,10)+(20,20)+(61,3) Right: (20,10)+(1,20)+(1,30)+(21,20)

Even better a real version (the work of Richard Grimes): 3d Spirograph by Richard Grimes

[Update: 15/1/10 Daniel Piker has a beautiful animation showing how the circles move for yet another version of the 3d spirograph]

So far we have assumed that we take circles in 2d to circles in 3d. Is this the only analogue of a circle? The circle is a one dimensional object. In two dimensions, therefore it has one less dimension than the space. Perhaps we can consider two dimensional objects when we go to three dimensions. There are two natural two dimensional generalisations of the circle: the sphere and the torus (donut). The torus can be thought of one circle moved round a second, as you can see here the red circles can be moved round the blue circle to make the torus: As the torus is made up of circles it is perhaps more natural in this setting. We then have five pieces of information to describe a torus. The radii of the two circles and the speed at which we travel round them plus (as with circles) the plane the larger circle lies on.  Playing with these (and again adding two or more tori together gives some very nice objects. I started with one, so here is a second to finish:

Acknowledgements: Inspiration and most of the best ideas on spirographs come from conversations with Richard Grimes. The 3d renderings are made using Blender and LuxRender. Thanks to Ian Hopkinson (@SmallCasserole) for introducing me to this.