This page was automatically generated by NetLogo 3.0.2. Questions, problems? Contact

The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.

Tree Growth Simulation

an experiment in emergence

created with NetLogo

view/download model file: tree.nlogo

In an attempt to learn a bit about how Netlogo works, I decided to try to model the growth of a tree.

The model begins with a single agent at the bottom of the screen, which moves upwards (grows toward the sun), branches (creates a second agent), and possibly dies on each step of growth.

There are several controls to play with.

  • Grow_Until determines how many cycles (including branching and death) the program will complete when you click on the Grow button.
  • Growth_Rate determines how far each branch will grow during one step.
  • Range_Of_Random_Direction is the range within which each branch will randomly aim. Each branch is created with its own randomly-selected goal located on the X axis along the top of the screen. Each step, after growing, a branch will re-determine its direction for growing during the next step. The direction will be towards the goal, but fall within a range of the size specified by Range_Of_Random_Direction.
  • Branching_Frequency determines how many growths will occur on a branch before another branches off from it.
  • PercentStop is the likelihood that any particular branch will cease to grow during each cycle.

    Note the slider at the top of the screen is all the way to the right. This makes the tree draw immediately. As you slide it to the left, it slows down the program so that you can observe the tree 'growing.'

    Notice that when a new branch is created, it and the branch it came from are each slightly smaller in width.
    WARNING: Since branches multiply exponentially, it's best to clear the screen and start over with the Setup button after creating a tree. This is why the Grow_Until button only goes up to 10 - your computer may lock up trying to complete more cycles.

    Try setting the Growth_Rate very low and the Branching_Frequency to 1. Notice that sometimes the tree grows down and out the top of the screen. The primitive I used in the code was towards-nowrap, which returns the direction of the goal patch without accounting for the screen wrapping (which can be the shortest path). Yet in some extreme examples, the tree still grows roots. I haven't yet figured out why - maybe you can.

    I'd be interested in knowing if anyone adds anything interesting.

    I considered starting the tree in the center of the screen and starting with 2 agents doing the exact same thing, except that one will aim down for roots at the same time that one aims up for branches. It might be interesting to see what kind of symmetry occurs. I once heard that a tree's roots spread out as far as its branches. Perhaps the same would happen with our virtual tree.

    Kathleen Maffei