Next: Related Works Up: Introduction Previous: L-systems

## Turtle Interpretation

The strings generated by L-systems are lists of symbols. To produce visible L-system plants, an interpretation based on the concept of Turtle Graphics [&make_named_href('', "node22.html#Pape80","[Pape80]")] is given below.

A turtle is sitting on a sheet of paper facing in a certain direction, denoted by the triple , where x and y are the coordinates and is the direction angle. The tail of the turtle is a bit dirty. Thus, it leaves a trail along the paper. The L-system has only four symbols - F, f, +, and -. F means the turtle moves one unit distance along the current direction , while means of f is the same as F, except that the turtle lifts its tail this time without leaving a trail on the paper. Symbols + and - denote the turtle rotating its heading to left or right by a specific angle. By this simple interpretation, a two dimensional L-systems plant is drawn on the paper.

To generate plants in three-dimensional space, more symbols are needed. For three-dimensional graphics, the turtle state changes to (x, y, z, h, l, u). The triple of (x, y, z) denotes the current position of the turtle, and the triple of (h, l, u) denotes the current heading vector of the turtle in three dimensional space. Rotation of the turtle is expressed by the equation:

The interpretations of the different symbols are the following:

Note that there are two additional symbols - [ and ]. The symbol [ denotes that the Turtle starts to sprout a substring and the symbol [ denotes the Turtle returns to the original heading direction and position.

Tong Lin (tlin2@cs.umbc.edu)