HOW THE ALGORITHMS WORK

The program first executes a trial run of the computations in order to scale the simulation to the available computer screen area (discussed above). This scaling run, in which nothing is plotted, is accomplished by the outermost Do...While loop of the program in which the value of "trial" and "scaled" go from a value of zero to one. Actual plotting of the computations begins when the value of "trial" exceeds one, during which the Convert Subroutine is called in order to convert the cylindrical coordinate computations into cartesian coordinates for screen plotting.

The growth of the central helical axis in the colony simulation, and position of the nodes on the helix for the basal branches of the colony, is calculated in two sequential For...Next loops in the "Make Central Helix" and "Make Initial Growing Tips" sections of the program. The geometry of the helix, and placement of the basal branch nodes, is determined by the geometric parameters ELEV, RAD, ANG, WHORLS, and GROW. The values of the model parameters ELEV, ANG, and WHORLS (the number of whorls in the helix) can be specified by the user for each simulation. The parameters RAD and GROW (the linear magnitude of each growth increment) are set as constants in the program (at the value of 2 and 0.5, respectively). If the user wishes to change these default values, they may be changed directly in the code.

The growth of the branches in the colony simulation is calculated in the "BEGIN MAIN PROGRAM" section of the code. This entire section consists of two subsections: (1) algorithms determining the growth of each branch tip, and (2) algorithms determining when a branch bifurcates to produce two new branches:

  1. In the first subsection, the growth of all branch tips "j" within a given growth increment "k" is calculated in two sequential For...Next loops: the first calculates and plots the positions of the new tips relative to that of the old tips, and the second rewrites the old tip positions in terms of the new so that the next round of new tip positions may be calculated.
  2. In the second subsection, bifurcations of the growing branches are calculated in the "Loop for Bifurcations" section of the code. This section consists of an outer Do...Until loop, and three sequential inner For...Next loops. The first For...Next loop calculates the spatial positions of the growing branch tips and determines when a tip must bifurcate (i.e., when the model parameter distance XMIN is reached). Also within this For...Next loop is contained the subroutine that subjects the value of XMIN to Gaussian random variation (as discussed above). This section of the code calculates the positions of the two new tips that bifurcate from the old tip and draws the simulation branch crossbar between them. The next two For...Next loops save the positions of the new tips and rewrite the old tip positions in terms of the new so that the next round of new tip positions may be calculated. The outer Do...Until loop iterates these three inner For...Next loops, conducting a census across all growing tips within the colony. When this census is complete, the Do...Until loop ends, and the outermost For...Next loop of the program begins again for the next growth increment "k."