Robinia pseudoacacia degradation whole process modeling method, system and equipment based on L system and medium
Through the full-process modeling method of the Robinia degradation based on the L system, the L system rules were extracted and applied for the segmental modeling and simulation of the Robinia tree, which solved the problem of insufficient parameter complexity, staticity and natural fidelity of the traditional single-wood modeling method, and achieved a higher precision and applicable model.
Patent Information
- Application Number
- CN202411849543.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The traditional single-wood modeling method based on L system has problems such as complex parameter settings, static model, insufficient natural fidelity, large calculation volume, and poor versatility, and lacks dynamic simulation of environmental factors, tree physiological processes and ecological relationships.
A full-process modeling method for the degeneration of acacia degeneration based on the L system is proposed. By obtaining the basic data of acacia, the L system rules are extracted, including the main trunk rules, branch pattern rules and leaf simulation rules, the branch, leaf and root model is obtained, and the decayed tip rate of acacia tree is simulated, and the change model of the entire process of acacia degeneration is obtained.
It improves the accuracy and applicability of the model, can more realistically simulate the growth morphology and degradation process of the locust tree, and enhances the dynamic simulation ability of environmental factors and ecological relationships.
Smart Images

Figure CN119647203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological growth morphology, and in particular to a method, system, equipment and medium for modeling the whole process of Robinia pseudoacacia degradation based on an L system. Background Art
[0002] As an important technical means in forest resource monitoring and ecological research, single tree modeling has been widely used in the fields of precision forest management, ecosystem service assessment and biodiversity conservation in recent years. Single tree modeling provides high-precision data information for dynamic monitoring and precise management of forest resources through three-dimensional modeling, location identification, attribute estimation and growth prediction of individual trees.
[0003] At present, the mainstream methods of single tree modeling can be divided into the following categories: 1) Rule-based modeling efficiently generates complex branching structures through rule recursion and is widely used in virtual scenes; 2) Function-structure-based models combine the physiological processes and morphological structures of plants and are suitable for ecological research. 3) Geometric branching models are often used in movies and games, and are easy to control tree morphology. 4) Data-driven models use LiDAR and photogrammetry data to generate realistic tree morphology, which is often used for forest monitoring. 5) Hybrid modeling has gradually become a trend, combining the advantages of rule-, physics-, and data-driven models, taking into account the efficiency, realism, and multi-scenario adaptability of modeling, making it suitable for complex scenes such as ecology and virtual reality. These methods have achieved a balance between realism, computational efficiency, and flexibility, and provide feasible solutions for tree modeling in different fields.
[0004] The L-system (Lindenmayer system) is a rule-based modeling method, which mainly consists of a symbol alphabet, a set of production rules, an initial axiom string, and a translation mechanism. The symbol alphabet contains basic building blocks, while the production rules define how each symbol can generate a longer symbol string by substitution or expansion. The initial axiom string serves as the starting point of the model, and new strings can be generated by repeatedly applying the production rules. The generated strings are converted into geometric structures through the translation mechanism, so that the L-system can not only describe the growth morphology of plants, but also simulate other biological morphologies and generate self-similar fractal structures. This feature makes the L-system an ideal tool for complex ecological modeling and growth simulation. By combining mathematical models with biological characteristics, single tree modeling based on the L-system plays a variety of important roles in actual production such as ecological restoration and landscape design, environmental impact assessment, biotechnology research, and forestry resource management.
[0005] Although the traditional single-tree modeling method based on the L-system can simulate the growth morphology of trees, it has problems such as complex parameter settings, static models, insufficient natural realism, large amount of calculation, and poor versatility. It also lacks dynamic simulation of environmental factors, tree physiological processes, and ecological relationships, and is therefore limited in practical applications. Summary of the invention
[0006] The purpose of the present invention is to provide a method, system, equipment and medium for modeling the whole process of Robinia pseudoacacia degradation based on L system, which can improve the accuracy and applicability of the model.
[0007] To achieve the above object, the present invention provides the following solutions:
[0008] A modeling method for the whole process of Robinia pseudoacacia degradation based on L-system, including:
[0009] Obtain basic data of Robinia pseudoacacia; the basic data is determined by field measured data and literature;
[0010] Extracting L system rules based on the basic data; the L system rules include trunk rules, branch pattern rules and leaf simulation rules;
[0011] The Robinia pseudoacacia tree is modeled according to the L system rules, and the trunk and branch models, the leaf model and the root system model are obtained respectively;
[0012] A single Robinia pseudoacacia model is combined according to the trunk and branch model, the leaf model and the root system model, and the Robinia pseudoacacia tree dieback rate is simulated to obtain a change model of the entire Robinia pseudoacacia degradation process.
[0013] Optionally, the extraction formula of the L system rule includes:
[0014] The trunk rule is defined as the high part under the branch, which is expressed by the formula @! (w) F (l), where @ indicates that the characters after it are axiomatic characters, ! (w) indicates that the radius of the trunk is w, and F (l) indicates that a truncated cone with a length of l is drawn as the internode of the branch;
[0015] The branching pattern rule is expressed by formula p1: A(l,w)→! (w)F(l)[&(a0)B(l×r2,w×wr)][ / (a1)B(l×r2,w×wr)][&(a0)B(l×r2,w×wr)][&(a1)B(l×r2,w×wr)], which means that the vertex of the main axis A generates an upward internode F and four side branch vertices B in each step of the guide; where l×r2 represents the length of the branch, w×wr represents the thickness of the branch, and &(a0), / (a1), &(a1) are all adjustment parameters of the branch morphological structure;
[0016] The leaf simulation rule is expressed by the formula L(a, b, c), where a represents the length of the branch segment, b represents the number of leaves on the branch segment, and c represents the size of the leaf.
[0017] Optionally, the modeling process of the trunk and branch model includes:
[0018] The production formula A(l,w) is used for derivation, and the vertex of the main axis A generates an internode F and four side branches B in each step of the derivation, completing a round of branch growth. Multiple rounds of simulation of the natural growth structure of the branch are performed according to the iterative step size, gravity and random length to obtain the trunk and branch model.
[0019] Optionally, the modeling process of the blade model includes:
[0020] Use 3ds Max modeling software to model the single leaf surface and determine the coordinates of the skeleton points and the mesh index between the points;
[0021] Perform trigonometric modeling based on the coordinates of the skeleton points and the mesh index between the points to obtain a Nurbs surface of the leaf shape;
[0022] The Nurbs surface of the blade shape is converted into a mesh, and a quadrilateral mesh is reconstructed, and the growth shape of the blade in the mesh is adjusted to obtain the blade model.
[0023] Optionally, the Nurbs surface of the blade shape is converted into a mesh, and the specific process includes:
[0024] 1) Map the points on the Nurbs surface into three-dimensional space and express it as: z = f(x, y);
[0025] 2) Perform grid division and set the sampling area range [x min ,x max ] and [y min ,y max ];
[0026] 3) Determine the grid resolution, including the number of sampling points in the x-direction and the y-direction, which are N and x and N y , calculate the sampling step size in each direction as:
[0027]
[0028] 4) Generate all sampling points in the two-dimensional grid by sampling the x value and y value, expressed as:
[0029] x i =x min +i·Δx where i=0,1,…,Nx -1;
[0030] y i =y min +j·Δy where j=0,1,…,N y -1;
[0031] 5) For the i-th sampling point (x i ,y j ) generates the corresponding z value: z ij =f(x i ,y j ), and combined with the x value and y value, the three-dimensional coordinates of each sampling point (x i ,y j ,z ij );
[0032] 6) Connect each sampling point to form a network. In a two-dimensional grid, the sampling points form a grid surface by forming quadrilaterals, and divide each small unit of the grid surface into two triangles:
[0033] The first triangle: (x i ,y j ,z ij )、(x i+1 ,y j ,z i+1,j )、(x i ,y i+1 ,z ij+1 );
[0034] The second triangle: (x i+1 ,y j ,z i+1,j )、(x i+1 ,y i+1 ,z i+1,j+1 )、(x i ,y j+1 ,z ij+1 );
[0035] 7) Since photosynthesis is taken into account when modeling leaves, the normal vector on each mesh surface is calculated using the following formula:
[0036] n = P1 × P2;
[0037] Where P1 and P2 are edge vectors derived from adjacent vertices. i ,y j ,z ij ) and the adjacent vertices to calculate the normal vector, and get:
[0038]
[0039] Set corresponding rules to align the seam points, set the minimum and maximum numbers of the starting four-sided grids, and set corresponding rules for the maximum edge and minimum edge lengths according to the preset aspect ratio to complete the grid conversion.
[0040] Optionally, the modeling process of the root system model includes:
[0041] The A* algorithm is used to determine the shortest path from the root system to the target water source or nutrient source, and feedback adjustment is performed according to the environmental attributes affected by the growth of the root system, and the slime mold algorithm is used for dynamic growth to obtain the root system model.
[0042] Optionally, the simulation process of the locust tree dieback rate includes height filtering, random proportion filtering and spindle shape filtering; wherein, the height filtering is to remove leaves that exceed the set height and retain leaves below the set height; the random proportion filtering is to delete leaves according to a set proportion; the spindle shape filtering is to model the spindle shape of the set screening rules, use the generated spindle shape model as the outer frame boundary of the single locust tree model, and remove leaves whose center points are outside the boundary.
[0043] The present invention also provides a modeling system for the whole process of Robinia pseudoacacia degradation based on the L system, comprising:
[0044] A data acquisition unit, used to obtain basic data of Robinia pseudoacacia; the basic data is determined by field measured data and literature;
[0045] A rule extraction unit, used for extracting L system rules based on the basic data; the L system rules include trunk rules, branch pattern rules and leaf simulation rules;
[0046] A Robinia tree division modeling unit, used to perform Robinia tree division modeling according to the L system rule, and obtain a trunk and branch model, a leaf model and a root system model respectively;
[0047] The locust tree dieback rate simulation unit is used to combine a single locust tree model according to the trunk and branch model, the leaf model and the root system model, and simulate the locust tree dieback rate to obtain a change model of the entire process of locust tree degradation.
[0048] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above-mentioned L-system-based modeling method for the whole process of Robinia pseudoacacia degradation.
[0049] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned L-system-based modeling method for the whole process of Robinia pseudoacacia degradation.
[0050] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0051] The present invention discloses a method, system, equipment and medium for modeling the whole process of Robinia pseudoacacia degradation based on L system, the method comprises obtaining basic data of Robinia pseudoacacia from field measured data and literature, extracting L system rules based on the basic data; the L system rules comprise trunk rules, branch pattern rules and leaf simulation rules; modeling Robinia pseudoacacia branches according to the L system rules, obtaining trunk and branch models, leaf models and root system models respectively; combining a single Robinia pseudoacacia model according to the trunk and branch models, the leaf models and the root system models, simulating the deadtop rate of Robinia pseudoacacia trees, and obtaining a variation model of the whole process of Robinia pseudoacacia degradation. The present invention can improve the accuracy and applicability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0053] Figure 1 It is a schematic diagram of the flow of the whole process modeling method of Robinia pseudoacacia degradation based on L system of the present invention;
[0054] Figure 2 This is a simulation diagram of the branch model in this embodiment;
[0055] Figure 3 It is a simplified diagram of branches and trunks in this embodiment;
[0056] Figure 4 This is a schematic diagram of the second and third level tree branch model in this embodiment;
[0057] Figure 5 This is a schematic diagram of the blade skeleton in this embodiment;
[0058] Figure 6 This is a schematic diagram of a single leaf model after rendering in this embodiment;
[0059] Figure 7 is a schematic diagram of the transverse blade bending function in this embodiment;
[0060] Figure 8 Schematic diagram of the longitudinal blade bending function in this embodiment;
[0061] Fig. 9 Schematic diagram of blade curved surface in this embodiment;
[0062] Fig.10 This is a schematic diagram of blade mesh reconstruction in this embodiment;
[0063] Fig.11 This is a schematic diagram of simulating a real tip blade in this embodiment;
[0064] Fig.12 This is a schematic diagram of the blades before and after random adjustment in this embodiment;
[0065] Fig.13 This is a schematic diagram of the embodiment that does not satisfy the simulation of the natural state;
[0066] Fig.14 This is a schematic diagram of the state in which the sun-facing area reaches the maximum in this embodiment;
[0067] Fig.15 This is a schematic diagram of adjusting the leaf size in this embodiment;
[0068] Fig.16 The Robinia pseudoacacia model diagram under different parameters in this embodiment;
[0069] Fig.17 This is a highly filtered Robinia pseudoacacia model diagram in this embodiment;
[0070] Fig.18 This is a model diagram of a Robinia pseudoacacia with a dead tip rate of 30% and leaves over 7 meters long removed in this embodiment;
[0071] Fig.19 This is a model diagram of a Robinia pseudoacacia with a dead tip rate of 30% in this embodiment, leaves over 7 meters long are removed, and the spindle morphology is simulated;
[0072] Fig. 20 This is a schematic diagram of the root system 3D model structure in this embodiment;
[0073] Fig.21 This is a schematic diagram of the morphology imported into the model software for analysis in this embodiment. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] The purpose of the present invention is to provide a method, system, equipment and medium for modeling the whole process of Robinia pseudoacacia degradation based on L system, which can improve the accuracy and applicability of the model.
[0076] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0077] Due to the common problems in the existing technology: (1) It is not good at representing biodiversity. Many natural trees are difficult to fully simulate with simple L-system rules, especially some special growth patterns, tree species characteristics or ecological adaptability. (2) L-systems are usually based on idealized growth models and do not take into account the environmental influences (such as gravity, wind, light, etc.) in the actual growth process, which may lead to the generated tree morphology not being biologically realistic. (3) The model generated by the L-system mainly focuses on the basic structure of the tree. Details (such as the shape of leaves) are not represented well. In order to achieve a high level of detail, additional model refinement is usually required, which increases the complexity and computational complexity of the modeling. (4) In the plant root system modeling based on the L-system, the more mature one is the root system modeling of crops such as rice and corn. Since the root systems of trees and crops have obvious differences in structure, function, ecological adaptability, etc., it is necessary to combine other algorithms to simulate the growth of the root system. (5) In the traditional application of the L-system, the ecological phenomenon of the dead shoot rate is often not taken into consideration. The generated trees show an ideal lush state, but lack the realistic representation of the withered parts. (6) The current research on a single tree species is far from being generalized to the needs of multi-species modeling. When the tree species are different, the technical methods used may not be applicable, and the current research has not been able to construct a tree model with any degree of degradation.
[0078] Therefore, the present invention provides a Figure 1 The modeling method of the whole process of Robinia pseudoacacia degradation shown in the figure includes:
[0079] Step 100: Obtain basic data of Robinia pseudoacacia; the basic data is determined from field measured data and literature.
[0080] Step 200: extracting L system rules based on the basic data; the L system rules include trunk rules, branch pattern rules and leaf simulation rules.
[0081] Step 300: Modeling the Robinia pseudoacacia tree parts according to the L system rules, and obtaining trunk and branch models, leaf models and root system models respectively.
[0082] Step 400: A single Robinia pseudoacacia model is combined according to the trunk and branch model, the leaf model and the root system model, and the Robinia pseudoacacia tree dieback rate is simulated to obtain a change model of the entire Robinia pseudoacacia degradation process.
[0083] As a specific implementation, the following example is provided to illustrate the processing of the above steps in detail.
[0084] First, the basic concept of L-system is explained: L-system is a parallel rewriting system consisting of a symbol alphabet, a set of production rules, an initial axiom string, and a translation mechanism. The symbol alphabet contains the basic building blocks of the system, and the production rules specify how each symbol generates a larger symbol string by substitution or expansion. The initial axiom string is used as a starting point to generate new strings by iteratively applying the production rules. The translation mechanism converts the generated strings into geometric structures, enabling L-systems to describe the development process of biological structures, simulate various biological forms, and can be used to generate self-similar fractal structures.
[0085] After elaborating on the simulation language, the present embodiment is devoted to in-depth simulation of plant morphological structure. The present embodiment considers L system as the basis to describe a Robinia tree with components such as root, trunk and side branches. In this context, the following definitions are introduced: the root node is a node with special properties, and the edge (line segment) extends from the root node to the termination node to form a path. The internal node is connected to at least one successor edge in the path. The top is the termination point, marking the end of the tree, which is a node without a successor edge. Straight branches and side branches form a sequence of line segments from the bottom of the tree to the top, corresponding to the trunk and branches of the tree. These trunks and branches can be divided into level 0, level 1, level 2, etc., forming an axial tree representation.
[0086] Field data and literature provide the following notable characteristics of a normal Robinia tree:
[0087] (1) Crown shape: The crown shape of a healthy Robinia pseudoacacia is a monoaxial tree shape with prominent apical dominance and a straight and full trunk. The crown shape shows obvious changes at different growth stages. It is rounded when young, paraboloid-shaped when middle-aged, and truncated cone-shaped when mature. This monoaxial tree shape and the changes in crown shape at different stages reflect the morphological adjustment and adaptability of Robinia pseudoacacia during its growth and development.
[0088] (2) Branching characteristics: The branching structure of Robinia pseudoacacia is relatively complex, with 4 to 5 branches arranged in whorls and spreading out radially. The number of branch plates that occur in a year is closely related to the level of growth. An average of 5 to 6 branches can occur during the peak growth period. The branching rate tends to increase gradually with the increase of tree age. The branching angles of primary branches are mainly distributed between 60° and 90°, while the branching angles of secondary branches are mostly distributed between 30° and 90°. In addition, the azimuth angles of primary branches are evenly distributed, while the azimuth angles of secondary branches are mainly distributed in the horizontal direction.
[0089] (3) Leaf characteristics: Robinia pseudoacacia leaves are densely arranged in spirals and drooping. On the side branches, the leaf bases twist to form two rows. The leaves are linear-lanceolate with serrated edges. The leaves on the nutrient branches are relatively large, about 3 to 6 cm long and about 0.4 to 0.5 cm wide, while the leaves on the reproductive branches are relatively small, less than 2 cm long. This arrangement and shape of the leaves provide the basis for photosynthesis and reproductive activities of Robinia pseudoacacia, and also add uniqueness to its appearance.
[0090] Based on this, the L system is first used to extract rules. The L system rule extraction is based on the field measured data of young Robinia pseudoacacia trees and the description of the morphological and structural characteristics of Robinia pseudoacacia in relevant literature. This embodiment extracts constraint rules for L system modeling. First, pay attention to the rules of the trunk. The trunk is defined as the high part under the branch and is expressed in the rule axiom, for example: "@! (0.1) F (0.4)", where @ indicates that the characters after it are axiom characters,! (0.1) means drawing the radius of the trunk, and F (0.4) means drawing a truncated cone with a length of 0.4 as the branch internode. These parameters are adjusted in the rules according to the measured data of the height under the branch of Robinia pseudoacacia trees.
[0091] Secondly, the branching pattern is another key feature of the branching structure of Robinia pseudoacacia, which usually presents a whorled shape. This branching pattern is represented by the L-system rule, such as "p1:A(l,w)→!(w)F(l)[&(a0)B(l×r2,w×wr)][ / (a1)B(l×r2,w×wr)][&(a0)B(l×r2,w×wr)][&(a1)B(l×r2,w×wr)]", which means that the vertex of the main axis A generates an upward main internode F and four side branch vertices B in each step of the guide.
[0092] Furthermore, the length and thickness of branches are controlled by parameters in the characters. For example, in the above production p1, the first and second parameters in B(l×r2,w×wr) represent the length and thickness of the branches, respectively. The inclination and azimuth of branches are also controlled by parameters. For example, the parameters in &(a0), / (a1), &(a1) in the above production are used to adjust the morphological structure of branches.
[0093] Finally, regarding the simulation of leaves, this embodiment takes into account that the leaves of Robinia pseudoacacia are of a specific type and are distributed in a spiral shape on the surface of the branches. Taking a branch segment as the basic unit, the uniform distribution of leaves is achieved through the L system rule, the leaf azimuth is randomly distributed, and the leaf inclination varies within a certain range. The normalized leaf size is set in the leaf point file, and the specific rules are shown as "L(a, b, c)", where a represents the length of the branch segment, b represents the number of leaves on the branch segment, and c represents the size of the leaf. This rule takes into account the actual growth characteristics of Robinia pseudoacacia trees to simulate their appearance more realistically.
[0094] Then, according to the above rules, the parts of the Robinia tree are modeled, including the modeling of the trunk and branches, the modeling of leaves and the modeling of the root system.
[0095] As a first part, model the trunk and branches:
[0096] Through the derivation of production formula A(I, w), the vertex of the main axis A generates an internode F and four side branches B in each step of the derivation. These four side branches simulate a round of branch growth of Robinia pseudoacacia, where production formula B(I, w) indicates that the vertex of the side axis B generates an internode F and two side branches C. In the same round, the introduction of an internode between two side branches is intended to simulate the non-strict whorl of side branches, that is, the attachment points of the branches in the same whorl are not at the same height of the main trunk. Each side branch C represents an internode F. When the iteration step size is 16, the simulated branch model and simplified diagram are as follows Figure 2 and Figure 3 shown.
[0097] On this basis, the influence of gravity and the bending state are added. The degree of bending is determined by different lengths and different numbers of secondary branches. It is derived from the given formula. This simulation of this embodiment adopts the method of manually inputting the number to improve the running speed of the computer. Due to the influence of photosynthesis, the secondary branches will show different lengths. Similarly, the positioning points of the tertiary branches will also add random elements, rather than equal lengths, such as Figure 4 shown.
[0098] As the second part, the blades are modeled:
[0099] In order to realistically represent the leaves and leaf clusters of Robinia pseudoacacia, 3ds Max modeling software was used to model the surface of a single leaf, obtain the coordinates of the skeleton points and the mesh index between the points, such as Figure 5 Read the point coordinates and indexes in the L system simulation program and render a single leaf model, as shown in Figure 6 shown.
[0100] Extract the sample leaf contour curve from the batch of Robinia pseudoacacia leaf contours. Place the sample at the origin of the coordinate system during the modeling process. Simulate the transverse and longitudinal curvature of the leaf in the x-axis and y-axis directions respectively. Use the sin function in the transverse curvature x direction and multiply it by a coefficient. This coefficient is a very small constant in order to reduce the amplitude of the entire curve shape (such as Figure 7 ). In the longitudinal curvature y direction, the cosine function is used and multiplied by a coefficient, which is a very small constant. Its purpose is also to reduce the amplitude of the entire curve shape (such as Figure 8 ). Restore the shape of the leaves of Robinia pseudoacacia leaves in their natural state as realistically as possible (such as Fig. 9 ).
[0101] Since the number of leaves of the locust tree is extremely large, in order to reduce the file size, after obtaining the Nurbs surface of the leaf shape, it is converted into a mesh. In the process of converting the function surface to the mesh, the algorithm of converting Surface sampling to the mesh is used. The core process and calculation formula are as follows:
[0102] 1) Map the points on the Nurbs surface into three-dimensional space and express it as: z = f(x, y);
[0103] 2) Perform grid division and set the sampling area range [x min ,x max ] and [y min ,y max ];
[0104] 3) Determine the grid resolution, including the number of sampling points in the x-direction and the y-direction, which are N and x and N y , calculate the sampling step size in each direction as:
[0105]
[0106] 4) Generate all sampling points in the two-dimensional grid by sampling the x value and y value, expressed as:
[0107] x i =x min +i·Δx where i=0,1,…,N x -1;
[0108] y i =y min +j·Δy where j=0,1,…,N y -1;
[0109] 5) For the i-th sampling point (x i ,y j ) generates the corresponding z value: z ij =f(x i ,y j ), and combined with the x value and y value, the three-dimensional coordinates of each sampling point (x i ,y j ,z ij );
[0110] 6) Connect each sampling point to form a network. In a two-dimensional grid, the sampling points form a grid surface by forming quadrilaterals, and divide each small unit of the grid surface into two triangles:
[0111] The first triangle: (x i ,yj ,z ij )、(x i+1 ,y j ,z i+1,j )、(x i ,y i+1 ,z ij+1 );
[0112] The second triangle: (x i+1 ,y j ,z i+1,j )、(x i+1 ,y i+1 ,z i+1,j+1 )、(x i ,y j+1 ,z ij+1 );
[0113] 7) Since photosynthesis is taken into account when modeling leaves, the normal vector on each mesh surface is calculated using the following formula:
[0114] n = P1 × P2;
[0115] Where P1 and P2 are edge vectors derived from adjacent vertices. i ,y j ,z ij ) and the adjacent vertices to calculate the normal vector, and get:
[0116]
[0117] Set corresponding rules to align the seam points, simplify the plane and refine the mesh, set the minimum and maximum number of starting four-sided meshes, and set corresponding rules for the maximum and minimum edge lengths according to the preset aspect ratio to complete the mesh conversion.
[0118] The mesh obtained by the first transformation is not in the final form required by this embodiment, and needs to be rebuilt again.
[0119] In order to simplify the morphological features of leaves as much as possible, this embodiment selects quadrilateral mesh reconstruction instead of triangular mesh reconstruction (such as Fig.10 ). In the mesh conversion algorithm, this embodiment sets the number of quadrilaterals and keeps it adaptive. The original hard edge is maintained and the radial structural line is set as the y-axis, so that the blade can maintain a simplified shape and the curvature of the curve in the x-axis and y-axis directions, and can also maintain the most simplified shape.
[0120] When the model is displayed, the present embodiment can display the leaves in the most simplified form of a grid. When the image is output, the present embodiment can use a grid subdivision algorithm to obtain optimized natural leaves. On this basis, first observe the state of the natural Robinia tree branches. The leaves on both sides of the tip will appear in pairs.
[0121] When the leaf shape of the locust tree is placed on the branch, the top branch is simulated to bend under the influence of gravity. In addition, the length of the tip needs to be determined according to the size of the leaf. Symmetrical leaves will not grow within a certain range of the tip. Therefore, this embodiment intercepts a sub-curve on the original curve to obtain a bionic length value (such as Fig.11 ).
[0122] The leaves of the locust tree have different growth rules at the top and on the sides. The leaves on both sides are in symmetrical positions, and the distance between them is about the width of the leaf, and a random value is added on this basis. Fig.12 As shown, the green points are the leaf positioning points after adding random value interference.
[0123] Finding the positioning point cannot fully simulate the natural state. Due to the existence of random value parameters, the angle of the growth direction will be disrupted. In this state, it is not in line with the maximum photosynthetic utilization of plants. Similar to sunflowers, sunflowers will turn their largest side toward the sun to obtain greater sunshine duration and sunshine intensity. Fig.13 shown.
[0124] It is necessary to keep all leaves in their original orientation and add a unified minimum value in the Z-axis direction. Find the plane with the smallest angle between the branch and the z-axis to maximize photosynthesis, that is, the area facing the sun can reach the maximum, which is most consistent with the simulation of plant growth. Therefore, after finding the minimum plane, get the normal vector and arrange all leaves in order. The corresponding grid diagram is as follows Fig.14 shown.
[0125] Under normal conditions, the number of symmetrical leaves of a locust tree is 2 to 12 pairs. Therefore, this embodiment sets a range when setting the length of the top branch, so that the coordinate points of the leaves are between 2 and 12 pairs. A certain random value is given to the coordinate points of the leaves for interference.
[0126] By comparing with the real Robinia pseudoacacia leaves, this embodiment found that each Robinia pseudoacacia leaf is different in size. In the natural growth state, the leaves in the middle will be larger, while the leaves on the sides will be smaller. Therefore, when simulating the natural form of leaves, this embodiment adopts the method of symmetrical point position and gradual random scaling to make each leaf different. Fig.15 As shown, the green shape is the final shape of the leaf, and the red shape is the shape before optimization.
[0127] As the third part, root system modeling is performed, e.g. Fig. 20 As shown: The shortest path algorithm and slime mold algorithm can be used to simulate the growth of the root system (changing the fluffiness of the soil can allow the roots to change from vertical growth to horizontal expansion).
[0128] The shortest path algorithm is used to find the shortest path between two nodes. These nodes can be different soil conditions or obstacles encountered during the growth of the root system. The root system needs to find water and nutrients during the growth process, that is, the shortest path algorithm can be used to simulate the path of the root system from a certain point to the optimal growth point; the slime mold algorithm imitates the growth behavior of slime molds in nature. This algorithm is mainly based on the network structure formed by slime molds when looking for food, simulates the adaptive behavior of natural organisms, and explores and utilizes resources by establishing a dynamic network. Combining these two algorithms makes the model more realistic and efficient.
[0129] First, the A* algorithm is used to find the shortest path from the root system to the target water source or nutrient source. The path can be represented by node records, and a shortest path is obtained; the slime mold algorithm is used to dynamically grow in the grid, optimize the water source and nutrient distribution, and thus adjust the root structure; feedback adjustment is performed based on the environmental attributes affected by the growth of the root system; through multiple iterations of the A* and slime mold algorithms, the adaptability of the root system and the efficiency of resource acquisition are continuously improved.
[0130] A* algorithm steps: ① Create an open list and a closed list. The open list is used to store the nodes to be evaluated, and the closed list is used to store the evaluated nodes; ② Add the starting node to the open list; ③ Select the node with the lowest f(n) = g(n) + h(n) value from the open list, and determine whether the node is the target node. If so, build a path and exit. Otherwise, move the current node to the closed list and check its neighboring nodes, and update the g and f values; ④ Finally, backtrack from the target node to the starting node to build a path.
[0131] The A* algorithm uses a heuristic method to search for paths. The formula is as follows:
[0132] f(n)=g(n)+h(n)
[0133]
[0134] Where, f(n): the total estimated cost of node n, used to evaluate whether the node should be expanded; g(n): the actual cost (path length) from the starting node to node n, usually obtained by accumulating the weights of the edges along the way; h(n): the heuristic estimated cost from target node n to the target node; (x n ,y n ,z n ,) is the coordinate of node n, (x t,y t ,z t ) are the coordinates of the target node.
[0135] Slime mold algorithm steps:
[0136] ① Create N slime mold individuals and randomly assign their initial positions in the grid
[0137] P i (0)=((x i (0),(y i (0))for i=1, 2,...,N
[0138] ② Calculate the fitness of each slime mold to determine its growth status:
[0139] F i (t) = f(P i (t))
[0140] In the formula, f(P i (t)) = W[x i (t)][y i (t)]+λ·N[x i (t)][y i (t)].
[0141] ③ Update the position of the slime mold individual according to the current optimal position:
[0142] P i (t+1)=P i (t)+α·dir(P best (t)-P i (t))+β·rand(R)
[0143] ④ Repeat the position evaluation and update steps until the specified stop condition is reached, specifically:
[0144] if|F i (t)-F i (t-1)|<εor t>=t max then stop.
[0145] Finally, construct a Robinia tree model: combine the branches and leaves to form a single Robinia tree model. The simulation results of a healthy Robinia tree are as follows: Fig.16 As shown in the figure. By setting different parameters, different shapes of trees can be obtained.
[0146] When simulating the dead branch rate, this embodiment uses three different filtering methods.
[0147] The first type of filtering is to filter at the height. The leaves with values above the height are removed, and the leaves with values below the height are retained (such as Fig.17 shown).
[0148] In the second filtering, the leaves that meet the height conditions are screened based on the leaves left by the first filtering. Randomly delete them in proportion and remove 30%. Taking the dead branch rate of 30% as an example, this embodiment removes all leaves above 7 meters. Its model is as follows Fig.18 shown.
[0149] The third filtering method is accomplished by spindle modeling. In natural form, when the dead branch rate is 30%, the whole tree is in the form of a spindle. This embodiment requires modeling the spindle of the screening rule.
[0150] Before generating leaves, this embodiment finds the minimum plane facing the z-axis of the sun. This plane can extract the normal vector, the starting point of the normal vector and the center point of the leaf in this embodiment.
[0151] The generated spindle is used as the outer frame boundary, and a computer is used to simulate whether all the center points are inside the spindle. This embodiment will obtain three answers, one is inside, one is outside, and one is on the surface of the spindle.
[0152] Because the growth rule of leaves is that the closer to the trunk, the less photosynthesis can be received, so there will be relatively fewer leaves near the trunk. In this embodiment, only the center points of leaves outside the spindle are removed, and a "non-strict" screening is performed.
[0153] The leaves that are retained at this point are the leaves that meet the set leaf withering rate under normal simulation conditions. The redundant branches are filtered out, and the final shape is as follows Fig.19 shown.
[0154] In order to speed up the operation, this embodiment simplifies the grid before calculating the volume and leaf area. By calculating the volume of the closed grid, accumulating and summing, and retaining two decimal places, the total volume of the trunk can be calculated to be 0.61 cubic meters. In the same way, in the leaves of the simplified grid, accumulating and summing, retaining two decimal places, the total area of the leaves can be obtained to be 21.6 square meters. Fig.21 shown.
[0155] Therefore, this embodiment has the following beneficial effects:
[0156] (1) The present invention uses Robinia pseudoacacia as the research object because Robinia pseudoacacia is drought-resistant, highly adaptable and has nitrogen-fixing ability, which helps improve soil quality and enhance soil fertility. It can provide support for multiple fields such as ecological restoration, forestry management, and urban greening, and promote the coordinated development of society, economy and environment. Therefore, constructing a Robinia pseudoacacia model is of great value in actual production. Based on this, the L system is used as the basic modeling method, and a variety of physical algorithms are added to construct tree models. Tree models of different forms can be constructed by adjusting parameters to simulate the special growth pattern of the tree species, and tree models of any degree of degradation can be constructed.
[0157] (2) When modeling the secondary branches, the present invention fully considers the tree species morphology such as branch bending caused by gravity and the different branch lengths caused by photosynthesis.
[0158] (3) When modeling leaves, the present invention takes into account: ① The curved surface of the leaf is constructed through a bending function to restore the leaf shape of the Robinia pseudoacacia tree in its natural state as much as possible. ② The tip length is determined according to the size of the leaf, the tip of the branch is bent by gravity, the leaves at both ends of the branch are in symmetrical positions, and random values are added to make the growth spacing of the leaf pairs different. ③ According to the maximum photosynthetic utilization of the plant, while maintaining the original orientation and adding a unified Z-direction minimum value, the minimum angle between the branch and the Z axis is calculated, so that the sunny area of the leaf is maximized, which is most in line with the plant growth pattern.
[0159] (4) The present invention uses the shortest path algorithm and the slime mold algorithm to simulate the growth of the root system when modeling the root system of the locust tree. The shortest path algorithm mainly generates the main path of the plant root system, while the slime mold algorithm imitates the adaptive behavior of organisms in nature and optimizes the fine structure of the root system, making it more biologically meaningful and natural.
[0160] (5) After constructing the Robinia pseudoacacia model, the present invention performs dead-tip filtering on the Robinia pseudoacacia model in order to enhance the authenticity of the model, improve efficiency, highlight the structural characteristics of the tree, and adapt to the needs of different application scenarios. ① Height filtering: Leaves that exceed a certain height are removed, and leaves below the height are retained. ② Random proportion filtering: Based on ①, according to the different dead-tip rates of Robinia pseudoacacia trees in different seasons or different growth periods, the leaves can be deleted according to different proportions. ③ Spindle shape filtering: It has been observed that under natural conditions, when the dead-tip rate of Robinia pseudoacacia trees is 30%, the morphology of the entire tree presents the shape of a spindle. The spindle of the screening rule is modeled, and the generated spindle is used as the outer frame boundary to remove leaves whose center points are outside the spindle.
[0161] (6) The model constructed by the present invention is highly simulated and can model a healthy Robinia pseudoacacia of any height. The parameters of the constructed Robinia pseudoacacia model are compared with the actual Robinia pseudoacacia scanned by 3D point cloud technology, and feedback adjustment is added to greatly improve the accuracy of modeling. It conforms to the growth law of specific tree species, especially the modeling of leaves, which can be extended to tree species with opposite compound leaf structures.
[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0163] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A modeling method for the whole process of Robinia pseudoacacia degradation based on L system, characterized in that: include: Obtain basic data of Robinia pseudoacacia; the basic data is determined by field measured data and literature; Extracting L system rules based on the basic data; the L system rules include trunk rules, branch pattern rules and leaf simulation rules; The Robinia pseudoacacia tree is modeled according to the L system rules, and the trunk and branch models, the leaf model and the root system model are obtained respectively; A single Robinia pseudoacacia model is combined according to the trunk and branch model, the leaf model and the root system model, and the Robinia pseudoacacia tree dieback rate is simulated to obtain a change model of the entire Robinia pseudoacacia degradation process.
2. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 1 is characterized in that: The extraction formula of the L system rule includes: The trunk rule is defined as the high part under the branch, which is expressed by the formula @! (w) F (l), where @ indicates that the characters after it are axiomatic characters, ! (w) indicates that the radius of the trunk is w, and F (l) indicates that a truncated cone with a length of l is drawn as the internode of the branch; The branching pattern rule is expressed by formula p1: A(l,w)→! (w)F(l)[&(a0)B(l×r2,w×wr)][ / (a1)B(l×r2,w×wr)][&(a0)B(l×r2,w×wr)][&(a1)B(l×r2,w×wr)], which means that the vertex of the main axis A generates an upward internode F and four side branch vertices B in each step of the guide; where l×r2 represents the length of the branch, w×wr represents the thickness of the branch, and &(a0), / (a1), &(a1) are all adjustment parameters of the branch morphological structure; The leaf simulation rule is expressed by the formula L(a, b, c), where a represents the length of the branch segment, b represents the number of leaves on the branch segment, and c represents the size of the leaf.
3. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 1 is characterized in that: The modeling process of the trunk and branch model includes: The production formula A(l,w) is used for derivation, and the vertex of the main axis A generates an internode F and four side branches B in each step of the derivation, completing a round of branch growth. Multiple rounds of simulation of the natural growth structure of the branch are performed according to the iterative step size, gravity and random length to obtain the trunk and branch model.
4. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 1 is characterized in that: The modeling process of the blade model includes: Use 3ds Max modeling software to model the single leaf surface and determine the coordinates of the skeleton points and the mesh index between the points; Perform trigonometric modeling based on the coordinates of the skeleton points and the mesh index between the points to obtain a Nurbs surface of the leaf shape; The Nurbs surface of the blade shape is converted into a mesh, and a quadrilateral mesh is reconstructed, and the growth shape of the blade in the mesh is adjusted to obtain the blade model.
5. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 4 is characterized in that: The Nurbs surface of the blade shape is converted into a mesh, and the specific process includes: 1) Map the points on the Nurbs surface into three-dimensional space and express it as: z = f(x, y); 2) Perform grid division and set the sampling area range [x min ,x max ] and [y min ,y max ]; 3) Determine the grid resolution, including the number of sampling points in the x-direction and the y-direction, which are N and x and N y , calculate the sampling step size in each direction as: 4) Generate all sampling points in the two-dimensional grid by sampling the x value and y value, expressed as: x i =x min +i·Δx where i=0,1,……,N x -1; y i =y min +j·Δy where j=0,1,……,N y -1; 5) For the i-th sampling point (x i ,y j ) generates the corresponding z value: z ij =f(x i ,y j ), and combined with the x value and y value, the three-dimensional coordinates of each sampling point (x i ,y j ,z ij ); 6) Connect each sampling point to form a network. In a two-dimensional grid, the sampling points form a grid surface by forming quadrilaterals, and divide each small unit of the grid surface into two triangles: The first triangle: (x i ,y j ,z ij )、(x i+1 ,y j ,z i+1,j )、(x i ,y i+1 ,z ij+1 ); The second triangle: (x i+1 ,y j ,z i+1,j )、(x i+1 ,y i+1 ,z i+1,j+1 )、(x i ,y j+1 ,z ij+1 ); 7) Since photosynthesis is taken into account when modeling leaves, the normal vector on each mesh surface is calculated using the following formula: n = P1 × P2; Where P1 and P2 are edge vectors derived from adjacent vertices. i ,y j ,z ij ) and the adjacent vertices to calculate the normal vector, and get: P1=(x i+1 ,y j ,z i+1,j )-(x i ,y j ,z ij )=(Δx,0,z i+1,j -z ij ) P2=(x i ,y j+1 ,z ij+1 )-(x i ,y j ,z ij )=(0,Δy,z ij+1 -z ij ); Set corresponding rules to align the seam points, set the minimum and maximum numbers of the starting four-sided grids, and set corresponding rules for the maximum edge and minimum edge lengths according to the preset aspect ratio to complete the grid conversion.
6. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 1 is characterized in that: The modeling process of the root system model includes: The A* algorithm is used to determine the shortest path from the root system to the target water source or nutrient source, and feedback adjustment is performed according to the environmental attributes affected by the growth of the root system, and the slime mold algorithm is used for dynamic growth to obtain the root system model.
7. The L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to claim 1 is characterized in that: The simulation process of the locust tree dieback rate includes height filtering, random proportion filtering and spindle shape filtering; wherein, the height filtering is to remove leaves that exceed the set height and retain leaves below the set height; the random proportion filtering is to delete leaves according to the set proportion; the spindle shape filtering is to model the spindle shape of the set screening rules, use the generated spindle shape model as the outer frame boundary of the single locust tree model, and remove leaves whose center points are outside the boundary.
8. A modeling system for the whole process of Robinia pseudoacacia degradation based on L system, characterized in that: include: A data acquisition unit, used to obtain basic data of Robinia pseudoacacia; The basic data are determined from field measured data and literature; A rule extraction unit, used for extracting L system rules based on the basic data; the L system rules include trunk rules, branch pattern rules and leaf simulation rules; A Robinia tree division modeling unit, used to perform Robinia tree division modeling according to the L system rule, and obtain a trunk and branch model, a leaf model and a root system model respectively; The locust tree dieback rate simulation unit is used to combine a single locust tree model according to the trunk and branch model, the leaf model and the root system model, and simulate the locust tree dieback rate to obtain a change model of the entire process of locust tree degradation.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the L-system-based modeling method for the whole process of Robinia pseudoacacia degradation according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, it implements the L-system-based modeling method for the whole process of Robinia pseudoacacia degradation as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Three dimensional tree fine modeling method based on integrated drive of data and rules
CN105608739A
Process-type plant model reconstruction method based on multi-view images
CN109285217A
Wheat virtual growth three-dimensional visualization system
CN117788706A
Protective forest degradation investigation and evaluation system based on artificial intelligence visual identification
CN118228944A
Systems and methods for manufacturing of microstructures
US20180275637A1