Lindenmayer Systems (L-Systems)

If it's not open already, Click to launch Fractal Grower

We'll start by exploring some of the preset L-Systems to try to approximate some natural fractal plants.


You can use the "Twig" preset with a Turn Angle of 60 degrees to create the image on the top right

Play around with the sliders in the various presets to create a few other shapes that resemble familiar plants.


In the following exercises you will be creating fractals in the Fractal Grower program, and will be saving images you create, and pasting them into a solution document that you will email to your instructor. (?)
To capture an image, first shrink the main Fractal Grower window to about 3 inches wide. In Windows XP, use <Alt>-printscreen to capture the Fractal Grower window. In Windows Vista, use the Snipping Tool, and in Mac OS X use Apple-Shift-4. (Make sure to shrink the window before capturing, as otherwise the images will be too large for emailing.)


1: Turn Angle, Growth, and the Symbols f and !

Figure A below shows generation 7 of the Twig preset. (The image is shown on a white background so that if this document is printed, it will use less ink than it would if the background were black.) There are two types of lines in the Twig preset: Lines drawn by the "f" symbol (These are the tips of the branches) and lines drawn by the "!" symbol. The growth slider has no effect on the length of "f" lines, but changes the length of lines drawn by the "!" symbol. In particular, when growth = 1, "f" lines and all "!" lines have the same length. When growth is larger than 1, "!" lines get longer with age. New "!" lines are always the same length as "f" lines, but older "!" lines get longer and longer. What do you think is meant by older "!" lines? This idea of symbol age is describe in the on-line help, but see if you can figure out what means by playing with the software.

Figure A: Generation 7
of Twig preset
Figure B: Generation 7
of variation of Twig preset


Assignment:
  • By changing the turn angle and growth value it is possible to morph figure A into figure B. Do so, and record the required values of Turn Angle and Growth.

  • Starting with the Twig preset, make modifications to the Turn Angle, Growth and Start Angle until you create an image you think is cool. Capture the image and paste it into your solution document. Record the parameters you used to create the image.


2: Drawing with Fractal Grower

Next, let's become familiar with how to define the starting shape or axiom in Fractal Grower. We can use the procedure of drawing line segments 'f' and then rotating with the '+' or '-' symbols to draw any simple pattern we wish. You can think of the image as being drawn by a turtle following simple instructions, forward, left, and right. Play in the axiom editor, and practice!

Let's start with a relatively simple exercise, and draw your initials. You'll use the first iteration for this exercise, so only the axiom matters, not the rule. You will need to carefully choose your Start Angle and Turn Angle.


The author's initials, created with the axiom:
af-f--f-ff--f++++ff++gbff---ff+++ff---ff




Assignment:
Capture the image of your initials, made in Fractal Grower. Paste it into your solution document. Include the axiom you created.


3: Changing the Rules

Figures C and D show generations 1 and 4 of the Fern preset. The axiom for this preset is "f", a single line. The preset has one rule that replaces the "f" with four stem segments (the four "!" symbols in the rule) and with seven branches (three on each side and one at the tip).

Change the Fern preset rule so that only 4 branches are created. Also change the angle of the branches so that some of the branches are narrower and others are wider. Figure 6 shows an example of generation 7 of the fern preset with only 4 branches and with the relative branch angles changed. You may choose to remove a different three branches. Note: adjustments to the Turn Angle slider change all of the angles and make all larger or all smaller. To make some angles smaller and some larger, you need to change the production rule. Create a fern with 4 branches and a set of branch angles that you find pleasing. Paste a cropped screen capture of generation 1 and a cropped screen capture of a higher generation into your solution document. Record in your solution document the parameters (axiom, rules, turn angle, start angle, and growth) of your creation.

Figure C:
Generation 1 of Fern preset
Figure D:
Generation 6 of Fern preset
Figure E:
Generation 7 of Fern preset
with 3 branches removed and
relative branch angles changed.


Assignment:
Create a fern with 4 branches and a set of branch angles that you find pleasing. Paste a cropped screen capture of generation 1 and a cropped screen capture of a higher generation into your solution document. Record in your solution document the parameters (axiom, rules, turn angle, start angle, and growth) of your creation.