Gnat Cloud is but a step in an ongoing search for my own personal holy grail. Flocking simulations have been around for years and have even made their break into standard industries; they are often used to create naturalistic animal herds as a special effects in movies. However, a few years ago I saw a video of a flock of martins flying over a river in Africa, and this flock numbered in the hundreds of thousands, if not millions. I noticed that there were visual patterns present in this swarm of birds that are not visible in conventional bird flocks and don't exhibit themselves in low-resolution (by which I am referring to the population of the flock) flocking simulations.
A series of screen captures of every fifth frame are shown here. The program is smoother than this appears.
I have made one attempt to create a massive flocking program before which I based on a fast but cheating flocking algorithm originally written by Alex Vulliamy. The result was Mega Flies, another of my alife programs. Mega Flies has a few problems though. The first and most glaring problem is that right-angle based artifacts appear in the midst of the swarm. Such patterns include hollow crosses, squares, horizontal and vertical lines, and parallelogram-shaped "wings". These artifacts were the product of the X-Y coordinate system in which the swarm flew and while being quite alluring they were hardly natural. Another problem with Mega Flies was that it was a two-dimensional flocking simulation (as most flocking sims tend to be). I was not seeing the patterns in Mega Flies that I had seen in the video of the martins (or that are somewhat visible in a swarm of bees), and one theory I had for their absence in Mega Flies was that the patterns were probably the result (at least in some cases) of looking through a three-dimensional swarm. As the martins curved up and away, and then over the top and down behind other parts of the swarm, there were interference patterns that created the visual phenomena I was viewing. A third problem, not really the fault of Mega Flies, but more the fault of computer technology in 1997, was that Mega Flies would animate a couple thousand individuals at an acceptable speed, much to my glee when compared to other sims of mere hundreds, but not several tens of thousands. Computers just weren't fast enough.
Gnat Cloud is the natural continuation of Mega Flies. The first thing I did was utterly eliminate the false right-angle artifacts. While doing this I went ahead and abandoned Alex's original flocking algorithm and made my own. The new algorithm is both more accurate in keeping track of neighbors and still as fast if not faster than the original algorithm. Adding a third dimension to the program almost didn't happen but I really wanted to see what would happen when I tried to look through a three dimensional swarm on the screen. The results are so incredible that I consider this change to be the paramount addition I made to Gnat Cloud. It is funny to think that it was at the bottom of my list of priorities when I started the project.
The new three dimensional model creates patterns which, while vaguely present in Mega Flies are absolutely stunning in Gnat Cloud. For example, Mega Flies was quite capable of producing orbiting bodies that circled around heavier bodies, but Gnat Cloud can spawn entire galaxies with spiral arms spinning in flattened disks and nebulous clouds circling in long ellipses, all in three stunning dimensions of realism. Similarly, while Mega Flies would produce clumps that would sweep around a two dimensional screen, Gnat Cloud will create startling three dimensional clouds that loop around in all three dimensions yielding marvelous visual patterns.
I am so pleased with Gnat Cloud's performance that I think it will still be a viable program in a few years when computers are much faster than they are at this time. For that reason I have enabled Gnat Cloud to create a population of up to 96,000 gnats. No desktop computer today can do such a confluence its due credit, but further down the timeline, it might be a magnificent program to pull out and run as its increasing capability animates thicker clouds of gnats.
Gnat Cloud is freeware and will run on any Power Macintosh computer (30 megs RAM required, G3 recommended).