At the forefront of Artificial Intelligence
  Home Articles Reviews Interviews JDK Glossary Features Discussion Search
Home » Articles » Artificial Life » Applications/Code

L-Systems Explorer

Download here (94K) - Note: you will need MFC42.DLL to run this.

LSE, or L-Systems Explorer, is a program that allows you to design or view Lindenmeyer Systems (L-Systems). L-Systems are simple string-based commands (much like Turtle graphics) that allow various shapes to be drawn. The interest in Artificial Life is that they can create very life-like tree structures from simple commands. LSE was designed to replace LSD, since the dialog-based nature of the program limited what could be done with it. This more advanced program was inspired by the drawings and chapter on L-Systems in The Computational Beauty of Nature.

LSE has the following improvements:

  • Allows for up to 26 different rules
  • Loading and saving of rules
  • Zooming, panning and depth adjustment.
  • Recursive drawing instead of preprocessing string (much more efficient!)
  • Additional L-Systems support
These new features can result in images such as these (note: the images don't thumbnail too well - I recommend you view the full pictures):

Note this is the same L-System, with the depths set at 0-4 from left to right.

L-System Commands

L-Systems Explorer allows you to assign up to 26 recursive rules. When the rules are expanded, the following commands are understood:
  • F - Move forward by X amount, drawing a line.
  • G - Move forward by X amount, without drawing line (note, f can be used too)
  • + - Rotate by theta degrees in the positive direction.
  • - - Rotate by theta degrees in the negative direction.
  • [ - Push the draw state (position and angle) on the stack.
  • ] - Pop the draw state (position and angle) off the stack.
  • | - Move forward by stepped amount.
The user specifies X and theta. You may also use numbers to specify multiple angle increments or decrements - therefore, the following two statements are equivalent: "4+F" and "++++F".

A final clarification, the '|' command is a little strange. It differs from the F command because it is not recursively expanded. When an F is reached, it is often substituted for whatever the F-rule specifies, and the segment length is decreased by a certain percentage, therefore the only F-commands that get interpreted are the commands at the final depth. This is not so with the '|' command, allowing a little more control over the segment lengths.

Using LSE

LSE is simple to use, try loading in some of the preset systems (*.lse) and then messing about with the parameters. All parameters can be accessing using the "Edit, L-Systems..." command. This will bring up a dialog box with all the parameters, the axiom and rules.

Once the system has been drawn you can pan the system about by dragging with your mouse. Note holding down Ctrl while dragging will force the L-system to start drawing from the mouse position. For those of you with an IntelliMouse, you can increase the segment size by scrolling up and down, if you hold down the Ctrl key and scroll it will increase the depth. Note this has to be turned on in the options, since it is easy to draw at a depth that takes too long to execute, effectively hanging LSE.

Version 1.1

A few bugs fixed, and gradient support added. It is now a lot easier to see how the image is drawn using the gradient support.

Last Updated: 09/08/2002

Article content copyright © James Matthews, 2002.
 Article Toolbar
BibTeX entry


Latest News
- The Latest (03/04/2012)
- Generation5 10-year Anniversary (03/09/2008)
- New Generation5 Design! (09/04/2007)
- Happy New Year 2007 (02/01/2007)
- Where has Generation5 Gone?! (04/11/2005)

What's New?
- Back-propagation using the Generation5 JDK (07/04/2008)
- Hough Transforms (02/01/2008)
- Kohonen-based Image Analysis using the Generation5 JDK (11/12/2007)
- Modelling Bacterium using the JDK (19/03/2007)
- Modelling Bacterium using the JDK (19/03/2007)

All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -