previous page

© Copyright 1993 Mario Hilgemeier

Pseudocode 1:
     A tree- or bush-generating L-system.

L  1/10 of your graphical display screen
r  1.3
alpha  30 degrees
beta  20 degrees
declare a string structure of adequate length (remember the rapid growth)

      There are five signs to be iterated: "F", "[", "]", "+" and 
"-". Start with the string "F" (the so-called "axiom" of the 
L-system). The iteration rule is: "F" is expanded to "F[+F][-F]". All 
other signs remain as they are.

      You can interpret this string graphically in the following way 
(imagine a drawing pen moving):

F     draw a line (forward) of length L
[     store this position and divide L by r (r>1)
+     turn right by an angle alpha
-     turn left by an angle beta
]     return to the position previously stored and multiply L by r.

The factor r causes shortening of subsequent branches.

generating graph    referring page
next page   content page

© Copyright 1993, Mario Hilgemeier, email: contact
homepage fivefold-symmetrical stamp