Visual Modeling of Rice Root Growth Based on B-Spline Curve

As a major food production crop in China, the growth and development of rice is an extremely complex systemic process, and the root system is the main organ for rice to obtain nutrients. Therefore, 3D modeling and visualization of the rice root system can help to further understand its morphology, structure and function, and provide an aid for scientific cultivation of rice and improving rice yield for decision making. In this paper, a mathematical model of the rice root system is established based on the B spline curve combined with the L-system approach, using mathematical knowledge based on the 3D morphological characteristics of the real rice root system. The B-Spline Curve is chosen to simulate this, and the recursive definition of B-Spline Curve and its formula are used to realize the modeling of the rice root system curve. Based on the mathematical method of rice root system integration, the bending effect of rice root system at different periods and different growth positions is realized. Finally, the L-system combined with B-Spline Curve is used to construct a rice root system model and realize the rice root system visualization simulation. The simulated image is closer to the real rice root system image in terms of morphological structure and has a strong sense of realism.


Introduction
With the development of agricultural information technology and computer graphics, it is now possible to simulate the process of plant growth and development on a computer. Through visualization technology, the collected data are converted into graphical information displayed on the computer screen, and the accurate virtual crop model is expected to provide theoretical support for the optimization of crop population canopy structure, structure-function model and ideal plant design [1] . Virtual plants have become one of the current research hotspots in the field of agricultural science and technology and image processing. Rice, as a major food production crop in China, is an extremely complex systemic process that is affected by temperature, soil nutrients and other factors during its growth and development. As an important organ of rice, the root system can directly affect its water and nutrient uptake capacity and influence its productivity through interaction with soil [2,3] . A root system visualization model is established with the help of computer technology to provide an aid in decision making for scientific cultivation of rice and improving rice yield.
Many researches have been done in the field of rice root system visualization modeling. Prusinkiewicz et al [4] implemented the L-system by algorithm; Reffye et al [5] used a stochastic process approach to simulate plant structure. The growth and morphology of plants have been modeled by Kaandorp using fractal method [6] . Yang et al [7] used a fractal L-system approach to model the rice root system. The study of rice root system growth visualization based on parametric L-system [8] . Xu et al [9] used morphological parameters to model and visualize rice root system in three dimensions. Peng et al [10] completed the visualization modeling of rice root system based on L-system with gravity factor and deflection factor. Since the root system of rice does not have prominent growth characteristics and is more complex than that of other plants such as wheat and maize, it is difficult to quantify the structure of the rice root system [11] . At present, scholars have done in-depth studies on the rice root system, including rice root morphology, physiological functions, the relationship between the root system and the above-ground parts, and the influence of cultivation and management measures. Variable technologies, such as L-system, LiDA and Kinect and other high-precision sensor applicable methods, structured light method, 3D digitization, multi-view image method and binocular stereo vision method have been applied on the visualization and modeling of the rice root system [12] . In this paper, based on the previous research, we improve the method of rice root system visualization modeling by using L-system combined with B-Spline Curve to describe the indeterminate and branching root curves of rice root system, and combine the integral mathematical method to construct the B-Spline Curve-based rice root system visualization model.

L-System
The L-system was proposed by Prusinkiewicz et al [4] , giving formal description of plant growth processes and morphological changes. Afterwards, L-systems have been studied in depth by later generations for a long time, and they proposed parametric L-systems [13] , stochastic L-systems [14] , context-dependent L-systems [15] , etc., making L-systems a more widely used tool for virtual plant modeling at present. L-system is a pattern string replacement process, and its core concept is the string rewriting mechanism. The current pattern string is generated by applying generative rules to the initial pattern string for a finite number of iterations, and then the pattern string is interpreted into a complex geometry and displayed on the computer.
Assuming that V denotes the alphabet consists of the set of pattern strings, V* denotes the set consisting of all pattern strings in the alphabet V, i.e., the closure of V; V + denotes the non-empty set consisting of all pattern strings in the alphabet, i.e., the positive closure of V. The L-system can be formally defined as an ordered triple: where, ω∈V + denotes the set of non-empty pattern strings i.e. the axioms and P∈V × V* denotes the set of generating equations. The generating equation in P is usually denoted as S → χ, where S∈V is called the precursor of the generating equation, χ∈V* is called the successor of the generating equation, and → denotes that the precursor will be replaced by the successor in the iterative process. For any pattern string sin V, there exists at least one subsequent set of pattern strings χ satisfying the generating equation S → χ, and if not, its successor is assumed to be itself, i.e., S → S.

B-Spline Curve
B-Spline Curve has local support properties. While, in order to describe complex shapes and have local properties, instead of Bernstein basis functions, special basis functions are used, namely B-spline basis functions. B-spline basis functions are a set of basis functions with minimal support in the polynomial spline space, and therefore are also called Basis Spline. B-Spline Curve's mathematical expressions are: where P i (i= 0, 1, , n) is the vertex of the control polygon, B i, k (x) is called the k-th order (k-1 times) B-sample basis function, and k is the number of inscriptions and can be any integer between 2 and n+1. Basis function: The B-sample basis function is a segmented polynomial of order k determined by a sequence of non-decreasing parameters u called the nodal vector. Its recursive formula is given by: The uniform quadratic B-Spline Curve matrix expression for the n+1 control points is: in which, for example, four control points P 0 , P 1 , P 2 , P 3 generate two segments of quadratic uniform B-Spline Curve, whose first-order derivatives can be derived from Eq. (3). The control points P 0 , P 1 , P 2 determine the first segment of the quadratic uniform B-Spline Curve, and P 1 , P 2 , P 3 determine the second segment of the curve. The starting tangent vector P 1 to P 2 along the P 1 to P 2 side of the 2nd segment curve is equal to the ending tangent vector of the 1st segment curve, and the two segments achieve a natural connection. We know the coordinates of the control points and simply t take different values on [0,1] to plot each point on the B-Spline Curve, and then connect the points with line segments and the B-Spline Curve is plotted. However, to make the curve smoother, we need to take as many values of t between [0,1] as possible, i.e. the spacing is reduced. The results of the secondary uniform B spline running in visual studio 2019 are shown in Fig. 1.

Morphological Characteristics of the Rice Root System
Rice is a typical fibrous crop, and more than 90% of the rice root system is distributed in the soil layer above 20 cm depth. The rice root system consists of a seed root and many adventitious roots. The seed roots are formed directly from the seed roots and grow vertically downward. The primary branch roots protrude directly from the nodes of the adventitious roots, the secondary branching, roots protrude from the primary branch roots, and so on, and under high yielding conditions, six levels of branching roots can be produced in turn. These roots are staggered in the soil to form a large root system of rice, as shown in Fig. 2.

Fig. 2 Schematic root system of rice plant
The branching structure is the main morphological structure of the rice root system. Several adventitious roots sprout from the middle and lower root units before spike differentiation and extend downward at an angle of inclination ranging from 0° to 20°, and are densely distributed up to 15 cm from the surface before spike differentiation. Other adventitious roots and their branching roots generally sprout from the upper root-forming unit after spike differentiation. The extension of these roots is horizontal or slightly downward sloping at an angle of 20° to 60° and at a depth of 0 to 15 cm, with the uppermost 5 cm area having a well-developed, dense, reticulate, and finer root system. The geometrical characteristics of the root axis of indeterminate roots were approximately the same at other levels of branching roots, so the corresponding laws of indeterminate roots could be applied when describing the morphological structure and distribution of branching roots at all levels.

Rice Root Growth Characteristics
The root system of rice grows in an S-shaped curve, which is a "slow-fast-slow" process, i.e. three stages of slow growth, fast growth and senescence. At the seedling stage, the root system consists of a few branching roots that expand approximately parallel to each other and the main roots that grow vertically. The rice root growth process conforms to the logistic equation, which, as a theory described by a mathematical model, provides a proven problem solving method for curves with S-shaped growth characteristics.

Materials and Methods
From May 2021 to July 2021, three types of rice, Xiang Dry Indica 45, Wufeng You 286, and Yuehe Silk Seedlings, were used as test subjects in the agronomy experimental field of Jiangxi Agricultural University, and the three types of rice were cultivated on May 11, 2021. The same water and fertilizer were applied daily to the three rice species to provide nutrients to the rice and to ensure normal growth of the rice. Beginning on May 18 and ending on June 1, each of the three varieties of rice plants were dug from the test field by the digging method each day, and beginning on June 2 and ending on July 21, each of the three varieties of rice plants were dug from the test field by the digging method every seven days. Care was taken not to destroy the nutrient content and soil structure of the original soil, and at the same time, care was taken to maintain the integrity of the root system. The dug rice was soaked well in 100 g/L NaCl solution for 3 h, and then rinsed with tap water from top to bottom layer by layer. When it was rinsed well, the whole rice plant was pulled out from it and the soil attached to the root system was carefully washed with tap water again, and when the shape of the whole rice root system was exposed, the root germination was observed, the indicators of each morphological parameter of the root system and the root germination position of the branch roots were recorded, and the root system was scanned with a scanner to form pictures. With the help of WinRHIZO professional root analysis system, the root system picture, seed root length, adventitious root germination node, adventitious root number, maximum and minimum root length range of adventitious roots and branch root length range were statistically analyzed, and their average values were taken as growth data. In addition, root mass and diameter were counted, and the average values of surface area and volume were analyzed. Based on the experimental data, the growth curves of the root systems of the three species were fitted as shown in Fig. 3.

Rice Root Growth Rule Extraction
We first considered the longitudinal distribution of the root system and performed spatial data calculations to obtain the longitudinal distribution data of the root system based on the original coordinate data. Then the scatter plot shape of the longitudinal cumulative distribution of the root system was plotted. Finally, according to the trend of the scatterplot shape of the longitudinal cumulative distribution of the root system, mathematical equation screening was performed.
During the tillering and maturing stages of rice, the root system near the surface grows almost horizontally, while the root system in the center of the roots grows vertically downward, forming a "fan" distribution on the plane. The length of different root systems varies greatly, and generally the roots growing vertically downward or diagonally downward are longer. From the variation of total root length with soil depth, it can be seen that the total length of the root system in the tillering stage differs greatly from the total length of the root system in the maturing stage, and the total length of the root system in the maturing stage is about twice the total length of the root system in the tillering stage. However, the depth of root entry was greater in the tiller stage than in the maturing stage. The root depth of tiller stage rice was close to 30 cm, while the root depth of maturing stage rice was less than 25 cm, indicating that the root depth of early growth was relatively deeper and the root depth of late growth was relatively shallow. In the 0-10 cm soil layer, the total length of rice roots at tillering and maturity increased almost linearly with increasing depth of entry; in the 10-30 cm soil layer, the total length of rice roots increased with increasing depth of entry, but the rate of increase decreased significantly, as shown in Fig. 4. To test the reliability of the mathematical simulations, the cumulative root lengths of the root systems at 10, 20 and 30 cm were calculated using the established mathematical simulation equations and compared with the measured root lengths at 10, 20 and 30 cm. The results showed that the correlation coefficients between the measured and mathematical simulated values all reached a highly significant level. Therefore, the mathematical equation y = a (1-b x ) was used to simulate the longitudinal distribution of the root system in the soil reliably.
Second, we consider the lateral distribution of the root system. The trend of the scatter plot shape of the lateral cumulative distribution of root systems was exactly the same as that of the scatter plot shape of the longitudinal cumulative distribution of root systems. During the tillering and maturing stages of rice, the root system grew almost uniformly in all directions in the soil, but the lateral distribution range of different root systems varied greatly due to different root lengths. As can be seen from Fig. 5, the total length of the rice root system increased almost linearly with distance within the soil layer 15 cm from the center of the grain and rootstocks; the rate of increasing the total length of the root system decreased significantly within the soil layer 15 to 25 cm; after exceeding 25 cm, the total length of the rice root system basically stopped increasing. While the main roots of the rice root system have obvious self-similarity to the branching roots at all levels, combined with the equation y = a (1-b x ), its growth rule can be described by a logistic equation to describe its pattern. The logistic equation was derived by the biomathematician P. F. Verhulst in 1838 [16] for the study of the population growth process. It is characterized by a slow growth at the beginning and a rapid growth in a certain range later; after reaching a certain limit, the growth slows down again. The curve has a slightly elongated S-shape and is particularly advantageous in describing changes in the number of organisms growing. Rice root growth shows an S-shaped curve variation, and its growth process is in accordance with the logistic equation.
The root system, which forms the basis and framework of the crop root system, has a relatively high elon-gation capacity and activity. After a period of rapid growth, the root system growth rate rapidly decreases and tends to zero, the aging process intensifies later, and the root system as a whole generally does not die throughout the reproductive period. Therefore, the elongation of the root system satisfies the logistic equation shown in Eq. (5), which is where a, b, c are the parameters to be estimated. They can only be determined by fitting the resulting data to the logistic equation itself. In deriving the logistic equation, the parameters b and c can be found by least squares, while for a, three pairs of observations (t 1 , a 1 ), (t 2 , a 2 ), and (t 3 , a 3 ) can be substituted to find them.

Seed Root Model
Rice seed roots are produced first, and the morphology of seed roots is relatively simple and easy to model, so we can use cylinders to simulate the morphology of seed roots. The cylinder is drawn by calling glu-Cylinder(), a function in OpenGL that draws geometry using quadratic surface techniques, and is implemented as follows: 1) Create and initialize the secondary surface. GLUquadricObj *obj=gluNewQuadric(); 2) Call the gluQuadircDrawStyle() function to set the type of secondary surface to be drawn. gluQuadricDrawStyle(obj, GLU_FILL); 3) Call the gluCylinder() function to draw the cylinder. gluCylinder(obj, node-→data.thick, EndThick, distance, 10, 1); where node-→data.thick, EndThick, and distance are the radius and length of the top and bottom base of the cylinder, respectively.

Indeterminate Root Model Generating Rules
According to the growth characteristics of rice root system, the topology of rice root system with self-similarity can be described by the generation rules of L-system, so this paper adopts the method of fractal reconstruction of rice root system morphological structure to realize the virtual simulation image of root system. The B-Spline Curve has the advantages of smoothness, convex wrapping, and controllability, so the B-Spline Curve is combined with the L-system to express the curved shape of the rice root system. The B-Spline Curve mainly expresses the curved root system through the start and end nodes, control nodes, and de Boor-Cox recursion formula. In the rice root system L-system, the coordinates of the start and end nodes expressing the inter-root segment character F are first calculated; then the control nodes are determined, which can be added between the start and end nodes or based on the convex packet direction of the root system as well as the growth space direction; finally the bending characteristics of the root system are modeled by the de Boor-Cox recurrence formula, which is combined with the B-Spline Curve designed by the rice root system L-system. Therefore, we combined the B-Spline Curve to design the following rules for the indeterminate root production equation for the rice root system L-system.
In the rice root system L-system, ω denotes the initial metric, and a segment of curved roots is expressed by the start node P(0) and the end node P(n), and n-1 control node vectors are added between the start and end nodes depending on the direction of the root convex packet; the generating equation p1 denotes the root rule, P(t) denotes the root curve, t denotes the uniform open node vector, k denotes the B-sample order, and i takes values in the range 0 ≤ i ＜ n; the generating equations p2 and p3 are computed according to the de Boor-Cox recursive formula, and generating equation p2 is invoked if i = j; generating equation p3 is invoked if i = jk + r + 1, and r is the B-Spline Curve count variable.
In order to express the bending degree of rice root system figuratively, this paper proposes a method of definite integral to calculate the bending direction of the rice root system. As the root system is affected by environmental factors or gravity factors, the root system will bend. We can use the method of quadratic function to represent the next stage of root system extension, which can show the bending effect better, but this method needs to obtain the angle between the root system to solve the coefficient of this quadratic function in the process of geometric modeling, and it is difficult to obtain the value of this angle in root system data measurement. Here a method based on the root system integration is proposed for the solution: assuming that the root system does not break after bending, the coordinates of the current growth point of the root system are P 1 (x 1 ,y 1 ), and according to the formula extracted from the root system growth rule, we can calculate that the coordinates of the root system become P 2 (x 2 ,y 2 ) after growing for a period of time, and we assume that the root system growth does not bend, that is, the line between P 1 and P 2 is a straight line. And in reality, the root system growth is random in nature and cannot be a perfectly straight line growth, so we can use Eq. (6) to solve the coefficients of the quadratic function.
The matrix expression for the solution of its coefficients is: Given that the length of the interpolation point to the coordinate origin of the root system before and after bending remains the same, the value of the transverse coordinate of the interpolation point of the root system after bending can be solved with the help of Eq. (8). , n is the number of interpolated points of the original root system, 1 1 (oldPoint oldPoint ) i y y   is the height of the i-th interpolated point to the origin of the coordinates before the root system bends, i.e., the length of the point to the bottom of the root system; 1 newPo int x is the value of the transverse coordinates of the end point of the root system before growth occurs, which does not change before and after the root system bends, and 1 newPo int x is the objective of the solution, i.e., the value of the transverse coordinates of the i-th point after the root system bends, and when the transverse coordinates of all the points are solved, the root system function can be solved again with the help of the vertical coordinate values. The visualization effect is shown in Fig. 6.

3D Visualization Simulation of Rice Root System
Based on the above design, the rice root system Lsystem is constructed with the help of vs2019 operating platform, combined with OpenGL standard graphics library, in which the angle between the rice root system, the degree of bending of the branching roots and the extension changes of the root growth are fully considered. The number of iterations is mainly used to control the topology of the root system, so the higher the number of iterations, the denser the root system will be. Moreover, the growth of the diameter and length will make the root system grow continuously, thus producing the effect of root growth.
In this paper, three varieties of rice hybrids, Xiang Dry Indica 45, Wufeng You 286, and Yuehe Silk Seedlings, were used as test subjects, and based on the description of morphological and growth characteristics of rice root growth in different developmental periods, combined with the L-system generation equation expressing root characteristics, and taking Yuehe Silk Seedlings varieties as an example, the system simulation effect is shown in Fig. 7. The simulation effect is roughly close to the physical scan, indicating that the B-Spline Curve combined with the L-system can better reflect the actual growth of the rice root system, which provides an auxiliary decision-making role for simulating the growth of the rice root system.

Conclusion
The modeling and visualization simulation of rice root system is an important component of 3D simulation of rice growth. In this paper, we obtain rice data through experiments, observe and analyze the spatial distribution characteristics of the rice root system, and study the morphological structure, growth and distribution charac teristics patterns during the growth and development of the rice root system. The B-Spline Curve combined with L-system is used to construct a rice root system model. In the establishment of the root system bending model, a new method of root system integration is applied to avoid the difficulty of obtaining the angle between the root systems. Finally, the rice root system visualization simulation was achieved, and the simulated image was closer to the real However, there is still a considerable difference between the experimental data and the real data in natural environment due to the error and limitation of collecting rice root system and other factors. In addition, this paper did not consider the effects of environmental factors such as light, water, and nitrogen fertilizer, and could not get rid of the single experimental environment to make the simulated root system achieve a high degree of consistency with the naturally growing rice root system in the field. In the subsequent research work, we need to further combine the physiological and ecological factors to visualize and simulate the rice root system, so that the simulation image is closer to nature.