You are hereL-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. Let us consider strings built of two letters a and b (they may occur many times in a string). For each letter we specify a rewriting rule. The rule a: ab means that the letter a is to be replaced by the string ab, and the rule b: a means that the letter b 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 b: a. In the second step a is replaced by ab using production a: ab. The word ab 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 an 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. Now you are ready to read about three-dimensional L-systems!
|