Spirograph Emulator: Executable or Text Version

Visual C# version: Executable or Text Version

Visual C# Multiple Spirograph: Executable

SpiroDirect: Executable or Text Version

SpiroDirect is new as of October 2017. It is quite fast, doing all the graphics in Assembler, using direct access to screen memory via a DIB Section, and incorporating my own very crude anti-aliased line drawing. It SHOULD work with a screen of any dimensions.

If you're as old as me, you'll remember a toy called SPIROGRAPH. The original version consisted of patterns made by putting a pen through a hole in a toothed wheel, and rolling it around the inside of a larger wheel.

Mathematically, it's a
CYCLOID curve rolling around on the inside of a circle, rather than on the flat. It is therefore a roulette curve specifically called a HYPOTROCHOID
A cycloid is the curve a bicycle valve makes as a bicycle wheel rolls along the road. If "R" is the radius of the big wheel, "r" is that of the small wheel, "rm" is the modified radius as far where the pen pokes through a hole, and "phi" is the angle through which the smaller wheel has rotated, then the x and y positions on screen are given by;

X = (R-r)*sin(r*phi/R) - rm*sin[(1-r/R)*phi]

Y = -(R-r)*cos(r*phi/R) - rm*cos[(1-r/R)*phi]

Solid Spirograph: Executable or Text Version

An example of the result from this program is shown below.

Return to Top Page

Next Page