Virtual medical plant modeling based on L-system.

Background: Searching the drug molecules from the medicinal plants become more and more popular given that herbal components have been widely considered to be safe. In medical virtual plant studies, development rules are difficult to be extracted, the construction of plant organs is highly dependent on equipment and the process is complicated. Aim: To establish three-dimensional structural virtual plant growth model. Methods: The quasi-binary tree structure and its properties were obtained through the research of theory on binary tree, then the relationship between quasi-binary tree structure and plant three-dimensional branching structure model was analyzed, and the three-dimensional morphology of plants was described. Results: A three-dimensional plant branch structure pattern extracting algorithm based on quasi-binary tree structure. By using 3-D L-system method, the extracted rules were systematized, and standardized. Further more, we built a comprehensive L-model system. With the aid of graphics and PlantVR, we implemented the plant shape and 3-D structure’s reconstruction. Conclusion: Three-dimensional structure virtual plant growth model based on time-controlled L-system has been successfully established.


Introduction
For the sciences of drug R&D processes, the incentives to undertake R&D activity increase, but the productivity of drug R&D declines 1,2 . Recently, the attrition rates have sharply risen, especially in late-phase clinical trials 3,4 . The toxicity and other adverse effects of new chemical entities (NCEs) remain to be the major causes to limit the R&D of new drugs 5 . High safety of herbs make that the R&D of herbal components become more and more popular 6 .
Understanding of the development of medicinal plants is very important for know what potential drug molecules were contained in medicinal plants. Plant devel-opment is a complex process due to influences from external natural conditions, the plant itself, and human interference. Plenty of methods have been proposed by scholars to model the growth processes of plants. In point of their functions and objectives in virtual plant studies, these methods mainly focus on static plant simulation, computer simulation of plant growth process, and functional-structural modeling of plant development.
Functional-structural virtual plant development model is an out-growth of co-development of biological plant study and computer. In 1989, Erosion-Productivity Impact Calculator (EPIC) model was introduced 7  In this study, based on researches of binary tree, structure and properties of quasi-binary tree are addressed. The paper thoroughly analyzed the relation between quasi-binary tree structure and three-dimensional plant branch structure models, and briefly described the threedimensional morphology of plants. On this basis, an algorithm to extract the patterns of three-dimensional plant branch structure based on quasi-binary tree is proposed for the reconstruction of three-dimensional plant morphology. At last, a three-dimensional structural virtual plant growth model based on time-controlled L-system is established.

Methods and Materials Three-dimensional Virtual Plant Reconstruction Based On Quasi-binary Tree
To use the L-system, variation patterns and growth features of plants and their organs need to be extracted. Since L-system can capture the topology of plants and convert it into computer discernible languages, specific symbols can be used to denote the organs of plants, axiom ( ω ) to describe initial state of plants, and productions (P ) to describe the variation patterns of plants and organs, thereby establishing correlated development rules. However, some defects exist in L-system and make its describing process non-intuitive and contain many uncertain factors, for example: L-system uses productions (i.e.: development rules) to establish correlation model, and its description of development rules generally base on growth processes. For relatively complex branching plants or plants of certain species, L-system is inefficient in, sometimes incapable of, describing their development rules.
In order to construct effective three-dimensional branch structure of plants, on the basis of systematic and thorough study on binary tree-related theories, a method of extracting development rules of virtual branching plants based on quasi-binary tree structure is proposed in this study. It is also a three-dimensional virtual plant morphology reconstruction method. In this section when it come into realization, basic morphology and branching patterns of plants are first analyzed from the botany point of view, growing rules of plants are addressed using quasi-binary tree theory, combining three-dimensional L-system, productions (grammar) of the development rules are constructed, simulative realization of the method is then performed.

Three-dimensional plant branch structures of quasi-binary tree structure
Quasi-binary tree structure is an extension of binary tree structure. It is composed of binary tree, ternary tree, and other multi-branch tree structures. Ternary and multi-branch tree structures can be described with pertinent properties of binary tree structure. In a complicated structure with multiple types of branching, these branching structures can be described and organized separately in order to obtain properties of the whole structure.
Definition 1 Quasi-binary trees have the structure of binary tree, with also a parent node and child nodes, and one parent node can generate more than one child node. Binary tree is composed of one parent node and two child nodes. Thus, quasi-binary tree refers to trees with binary tree structure composed of multiple types of branching. Binary tree is a special case of quasi-binary tree. Furthermore, based on the properties of binary tree, properties of other multi-branch trees, for example ternary tree or quaternary tree, can be deduced. Take binary tree as an example, quasi-binary has the following properties: In a quasi-binary tree with the depth of k, the formula below calculates its number of nodes.
It is the product of the number of different branching types and the number of branches, where, muni indicates the number of different branches. This indicates that properties of a quasi-binary tree are closely related to the number of branch types it contains, i.e. the properties of quasi-binary tree are an integration of other branch-structure trees.

Results and discussion
Relation between quasi-binary tree structure and three-dimensional plant branch structure model It can be seen from Figure.1 and .2 that three-dimensional model of branching plants is actually a quasibinary tree structure in 3-D space. A logical one-to-one relationship exist between the nodes of the three-dimensional model and the nodes of the quasi-binary tree, which means that three-dimensional model of branching plants have pertinent properties of quasibinary tree structure. In data structure, binary tree is a two-dimensional structure; when it is used to construct three-dimensional models, only revolve and other operations are needed in 3-D space, as shown in Figure.1.

Figure.1 Three-dimensional plant model.
Therefore, the basic idea of constructing fractal-and binary tree-based three-dimensional plant growth model is to always keep two branches during iteration.
Three-dimensional plant branch structure pattern extracting method based on quasi-binary tree.
Branching plants generally exhibit branch structures of binary branching, ternary branching, and multi-branching. In order to effectively extract branching topology of plants, the following detailed extracting process is based on the relation between quasi-binary tree structure and three-dimensional plant branch structure model.
Step 1: Collect prototypical photos of branching trees in good illumination conditions using digital camera or other equipment, save in bmp, raw or jpg formats.
Step 2: Extract the general structures of collected prototypical trees and construct corresponding quasi-binary tree structure models, i.e. construct general logical structures of branching plants; Step 3: After establishing the quasi-binary tree structure models, address branching types, adjust the model and organize each type of branching structures. In this paper, B denotes binary branching and T denotes ternary branching; Step 4: Simplify the quasi-binary tree structure models until simplest branches as shown in Figure.2 are obtained; Figure.2 Quasi-binary tree with 3D structure

1058
Step 5: Identify the basic iteration rules of each type of branching ( B and T , etc.) and their axioms w ; Step 6: Based on binary tree structure and the prototypical branching trees, identify key factors including branch length F (s) , initial radius !(w) , revolve angle (θ ) ; Step 7: Improve the basic iteration rules based on the key factors and establish complete productions; Step 8: Establish the complete three-dimensional Lsystem model; The iteration process is presented in Figure.3.
With the method introduced above, related indicators, including branching type var and number of layers n , can be obtained. According to the properties of quasibinary trees, the number of nodes is: Where, 1 ≤ n ≤ var , and muni indicates the number of different branches, it is the product of the number of different branching types and the number of branches.
Therefore, L-system could be defined as: Apparently, more types of branches and greater number of branches means more development rules (productions). The larger the number of growth units, the more complex the generated three-dimensional structure, vice versa. In L-system, the describing of development rules (productions) is closely related to plant growth processes8, and the number of development rules and structural descriptions are uncertain. This can be expressed as: Comparing the describing process of development rules (productions) p with Equation (1) and (3), it can

Figure.3 Simplification of quasi-binary tree structures and the iteration rules
be seen that no matter for the number of development rules (productions) or the describing of each rule, the proposed method has good operability and certainty.

Simulation of Three-Dimensional Plant Branch Structures of Quasi-binary Tree Structure
To prove the effectiveness of extraction algorithm on branch plants 3-D topology with quasi-binary tree feature presented above, we selected two sets of data to compare in the contest: take photos for two distinct branching pattern respectively (dichotomous branching and Mixed branching), then extracted plant branching growth rules and transform it into three-dimensional L-System rules(productions) with the method mentioned above in the study, develop simulation system of reconstruction about three-dimensional branching structure of plant, in MFC IDE, and take simulation draw in the system. Contrast the simulation image and Original image, we found that, this method can describe plants' structural model effectively, extract regulation of plant growth fast and accurately, and take 3-D reconstruction. Additionally, the method couldn't describe the crooked plant branches, which makes the simulation results has something difference compare with the fact, but it won't influence the practicality.  Figure .4(a) and .5(a) are images of two plants (samples) that have binary branching structure and multi-branching structure, respectively.

Figure.4 Plant with binary branching structure and its simulation result. (A) Plant with binary branching structure; (B) Simulation result
For these two samples, the related data as shown in table 1 the proposed method is applied to extract development rules of the branches and convert to three-dimensional L-system rules, and then perform three-dimensional reconstruction, and the results are presented in Figure .4(b) and . 5(b).
Comparison between reconstructed three-dimensional images and original images indicates that the proposed method could rapidly and accurately extract the devel-opment rules (productions) of the plants, and effectively describe development rules of plants with specific types of branching and perform three-dimensional reconstruction.

Conclusions
The present study provides a new method based on quasi-binary tree structure of a virtual three-dimensional reconstruction of plant branching, which overcome the existed defective of methods and theories.
The simulation results indicate that, this method overcomes the non-intuitive and uncertainty about description of plant growth rules and definitions effectively, elaborated branching plant growth rule description operability, provides a new way to describe the plant growth regulation. However, because of the complexity of plant growth structure, this method needs artificial recognition when building quasi-binary tree models, which influences the applicability, the next research focuses on automatic improvement about construction of quasi-binary tree model, make it able to distinguish the branching of plant and establish correct quasi-binary tree structure automatically.