Psychedelic Trigonometry (c) 1989

Great things often arrive by accident.

In a Cal Poly Pomona computer lab, late one night, while distracted from a compiler project towards a Computer Science degree, I was playing with the raster functions of TurboPascal, and wrote a program to draw an Archimedes spiral by converting the equation:

r = theta
...into the Cartesian equivalent:
x = theta * cos(theta *  (pi / 180))
y = theta * sin(theta *  (pi / 180))
...and plotting the pixels in a manually-created windowing environment (DOS, pre-Windows)

The spiral I'd expected, however, instead became a lissajou figure (caused by a misplaced term in the conversion).  Intrigued, I varied other elements to spice it up, and wound up crafting a full software package (download Win32 executable here)


Sample screenshot:

The source was built using modern-at-the-time platform:

With the layers Microsoft inserts in the OS between video drivers and my application, I was surprised to find the binary I'd built back in 1989 still runs on Windows 2000.  Note the delays between movement of the pig's eyes used to be longer so he used to be curious about the main window (rather than frenetic, as he is now). 

As with all software, this project is unfinished and, in fact, never moved beyond a beta release to my friends on campus.  Intending to finish it "some day", I allowed the code to languish on a floppy disk while embarking in 1989 on the first of several "real jobs" (e.g  creating the 12,000-line water display package for MWD, System Information Graphics (c)1990.

After watching its creation in 1989, my buddy in the lab, John Kelly persuaded me to dust off the code and post it here for your pleasure.
I hope you enjoy playing with it on your PC as much as I enjoyed writing it.
If you want help using it, please contact me:

Matthew Reiser
December 2001