## L-systems: a turtle draws plantsClick to choose your language:
Lindenmayer systems – or L-systems for short – find an increasing number of applications in computer graphics, especially in fractals and realistic modelling of plants. More exotic applications, ranging from the reproduction of a traditional East Indian art form to graphically motivated algorithms for music composition, are also known. L-systems base on productions – rules represented by strings. These rules define graphical structures. a is to be replaced by the string ab, and the rule means that the letter b: ab is to be replaced by a. The rewriting process starts from a distinguished string called the axiom. Let us assume that it consists of a single letter b. In the first derivation step (the first step of rewriting) the axiom b is replaced by a using production . In the second step b: aa is replaced by ab using production . The word a: abab consists of two letters, both of which are simultaneously replaced in the next derivation step. Thus, a is replaced by ab, b is replaced by a, and the string aba results. In a similar way (by the simultaneous replacement of all letters), the string aba yields abaab which in turn yields abaababa, then abaababaabaab, and so on (Figure 1).Figure 1. Example of a derivation in a L-system Many fractals are thought of as sequence of primtive elements – line segments. The lengths of segments and the angles between them play a crucial role. To produce fractals, strings generated by L-systems must contain the necessary information about figure geometry. LOGO-style helps at defining graphical structures.
» |