This program was created on accident when I was researching GIS for another project. I basically wanted to have hundreds of clickable items (widgets) that had little in common except that they originated from one location on a Google map. I started thinking of ways to spread out these widgets into clusters around the target latitude/longitude position, hopefully in an esthetically pleasing ways. This program was an attempt at randomly choosing different variables for me to determine the optimal settings for this GIS program.
how the program works: Imagine the second hand of a clock that starts out small toward the center of the clock. Each minute that passes by as the second hand goes around the clock, it grows a little taller until it falls off the clock; then the whole process is repeated with a clean slate and a small second hand. Each second that goes by, a new instance of one of the dots is placed on the screen at the very tip of the second hand. These two actions are the constants and if I stopped here, I would get a perfect spiral originating from the center. To make different patterns, I essentially change the number of seconds in a minute and vary the number of times each color is repeated before selecting the next color. For example, if there are only five hypothetical seconds in this clock example's minute, we would expect to see a fan like spiral with five fins. This happens because the second hand jumps further when there are less seconds in a minute. In other words, the angle of rotation is greater when there are less seconds in a minute. In a regular minute, the second hand jumps 6° each second because (360° in a circle)/(60 seconds in a minute) = 6°. If we change the number of seconds in a minute, the angle of rotation increases proportionally. In the previous example the angle of rotation would now be 72° because (360° in a circle)/(5 seconds in a minute) = 72°, meaning the second hand would jump 72° each second. If I were to completely randomize the color or the order of the colors of the dots there would only be the simple pattern of the overall shape of the spiral itself. To make interesting sub-spirals and patterns I created a few rules for the instances of each colored dot. The first rule was to only use a limited number of colors. The second rule was to always show the colors in the same order. The part that can vary is the number of each color that appear before it switches to the next color. This combination of rules and random variables is what makes each spiral unique.