A Spirograph was a toy that was wildly popular in the 70s. It produced patterns by placing a pen inside a rolling plastic wheel and rotating it inside or around a larger stationary wheel, thus causing the pen to draw interesting things on the paper secured beneath the wheels. By switching wheels and changing the color of the pen, many beautiful designs could be produced.

Spirographs were made by Kenner Toys, going back at least as early as 1967, however similar toys were sold by various companies dating back at least to 1946. Their popularity has waned in the past 20 years, probably because of those damned Nintendos.

The exact mathematical formulae for the Spirograph is as follows:

If the radius of fixed circle is R, the radius of moving circle is r, and the offset of the pen point in the moving circle is O, then the equation of the resulting curve is defined by:

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

Information for this writeup was drawn (heh) from, of all places, eBay.