Spirograph

Tim Davis
Cmps161


The Basic Idea

The basic idea of my program is to make a spirograph.  There is an outer ring that remains stationary, while the inner disc rolls around inside it.  Your pen is in one of many holes in the disc, and it traces a cool looking design.

The nice thing about my program is that you don't have to worry about the disc on the inside slipping around and messing up your drawing.  After all, it can be very hard to do when you're pen is at a hole close to the edge of the disc.  Also, you can adjust the size of both discs with sliders, as well as the distance your pen is out from the center of the disc.  The line drawn is rainbow colored instead of being one solid color like if you drew it with a real spirograph.

With my program, you aren't even limited to physical reality!  It is possible to make the inner disc larger than the outer disc, and it is possible to put your pen out at a radius larger than the size of the disc you're putting it into.


Running the program
 

This is what you'll see when you start up the program.

The rotate sliders rotate the camera.  The "outer" slider adjusts the size of the outer ring(the big one in this picture).  The "inner" slider adjusts the size of the inner disc(the small one).  The "dist" slider adjusts the pen's distance from the center of the inner disc.  This is shown as a small red dot, but it's hard to see in this picture because it mostly got lost in the jpeg compression.  The zoom slider zooms in and out on the whole picture, so you can adjust it based on how big the spirograph design ends up being.  The animate button animates the spirograph drawing, and you end up with a neat looking drawing.  The quit button exits the program, so why would you want to use that?


These are some different images I took from the program and cropped just to show the image itself.  For the last one, I hard coded the sizes of the discs to get the lines to match up, and commented out the drawing of the discs, so you're left with one really cool spirograph drawing =]