Background
Circle2 is based on an algorithm by John E. Connett originally published by A. K. Dewdney in his "Computer Recreations" column in the September 1986 issue of Scientific American. I first implimented it in HyperTalk on a Mac SE circa 1988. It became something of a "Hello, World" type program for me, and I have since written numerous versions in Pascal, C, lisp, NeXTStep, etc., and now in perl/GD with an HTML interface.

The algorithm is really quite simple. It uses the equation for a circle (x2*y2) for each point in the grid, and then colours the point black if the result is even, white if it is odd. Mutiple colours are achieved by dividing the result by the number of colours and assigning a colour based on the remainder.

Center
The x and y values determine where the image will be centered on the plane. If left blank, they will default to 0,0. If the "random" box is checked, they will be assigned a random number between -25000 and 25000. Numbers much greater than this may fall outside of the set.

Zoom
The zoom value (or more acurately zoom away) represents how far away the image is being observed from. If the "random" box is checked, and/or the value is left blank, it will be assigned a random number between 1 and 20 to two decimal places. Values between 5 and 15 tend to yield the "prettiest" results, but depending on the number of colours and your own tastes there are plenty of interesting and beautiful vantage points.

Colours
In the standard mode you can choose between black, white, and the main spectrum colours. If no colours are selected, black and white will be used. If only one colour is selected, either black or white (as appropriate) will be added.

Random Values
The program is set up to choose random values for a number of the inputs if you so desire. For more information, see the section pertinent to the input in question.

Width
The width attributes let you specify the screen size of the image in the extended mode. You can set x and y seperately to create rectangles. If no value is given the default width of 300 pixels is used.

Custom Colours
In the extended mode, you can supply the program with yr own choice of custom colours. To use a custom colour, check the box next to the input fields and suply the red, green, and blue values for the colour. Values should be in the range of 0-255, an empty field is considered a 0.

Comments? Questions?
This site is designed, coded, and maintained by rev. bean. If you have any questions, comments, or suggestions please send an email to hermes@xochipilli.com.