« Login to iX Connection »

WanderingPolygon Screen Saver

This screen saver repeatedly draws a polygon on the screen. Each polygon has from three to nine vertices, and each vertex bounces around the screen continuously.

Unlike the similar Qix module, the polygon has no "tail" to it, so it will eventually fill the screen with color. Periodically the screen is cleared and a new polygon, with a different number of vertices, is chosen.

Also unlike the Qix module, vertices which bounce off the sides of the screen do not "reflect". Instead, they can bounce off the edge at any random angle. This gives the screensaver a very whimsical feel.


image of WanderingPolygon preference pane
WanderingPolygon Preferences

In this screen saver there are three basic parameters available to you, "Speed", "Vertices", and "Erase Screen".

"Speed" controls the screen saver's attempted frame rate and ranges from 10 to 100 frames per second. Of course, the actual frame rate achieved will depend upon your computer's ability to keep up. As such, you may not be able to get a full 100 frames per second even if you request it. Setting the speed lower will use less CPU, which may be important if you are running background processes such as SETI@home or a web server. The default setting is 50 frames per second.

"Vertices" controls how many vertices the polygons have. You can set it to a value from three to nine and the polygons will always have that number of vertices. If you set it to "Random" then each new polygon will have a number of vertices that has been randomly chosen from the range of three to nine. The default is to randomly choose the number of vertices.

"Erase Screen" controls how often the screen will be erased to solid black. Setting the slider all the way to the "Often" setting will clear the screen after 100 polygons have been drawn. Setting it all the way to "Seldom" will make it clear the screen after 15,000 polygons have been drawn. The default is to erase the screen after 5,000 polygons have been drawn.


The Wandering Polygon screensaver module is based on a module written by Karl Kraft for NEXTSTEP's BackSpace screen saver program.

We have retained much of the original module's code, but the actual drawing code itself is all new and radically different. We have given the module new options and features, tuned it to look great on Mac OS X, and based the new Objective-C code upon Apple's Quartz and Cocoa technologies.