Home Download Help Resources Extensions FAQ References Contact Us Donate Models: Library Community Modeling Commons User Manuals: Web Printable Chinese Czech Japanese Spanish

NetLogo Models Library: 
If you download the NetLogo application, this model is included. (You can also run this model in your browser, but we don't recommend it; details here.) 
This program draws special types of pictures called fractals. A fractal is a shape that is selfsimilar  that is, it looks the same no matter how closely you zoom in or out. For instance, a tree can be thought of as a fractal since if you look at the tree as a whole, you see a stick, that is to say the trunk, with branches coming out of it. Then if you look at a smaller portion of it, say a branch, you see a similar thing, namely, a stick with branches coming out of it.
Perhaps the best way to start with this program is by looking at an example of a fractal. In the "Interface" tab, press the SETUP button to set up a fractal that draws a tree. Then press the GO button and watch it draw.
You can also have the fractal drawn one step a time. Once you click the SETUP button, instead of clicking the GO button, click on the GO ONCE button. This draws the fractal by drawing one iteration of the fractal per click as opposed to continuously, like the GO button.
If you don't like the location of the fractal you can change it by modifying the value of the following sliders: The INITX slider sets the initial x coordinate of the first turtle. It changes the horizontal starting location of the original turtle. The INITY slider sets the initial y coordinate of the first turtle. It changes the vertical starting location of the original turtle.
If you don't like the color scheme of the fractal you can change it by modifying the value of the following sliders: The INITCOLOR slider sets the initial color of the first turtle. The value of the COLORINC slider is added to the turtles color anytime a new turtle hatches.
The NUM TURTLES monitor indicates how many turtles are currently alive.
It might be best to limit the number of iterations to about 8 or 9 of any particular fractal. If you go much more than that, NetLogo might run out of memory.
Notice the selfsimilarity of the fractal at each iteration. What if one were to perform an infinite number of iterations? Would looking at any piece up close look any different than looking at the whole? Also notice how the number of turtles in each of the example is multiplied by some number at each iteration. Does this make sense? Try to figure out the number of turtles at some arbitrary step n.
Now that you have played around with settings for the example provided, why not try making your own tree fractals. Use NetLogo commands to make your own fractals that look like trees. Then change the initial color and color increment values to make the fractal more interesting to look at.
Try adding switches or sliders such as maxincrementrandomlength or minincrementrandomdegree or randomlength that could impose a random factor to the movement of the turtles. The use of these plus the NetLogo primitive random
would increase the realism in a fractal. This would be especially useful in drawing realistic trees since branches are not spaced uniformly on a tree nor do they all branch from the trunk at the same angle.
Pick up a book on fractals or search on the internet to find fractals that are interesting and try to create them. Also try to find different types of fractals such as LSystem Fractals. You may find some resources below.
Try starting with more than just one turtle, in a different location or heading, and see how that can affect the fractals that you have made. Does it ruin them or does it make them more interesting and complex?
Try to make a realistic forest. Does this require vastly different commands from making a realistic tree?
Notice the use of agentsets to make some of the commands only affect certain turtles. For example, the reporter with
is used to isolate nonnew turtles and have the rules only affect them.
Also notice how the fractals are formed using several agents following the same rules through the use of the hatch
primitive which makes it so simple to generate fractals like a tree.
LSystem Fractals
This site offers an introduction to fractals, including Lsystem fractals as well as others: http://web.cs.wpi.edu/~matt/courses/cs563/talks/cbyrd/pres1.html.
The Fractal Geometry of Nature by Benoit Mandelbrot
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 2001 Uri Wilensky.
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORKBASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs)  grant numbers REC #9814682 and REC0126227.
(back to the NetLogo Models Library)