Version 1: A black and white affair. Maxes out at 300 circles, and then begins re-drawing them.
Version 2: Color. And more circles. Up to 1000 on stage at a time. The colors are randomly generated in pairs every 25 circles or so.
Version 3: Multiplicity. The colors still randomize, but now there's twelve drawn at a time.
Note: Due to the number of circles being drawn, Flash gets waaay laggy when getting over 1000. The solution? When the 1000th circle is drawn, it begins drawing them back down the layer structure, in order. There's only at most 1000 on stage at once.
The original file where I banged out the math is here.
Dynamic Circles
A brief widget utilizing the Flash drawing API to create circles.
Just move the mouse around the white area and get mesmerized.