The sentence above is the completed sentence fragment shown when you first start the program. Fear not! There are no biohazards associated with this program!
It was named "Petri Dish" because the growing Diffusion Limited Aggregation (DLA) reminded me of an organic culture growing in a laboratory petri dish. It also reminded me of a sea coral growing larger via time-lapse video. It's just easier, to make the splash screen look like a petri dish, than trying to draw a complete underwater scene.
A DLA is created by starting with a seed location, in Petri's case, at the center of the graphic screen. Random walkers are set at locations surrounding the seed, and randomly 'walk' (see Brownian Motion) until a walker bumps into the seed. It then 'sticks' to the seed to become part of the seed and a new random walker is spawned. This process continues, growing the 'seed', until a pre-defined maximum size is achieved.
A good article explaning what a DLA is can be found here.
You can also do a search engine look up for "Diffusion Limited Aggregation". One of the more interesting links is Coding Challenge #34 on "The Coding Train" a Youtube video showing how one can program the DLA using "Processing" (a Java like language).
4) Click the "New DLA" button. A DLA will now begin to draw on the screen. When completed, the elapsed time in seconds and the number of DLA dots drawn will be seen at the top of the DLA screen.
Once a DLA has been generated, a 'map' array of the DLA is stored in memory. The 'map' array is created every time you generate a new DLA, or load a 'map' array from disk. From the generated or loaded 'map' array you can now "Re-Color" a DLA or, "Save DLA map array to disk" or, "Load DLA map array from disk". You can also "Save DLA to BMP" once a DLA has been generated.
Voila! A new combination of DLA colors is shown. You can do this as many times as you feel is necessary to get just the right looking DLA.
The size is the same as the the DLA size used to generate the DLA. The date and time are formatted for sorting, and valid filename characters.
This method was chosen to keep all of your saved DLA map arrays in chronological order when displaying a file listing.
A 128x128 DLA takes about 0.25 seconds
A 256x256 DLA takes about 0.50 seconds
A 512x512 DLA takes about 3.00 seconds
(These are reference times, actual times will depend on the speed of your computer.)
There is no way to predict exact times because of the Brownian motion used to generate a DLA. Some random walks will take a lot of steps, while other random walks take relatively few steps.
The two smaller sizes have been scaled up to the size of the largest DLA size when displayed on screen. The DLA map arrays for all sizes are stored on disk in it's actual size.
The image below shows the actual size of each of the three DLA sizes.