Modeling Plant Stems Using the Deterministic Lindenmayer System CAUCHY –JURNAL MATEMATIKA MURNI DAN APLIKASI Volume 6(4) (2021), Pages 286-295 p-ISSN: 2086-0382; e-ISSN: 2477-3344 Submitted: February 03, 2021 Reviewed: March 16, 2021 Accepted: April 17, 2021 DOI: http://dx.doi.org/10.18860/ca.v6i4.11591 Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari1, Muhammad Zia Alghar2 1,2 Department of Mathematics, Faculty of Science and Technology Universitas Islam Negeri Maulana Malik Ibrahim Email: juhari@uin-malang.ac.id, muhammadzia1904@gmail.com ABSTRACT Plant morphology modeling can be done mathematically which includes roots, stems, leaves, to flower. Modeling of plant stems using the Lindenmayer System (L-system) method is a writing returns that are repeated to form a visualization of an object. Deterministic L-system method is carried out by predicting the possible shape of a plant stem using its iterative writing rules based on the original object photo. The purpose of this study is to find a model of the plant stem with Deterministic Lindenmayer System method which will later be divided into two dimensional space three. The research was conducted by identifying objects in the form of pine tree trunks measured by the angle, thickness, and length of the stem. Then a deterministic and parametric model is built with L-system components . The stage is continued by visualizing the model in two dimensions and three dimensions. The result of this research is a visualization of a plant stem model that is close to the original. Addition color, thickness of the stem, as well as the parametric writing is done to get the results resembles the original. The iteration is limited to less than 20 iterations so that the simulation runs optimal. Keywords: modeling; deterministic L-system; plant stems; visualization INTRODUCTION Growth is the process of increasing the size, volume and number of cells irrevisible (cannot return to original). On the stem of a plant, its growth includes the increase in size and volume on the trunk, branches, and branches. When the plant is still young its growth is fast and will slow down when have started to mature to age [1]. While the branching of the stem is a sign the growth of a plant. Almost all plants branch. Only monocot plants that do little branching on the stem. Branching pattern the stem is generally divided into three, namely monopodial, sympodial, and dichotomous [2] [3] [4]. (a) (b) (c) http://dx.doi.org/10.18860/ca.v6i4.11591 mailto:juhari@uin-malang.ac.id mailto:muhammadzia1904@gmail.com Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 287 Figure 1. The branches of (a) monopodial, (b) sympodial, and (c) dichotomus The Lindenmayer system or what is commonly referred to as the L-system is one the method used in mathematical studies developed by Astrid Lindenmayer. The L- system uses a geometric aspect as its basis which is assisted in a manner computerization to produce a particular shape and model [5]. Generally The Lindenmayer system is a rewriting system with certain rules [6]. L-system is a branch of science in dynamic systems science that is applied to plant morphology, architectural design, to augmented reality (AR) components from video games and three-dimensional film. As of writing with the Lindenmayer system used several main components, namely axioms, production, and letters [7]. The deterministic model is a mathematical model in which symptoms can be measured with certain certainty. In the deterministic model, the odds of each the incidence of subsequent events was not counted [6]. The l-system deterministic model can be formed in two dimensions or three dimensions. How to interpret the L-system basis a graphic in two dimensions is just a 2 x 2 dimensional matrix. However, in three dimensions using a rotation matrix measuring 3 x 3 [8]. The L-system also deals with the postulates of Leonardo da Vinci, namely on his notes at no. 394, which reads “All tree branches at any height if put together to have the same thickness as the stem below” [9]. An explanation of da vinci describes the condition of the diameter before and after branching, that is symbolized by d , d1 , and d2 . Where d is the diameter of the stem, d1 and d2 are child stem diameter [10]. Figure 2. Measurement of stem thickness ratio From the da Vinci postulate, the area in the parent stem (blue circle) will be obtained equals the area in the child stem (green circle). The implication of this is if the ratio of the two child stems add up to the thickness of the parent stem [10]. If the comparison of the parent stem to the stem of the child is done in the previously equation, the value of 0.707106 was obtained as the ratio of the thickness of the stems in the plant. The da Vinci postulate ratio is used as a parameter in determining the thickness of the stem at l-system [6]. METHODS Research data The research data used are some photos of the evergreen plant, results measurement of the angle, thickness of the trunk, and the length of the trunk on the pine tree to be modeled. These data are used as the basis for forming the l-system pattern that will be created. The data can be seen in the following table Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 288 Table 1. The results of the angle measurement in the xz plane Angle Measured (α) Angle Size First Branch 0 o Second Branch 90 o Third Branch 180 o Fourth Branch 270 o Table 2. The results of the angle measurement in the yz plane Angle Measured (β) Left Right First Section 5o 5,2 o Second Section 6o 6,8 o Third Section 5,4o 5,2 o Fourth Section 5o 5,2 o Table 3. The results of the angle measurement in the xy plane Angle measured (θ) Left Right First Branch 65o 62 o Son of First Branch 52o 54 o Second Branch 62o 63 o Son of Second Branch 66o 64 o Third Branch 60o 62 o Son of Third Branch 64o 61 o Table 4. Measurement results of plant stem length Type of Stem Stem Length Mother Stem (a) 17,20 cm Daughter Stem (b) 15,50 cm Branching Daughter Stem (c) 9,30 cm Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 289 Table 5. Results of measurements of plant stem thickness Type of Stem Thickness Trunk Parent Stem 9,20 cm Right Fork 6,40 cm Left Fork 6,20 cm Daughter of The Right Fork 4,50 cm Daughter of The Right Fork 4,60 cm Daughter of The Left Fork 4,40 cm Daughter of The Left Fork 4,50 cm Research Steps The steps taken to model plants using deterministic L-system are: (1) Take picture of the object being modeled, namely in the form of an image photographed from various sides. (2) Measurement of the angle, length and thickness of the stem for each branch on the object stem. (3) Finding the average value and ratio of measurement results. (4) Identify the various components of the l-system that build it, such as rules production, letters, axioms and other components. (5) Performing a simulation by evaluating the results. Research Data The research data used are some photos of the evergreen plant, results measurement of the angle, thickness of the trunk, and the length of the trunk on the pine tree to be modeled. These data are used as the basis for forming the l-system pattern that will be created. RESULT AND DISCUSSION Modeling Results Research modeling plants using the deterministic l-system method was carried out against three plants in a three-dimensional plane. As for the definition of the symbols used in this study can be observed in the following table Table 6. Definitions of symbols in the L-system F(l) : Draw forward by l units, for l > 0 +(a) : Rotates counterclockwise with rotation matrix R(α) of α degree -(a) : Rotates clockwise with rotation matrix R(α) of a degree &(α) &(a) : Rotates counterclockwise with rotation matrix R(β) of a degree Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 290 ^(a) : Rotates clockwise with rotation matrix R (β) of a degree /(a) : Rotates counterclockwise with rotation matrix R (δ) of a degree \(a) : Rotates counterclockwise with rotation matrix R (δ) of a degree |(a) : Rotates with a rotation matrix R ( δ ) of 180o degree [ : Saves the current location then moves according to the next command ] : Returns to the original position stored in the symbol “[“ wr : Specifies the thickness of the stem !(x) : Determine the line thickness x The following are all production rules created for the three crop objects (Pine Plant) w = A(1,15) r1 = 0.9; r2 = 0.6; wr = 0,691 Generation : 15 a0 = 61.25; a1 = 5.47; a2 = 90 p1 : A(l,w) --> !(w*wr)F(l)[E(l*r1,w*wr)] p2 : B(l,w):(l>=0.1) --> !(w*wr)F(l)[+(a0)^(a1)C(l*r2,w*wr)]F(wr) [-(a0)^(a1)C(l*r1,w*wr)] [^(a1)B(l*r2,w*wr2)F(l*r2,w*wr)] p3 : C(l,w):(l>=0.0) --> !(w*wr)F(l)[^(a1)D(l*r2,w*wr)] p4 : D(l,w):(l>=0.0) --> ! (w*wr)F(l)[^(a1)C(l*r2,w*wr)] p5 : E(l,w) --> !(w*wr)F(l)[[/(a2)&(l*a2)B(l*r1,w*wr)] [\(a2)&(l*a2)B(l*r1,w*wr)][/(2*a2)&(l*a2)B(l*r1,w*wr)] [\(0*a2)&(l*a2)B(l*r1,w*wr)]][[/(0.5*a2)&(l*a2)B(l*r1,w*wr)] [/(0.666*a2)FE(l*r1,w*wr)] p6 : S(l,w) --> TF p7 : T(l,w) --> F (Ketapang Kencana Plant) V = {r1, r2, r3, wr, l, w, A, Y, Z, S, F, !, -, +, &, ^, /, \, (, ), [, ], *} Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 291 Axiom w = A(12,20) A(8,20) A(4,20) A(1,20) Generations : 5 r1 = 0.8 r2 = 0.5 r3 = 0.3 wr = 0.707 p1 : A(l,w) --> !(w*0.5)SF(l)[-(70)Y(l*r1,w*wr)][+(70)Z(l*r1,w*wr)] [-(60)^(45)/(15)Y(l*r1,w*wr)][+(60)&(45)/(15)Z(l*r1,w*wr)] [+(120)&(135)\(15)Y(l*r1,w*wr)][- (120)&(225)\(15)Z(l*r1,w*wr)] [/(90)-(70)Y(l*r1,w*wr)][/(90)+(70)Z(l*r1,w*wr)] p2 : Y(l,w) --> !(w*0.3)SF(l)[[^(37.5)Y(l*r3,w*wr)][&(37.5)Y(l*r3,w*wr)]] SF(l)[[^(20)Y(l*r3,w*wr)][&(20)Y(l*r3,w*wr)]]SF(l) p3 : Z(l,w) --> !(w*0.3)SF(l)[[^(37.5)Z(l*r3,w*wr)][&(37.5)Z(l*r3,w*wr)]] SF(l)[[^(20)Z(l*r3,w*wr)][&(20)Z(l*r3,w*wr)]]SF(l) p4 : S --> SSF (Trembesi Plant) V = {a0, a1, r1, r2, wr, l, w, A, B, C, S, F, !, -, +, ^, /, \, (, ), [, ], *} Axiom w = A(1,90) Generation : 10 r1 = 0.9 r2 = 0.6 a0 = 25 a1 = 10 wr = 0.707 p1 : A(l,w) --> !(w*0.4)-(10)SF(l*0.5)[+(a0)/(90)C(l*r2,w*wr)] [-(a1)\(90)A(l*r1,w*wr)][^(a0)\(90)C(l*r1,w*wr)] p2 : B(l,w) --> !(w*0.4)SF(l)[-(a0)C(l*r2,w*wr)][+(a1)C(l*r1,w*wr)] p3 : C(l,w) --> !(w*0.4)SF(l)[+(a0)A(l*r2,w*wr)][-(a0)A(l*r1,w*wr)] p4 : S --> SF Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 292 Visualization Result The results of the visualization of the modeling of plant stems using the deterministic method system is done based on the measurement results of stem thickness, angle, and length stem of the object being modeled, which is then written in the lindenmayer rule system. Furthermore, the l-system writing is visualized using computational applications namely L-studio. This application is specially designed for modeling plant growth developed at the University of Cagliari [11]. The visualization results will be in a dimensional form three, so that the output can be viewed from various points of view. Visual display on L-Studio supports in visualization magnification, so that the output can be seen in form the details. The following is the output of the lindenmayer system program for three indoor plants three dimension. (Pine Plant) Figure 3. Visualization of pine trees from various iterations (Trembesi Plant) Figure 4. Visualization of trembesi from various perspectives Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 293 ( Ketapang Kencana Plant) Figure 5. Visualization of ketapang kencana plants from various perspectives After visualizing the L-studio program, it is followed by evaluating the results of the visualization. Every detail of the visualization is enlarged and rotated in all directions. This is to ensure that there are no defects in the visualization. If there is defects, then changes are made to the components of the production rules. The iteration use on each plant is less than 20 iterations. It is intended to prevent programs that are not responding or errors when running on L-studio. The following is the comparison result of the visualization with the original object. (Pine Plant) Figure 6. Comparison of several visualization results of the l-system program on pine plant with the original object Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 294 (Ketapang Kencana Plant) Figure 7. Comparison of several visualization results of the l-system program on ketapang kencana plant with its original object (Trembesi Plant) Figure 8. Comparison of several visualization results of the l-system program on tamarind trees with the original object CONCLUSION Modeling plant stems using the deterministic lindenmayer system method, is a modeling that is more concise in level than using a method stochastic lindenmayer system , in the absence of a probability factor. The initial stages important in modeling Modeling Plant Stems Using the Deterministic Lindenmayer System Juhari 295 plant stems is to determine the main component of l-system . In this modeling, researchers use three-dimensional visualization on the result. Therefore, the visualization results are displayed from the front side, the side (round 90o x axis ), the top side (90o rotation of the z axis ), and the side slightly down (round 45o z axis ). The use of the L-Studio application is very helpful in the process of visualizing the model plants, both in the iteration process, determine production rules, to deep loops do the visualization. The use of iterations needs to be considered in order for the running program to run smooth. The researcher uses less than 20 iterations so that it running optimally. REFERENCES [1] A. Shipunov, Introduction of Botany, USA: University of Minot State, 2011. [2] R. McGarry, "Monopodial and sympodial branching architecture in cotton is differentially regulated by the Gossypium hirsutum SIngle Flower Truss and Self- Pruning orthologs," New Phytologist, pp. 1-2, 26 April 2016. [3] J. Power, "Interactive arrangement of botanical L-system models," Proceedings of the 1999 symposium on Interactive 3D graphics - SI3D '99, pp. 175-182, 1999. [4] C. Jacob, "Genetic L-System Programming: Breeding and Evolving Artificial Flowers with Mathematica," In Proceedings of the First International Mathematica Symposium, vol. 33976, pp. 215-222, 1995. [5] P. Prusinkiewicz, "Developmental Models of Herbaceous Plants for Computer Imagery Purposes," Computer Graphics, vol. 22, no. 0097-8930, pp. 141-150, 1988. [6] A. Lindenmayer, The Algorithmic Beauty of Plants, New York: Spinger-Verlag, 1990. [7] Juhari, "Pemodelan Pertumbuhan Tanaman Zea Mays L. Menggunakan Stochastic L- System," Jurnal Cauchy, vol. 3, no. 2477-3344, p. 2, 2013. [8] C. H. Iswanto, "Penerapan Stochastic L-Systems pada Pemodelan Pertumbuhan Batang Tanaman," pp. 1-18, 1 Janurary 2014. [9] J. Ritcher, The Notebooks of Leonardo da Vinci, New York: Dover Publications, 1970. [10] B. Mandelbrot, The Fractal Geometry of Nature, San Fransisco: W.H. Freeman, 1982. [11] Suhartono, "Pemodelan Pertumbuhan Tanaman Zinnia Menggunakan Lindenmayer System dengan Mathematica," Jurnal Cauchy, vol. 3, no. 2086-0382, pp. 33-37, 2013. [12] Juhari, "Pemodelan Pertumbuhan Batang Tanaman Menggunakan Deterministic L- Systems," p. 3, 25 November 2013. [13] M. Kahfi, Geometri Transformasi, Malang: IKIP Malang, 1997.