Visualization of Tomato Growth Based on Dry Matter Flow

Thevisualizationoftomatogrowthcanbeusedin3Dcomputergamesandvirtualgardens.Basedonthegrowththeoryinvolvingthe respirationtheory,thephotosynthesis,anddrymatterpartition,avisualsystemisdeveloped.Thetomatogrowthvisualsimulation systemislight-and-temperature-dependentandshowsplausiblevisualeffectsinconsiderationofthecontinuousgrowth,texture map,gravityinfluence,andcollisiondetection.Inaddition,thevirtualtomatoplantinformation,suchastheplantheight,leafarea index,fruitweight,anddrymatter,canbeupdatedandoutputinrealtime.


Introduction
Crop growth simulation is useful for constructing virtual scenes used in 3D computer games and virtual gardens, evaluating crop behaviors [1] and supporting the management of crops [2].As a kind of widespread crop, numerous varieties of tomatoes are ubiquitously planted across the world.In recent years, tomato growth simulation in computer has been gaining more and more attention.
In the view of tomato growth theories, the physiological analysis of plant [3] gets attention.The growth period, environment condition, and architectural traits had been studied.Both the temperature and the nonstructural carbohydrate level (dry weight) are used to predict the influences on the growth of tomato [4,5].For exploring the influence between the plant growth and the environment, Functional-Structural Plant Models (FSPM) are brought up which shows great performance in the past years.A mechanistic Functional-Structural Plant Model, GreenLab model [6], is used to analyze tomato crops [7,8].Recently, Fan et al. [9] proposed a novel knowledge-and-data-driven modeling (KDDM) approach for simulating plant growth.A GreenLab model used as the knowledge-driven and a radial basis function network used as the data-driven were integrated together.
All above mathematical models and those simulation systems focus on the accuracy of simulation, which can be evaluated by comparing the experiments measuring data to the simulation results with statistical indexes.The outputs of most of these theory models are numbers or statistical charts, which can not be used for intuitive computer visual applications.For example, those models gave the number of tomato fruits but did not tell their positions.In order to simulate the tomato growth in the view of computer graph application, we in this paper should make some detailed technologies clear.
In the view of visualization, most popular methods of simulating tomato growth depend on the parametric Lsystem [19][20][21] which is a parallel rewriting system with formal grammar [22].Parameters used in their visualization systems are measured from real plant or estimated with image and video technology [23].However, these existing systems have some deficiencies for visualization.For example, leaf shape and leaf phyllotaxis are still not suitable for the constantly changing leaf shape during the growing process [19].Besides, in some cases the plant shows artificial figure using regular L-system grammar [21].In order to improve the visual effect of tomato growth simulation system, we construct a general visual platform in this paper.There are three contributions in our work: (1) Several key parameters and growth functions are selected and designed, respectively.(2) Growth functions including LAI and dry matter partitioning formulae are converted to new patterns which are adapt to our system.For example, the formula about dry matter acquiring is revised from average estimation to leaf by leaf.(3) A new general visual platform is designed.The geometry of each leaf, fruit, and flower grows and expands corresponding to the age of the plant and resource provision.In addition, collision detection and gravity influence are taken into account.Compared to most previous literatures [19,24], the realistic effect significantly improves in our system.
With realistic visual effect and those classical growth theories, our visual system can be used in 3D computer games, tomato growth analysis, computer graphic modeling, three dimensional animations, computer virtual gardens, popular science, and so forth.In the following, several parameters and the growth functions are constructed (Section 2), and a visual system is built (Section 3).At last, the system is evaluated by some experiment results (Section 4), and conclusion is given in Section 5.

Growth Functions and Modeling
Tomato growth is a very complex phenomenon, so its simulation involves a lot of parameters and growth functions, which is the basis of our visual system.

Model Parameters.
Model parameters are important factors for the simulation, and reasonable selection from commonly used parameters for computation can speed up the simulation result while meeting the accuracy requirements of the simulation.By investigating 18 published literatures (Table 1), about 130 parameters are employed in those models.Among those parameters, the most popular 12 variables in the order of frequency number  from large to small are air temperature (C ∘ ), leaf area index (LAI), dry matter weight (DM), CO 2 , growth rates (GR), fruit weight (FW), leaf number (LN), photosynthesis (Ph), respiration (Re), leaf weight (LW), partitioning (Pa), and radiation level (Ra).For the simplification of modeling but keeping the key parameters, our simulation system employs all those 12 variables.

Variables and Symbols.
In order to make clear the related simulation theories and our visualization approach, some terminologies, variables, and symbols are summarized here.Symbols are mainly the same as GreenLab [4,6,9].Besides parameters listed in Table 1, there are several other parameters that contribute to the simulation.These parameters can be classified into three categories as follows.
The first category parameters are related to environment, that is, environmental variables.They are measurable and represent the growth conditions inside a greenhouse.
(i) : average daily air temperature.
The second category is tomato crop parameters.
(iii)   : coefficient which is related to the growth rate.
(iv)   : the number of .
(v) Area leaf : a single leaf area.
(vi)   : the volume of organ .
(ix)   : the rate of growth of organ , varied with time and temperature.
(x)  min : the lower bound of temperature for growing.
(xi)  max : the upper bound of temperature for growing.
The third category involves the simulation parameters which are used for visualization.
(i) : the growing unit.
(ii)  0 : the minimum radius of a node when it shots.
(iii)   : the number of segments of an edge, denoting the resolution of a leaf mesh,  ∈ {wid, hei}.The element wid denotes the width of a leaf and hei denotes the length of the leaf.

Growth Functions.
Traditionally, functions use the average leaf area [4] which is a function of leaf age or use the representative leaf area [25].Different from traditional methods, our model obtains the total leaf area by summing the area of leaves one by one.Therefore, those formulae in previous literatures should be revised as follows for our model.

Dry Matter Acquisition.
There are a lot of mathematical models which simulate the acquisition of dry matter.Most of them believe that maintainable dry matter is related to light, temperature, and CO 2 [4,9,26].Among them, a mathematical model [4] is the most closed to our investigating result (Section 2.1).Therefore, the mathematical model is changed to (1) which can deal with the area of leaves one by one.The environmental factors, CO 2 and light radiation level , are incorporated in the equation.

Maintenance Respiration.
As in [4], the index of maintenance respiration denoted as  ,maint in the th day is also taken into account in our model.The total demand is the sum of consumption by all organs (internodes, leaves, flowers, and fruits), denoted as with where  ∈ {node, flower, fruit} and Note that, in literature [4], ℎ() =  (() −25) which is a monotonically increasing function and does not meet the assumption that a tomato plant grows best when the environment temperature is around 25 ∘ .But the assumption can be met with our new equation ( 5).

Growth Respiration.
If the acquired dry matter is more than the demand of maintenance respiration, the remaining dry matter partitioning will be recalculated for growing.
Referring to the equation about growth respiration [4], both maintenance respiration and growth respiration use the same exponential function if  min ≤  ≤  max .We use the same exponential function but with different equation by introducing internode growth and organs expanding, respectively: where Δ , () =   Δ is the growing amount of internode and organs.For flowers, internodes, and fruits, their volume will increase continuously.For leaves, the growth will lead to the geometry surface expansion as the method in [27].
It has been proven that the total PAR received during the days from sowing to flowering is strongly correlated with the number of days [2], which means that it is reasonable to use growth timeline to simulate the plant growth [19].In our simulation system, the growth rate   is a variable which reflects the organ's state.It is zero if the environment temperature is lower than  min or greater than  max .
As for the stem branching and the new buds generating, the demanding of dry matter is the same as (6).

Visualization System
Our visual system for simulating tomato growth (TomatoVis) is an effective integration for geometry computation and visual analysis methods.A tomato grows based on dry matter flow and is constrained by environment factors.Therefore, our system inherently supports both growth visualization and environmental information analysis.

Generating Geometry of the Stem and
Organs.The stem and organs are modeled based on the balance between the complexity and the realistic effect in the user interactive frame rate.

The Stem Modeling.
Guided by real photo (Figure 1(a)), we use skeletons and cylinders [19,20] to represent stems (Figure 1(b)).This is a straightforward method.Here a small trick is that the internode is divided into  unit growth units for simulating the continuous growth of the stem as shown in Figure 1(c).For visualization, a growth unit has the initial length  0 and radius  0 at the end point when it was born and a maximum length  max and radius  max when it matures.Each growth unit can increase continuously in the length and the thickness (its radius) until it gets maturity.Both the growth rates of elongating direction and expansion direction are linear functions of growth time if it obtains enough resources (dry matter) and meets the requirement of temperature.

Leaf Modeling.
Leaf growth analysis helps us to better understand the relationship between the plant growth and the leaf geometry (shape and size), especially for gene or tissue analysis [27,38,39].We use a simple textured mesh model [40] to represent the relationship and simulate the leaf growth, and different from existing tomato visual system [19] where all leaves are of the same shape, we use multiple leaves texture images to improve the realistic effect.For example, a tomato phyllotaxy usually consists of 5 leaves or more, as shown in Figure 2(a).Those leaves are usually different in sizes and shapes.We model several representative leaves and each leaf is modeled with a  wid ×  hei mesh mapped with a real leaf image (Figure 2(b)) for realistic display.Figure 2(c) shows the result that is modeled by two kinds of leaf shapes.The area of each leaf is the mapping texture image area on the mesh.

Flower Modeling.
A representative virtual tomato flower consists of 4 parts: pedicel, sepal, petal, and pistil (Figure 3(a)).The pedicel landed to the stem is modeled with cylinders as the same as used for stem.Each tomato flower has 5 sepals and 5 petals and can be changed according to the types of tomatoes.Both a sepal and a petal are modeled with a mesh, respectively.Tomato pistil located centrally in the flower is also constructed with cylinders (Figure 3(b)).After texture mapping, the virtual tomato flower is modeled as Figure 3(c).For simulating flower blooming, the vertex  0 representing the petal base position is fixed in the simulation as [41].Then the growth of the pedicel, sepal, and petal is calculated with a mathematical formulae where   is the old position on the pedicel, sepal, and petal and  ()  is the new position; ⃗   is the unit growth direction of the pistil.The parameter   is different for the pedicel, sepal, or petal, which means the growth rate in radius of different parts of the flower.Another parameter   represents the growth rate of open angle of the pedicel, sepal, or petal.The effect of experiment is illustrated in Figure 4.

Fruit Modeling.
A simple virtual tomato fruit consists of 3 parts: stalk, sepal, and pericarp (Figure 5(a)).For simulating the flower-to-fruit process, the former two parts, that is, stalk and sepals, use the meshes from flowers, while the pericarp is modeled with a general ellipsoid, denoted with (,  → ,  → ,  → , , , ) by specifying the values of three semiaxes parameters (Figure 5(b)), , , . is the land point which the ellipsoid links to the stalk at, and  → ,  → ,  →  is the local coordinate system.Here we do not use the rotation method presented in [19], because it is easy to detect collision between tomatoes with our ellipsoid models.Referring to the photo (Figure 5(a)), a hanging fruit is modeled vividly as shown in Figure 5(c).
For simulating the process of a fruit expansion (Figure 6), we use expansion mathematical formulae as those used in Section 3.1.3.

Simulation Flowchart.
Tomato growth is simulated by following the flow of carbon (total nonstructural carbohydrate) [4] which is related to CO 2 , environment temperature, and light flux density (Formula (1)).The growth processing is illustrated with a flowchart, as shown in Figure 7.At first, the tomato plant obtains the carbon or dry matter (DM) by leaves photosynthesis.The amount of DM is estimated with (1) with input environment information.Then, the plant consumes a part of DM because of maintaining the dark respiration of all stems and organs.The consumption is estimated by (3) to (4).Next, the growth respiration is calculated if there is remaining DM and the environmental factors are approved.At last, the plant geometry is developed.
If needed, the plant height, the number of fruits or flowers, the total dry matter, LAI, and yield can all be exported.

Gravity Influence.
The tomato stem is so thin that its shape is easily influenced by gravity.Given each substem drags the main stem a little bias, a linear function ( 8) is used to the main skeleton point that is linked to the substem.
where   is the coefficient representing the support force and Δ , is the amount of increased dry matter of the substem.The gravity force on leaves, flowers, and fruits is also taken into the substem, which is increased linearly proportionally to the organ area (leaf) and the volume (flower or fruit).Comparing the results without the gravity influence (Figures 8(a) and 8(c)) to the results with gravity influence (Figures 8(b) and 8(d)), the latter obviously show better visual effect.

Collision Detection.
The realistic effects of models can be improved by detecting collision and taking necessary responses.The fruit is modeled with an ellipsoid, so we just need to check the distance between two ellipsoid center points and the half axis length (, ,  in Section 3.1.4). Figure 9 is the visual comparison of a tomato plant with and without fruits collision detection.

Experiments
Our modeling and simulation algorithms are written in C/ C++ language with OpenGL GLUT library and implemented on a PC with Intel(R)Core(TM)i7-4700MQ CPU@2.40GHz and 8 G memory.
We focus on the visualization effect influenced by temperature variation.As a result, except for temperature, the light strength, PAR, and CO 2 are set constant values.By referring  to [2], the time period from sowing to the final harvest stage was 105 days; PAR 5-25 mol/m 2 day and total in production is 300-1200 mol/m 2 .By referring to [4],  = 0.0693, CO 2 = 300, and the solar radiation level  = 43.By experiment tests, we set the stop growth temperature  min = 10 ∘ C,  max = 32 ∘ C; the growth parameter   is 0.03, 0.05, 0.06, and 0.07 for leaf, stem, flower, and fruit, respectively.

Visual Growth Simulation.
For a greenhouse environment, the indoor temperature can be set according to the growth demand.We set the greenhouse temperature at the optimal temperature for the tomato growing 25 ∘ C and let the daily average temperature  = 25 +  in the growing days. is from the continuous uniform distribution (−5.0,5.0).The experiment result is partly shown in Figure 10.At the 105th day as shown in Figure 10(j), there are 45253 polygons, 201 leaves, and 56 fruits.The plant height at last is 2.27m.
During the tomato growth process, the accumulate dry matter (DM) of the plant (TotalDM), leaves (LeavesDM), and fruit (FruitsDM) is all in small amounts or zero at the beginning and gradually increases, respectively, as shown in Figure 11(a).At the last day, the ratio of FruitsDM to TotalDM is about 75.8%, which is slightly over some observed results (about 70%, the observed "Sunny" data, in 1992 and 1994 in [17]).The ratio of LeavesDM to TotalDM is about 12.3%.The leaf area index (LAI, Figure 11(b)) in the simulation period increases before the flowering time and then decreases.The curve shape of LAI is the same as the observed data of "Agriset 761" (1995), "Solarset" (1995), and "Florida 47" (2006) reported in [17].

Simulation with Real
Temperatures.It has very important significance to evaluate the sensitivity to temperature of a simulation system and to compare the prediction results of the accumulate dry matter and fruit yield as done in [4,13,17].We take the comparison experiment by using the daily average temperature in 2014 of California, USA.The temperature data (Figure 12) is from Carbon Dioxide Information Analysis Center (CDIAC, http://cdiac.ornl.gov/epubs/ndp/ushcn/daily_doc.html).
Avoiding those days with lower temperatures that are not suitable for tomato growing, we let the planting date be the 50th, 120th, 190th, and the 260th in 2014.After 105 days of growing, the experiment results are shown in Figure 13.From Figure 13(a), we can find that the plant is short because of low temperature days in its early stage, which influences the flowering and bearing fruits.By contrast, because of the low temperature days in the later stage, the plant grows but its fruits bearing is failure in Figure 13(d).Among the four planting dates, the best planting date is the 120th and 47 large fruits are harvested (Figure 13(b)).Although a highest plant is generated by planting on the 190th day and 65 small fruits are obtained (Figure 13(c)), the total fruits dry matter is not the highest among the four cases.The plant height, dry matter, and LAI information are listed in Table 2 in which the "OrgansDM" includes fruits and flowers dry matter.

Visual Comparison.
We give a visual comparison of our results with two earlier works.Figure 14(a) is generated by sketch-based method and incorporated with BP Neural Network [28].The tomato model shows good realistic effect and the model is approximate to real one.Figure 14(b) is from a tomato plant modeling system [19] which is based on the growth laws, the topological structure, and parametric L-system.Figure 14(c) is created in the ideal environment (see Section 4.1) by our visual simulation system, and flowers are randomly changed to fruits for showing a visual effect the same as Figure 14(b).Comparing to the tomato photo (Figure 14(d)), all the three virtual models do not show the wither shape, which is a limitation of all these methods.In the view of a vivid visualization, our model is more convincible to those models created by the existing methods [19,28].
We also make a comparison between our tomato growth process and the plant growth process in Unity3D (Figure 15).In Unity3D, we need to set different growth models in different growth stage based on our modeling goals without any growth principles.These models should be generated in advance, and the adjusting work is a tedious process in order to keep the continuous growing process.For tomatoes growth, the topology of the plant changes a lot during the growth cycles, and it is difficult to achieve smooth transition based on Unity3D manually.Our method is designed based on biomechanism and the growth transition is more natural.Although we considered many parameters during the tomato growth process, only the temperature is the core factor for the tomato growing, and other parameters can use the default values, as these values are set based on biology knowledge unless the user wants to get some bizarre effects.Usually, it is enough to implement our tomato growth automatically by setting the temperature factor for the computer game application.
The whole growth process can be simulated in real time.As different tomato growth stages will have different topologies, the growing and rendering time maybe increase along with the complexity.Figure 16 shows the growing and rendering time for the whole life cycle of one tomato plant.The highest time cost is 0.0065 seconds-per-frame (in the 132nd day) as the tomato begins to mature.In all, the rendering rate can be rendered more than 150 frames-persecond for one tomato plant.Figure 17 gives the change state of vertices and faces numbers during the growth process, and the maximum vertices number and faces number are 8064 and 6501, respectively, under our default parameter settings.Our current TomatoVis system does not consider the wither and artificial pruning cases, so the number of vertices and faces will not decrease during the tomato life cycle.
For the computer game application, usually there are many plants in the scene.We can use our algorithm to generate one tomato plant mesh model and obtain many instances on GPU based our hardware instancing method [42], making the whole growth process faster.

Conclusion
In this paper, a visualization system for simulating tomato growth (TomatoVis) is built.The system is light-andtemperature-dependent and is developed based on the growth theory with measurable parameters.In our system, the calculation equations of dry matter acquirement and partition are redesigned, and the dry matter flow can be tracked on each node and organ in turn to display the constraints of dry matter and environmental temperature on plant growth.Several nature influence factors, plant growing days, environmental temperature, texture map, gravity influence, and collision detection are taken into account in the simulation for the realistic effects of dynamic growth.Besides, the tomato plant information, including plant height, International Journal of Computer Games Technology    leaf area index, fruit number, and dry matter, can be updated and output in real time, which is helpful for visual analysis, greenhouse environment monitoring, and so forth.However, TomatoVis has some limitations.For example, it cannot simulate the leaf wither phenomenon; it contains many parameters but cannot reveal the relation among them; the factors such as water and nitrogen are not included.All these limitations should be considered in our future works.And in the coming days, the scale of growth time should be decreased from a day to an hour.As pointed by [18], leaf The vertices and faces numbers statistics in a growth cycle of a tomato plant in our TomatoVis system.As in most cases, the growth cycle for tomatoes is 4-6 months, and from the 91st day, the vertices and faces numbers are not increased anymore.
orientation and insertion angle should also be taken into account.We will try to improve our TomatoVis system to conquer the above limitations in future.

Figure 1 :
Figure 1: Modeling tomato stems with cylinders.(a) Stem photo.(b) Stem model.(c) Growth units and growth directions.

Figure 2 :
Figure 2: Modeling leaves with deformable meshes.(a) A tomato phyllotaxy photo.(b) Different leaf shapes in different growth stages.(c) Building a phyllotaxy with two different shape leaves.

Figure 3 :Figure 4 :
Figure 3: Modeling flowers with deformable meshes.(a) A tomato flower photo.(b) Each part of a virtual tomato flower is modeled with mesh.(c) A virtual tomato flower model.

Figure 5 :Figure 6 :
Figure 5: Modeling fruits with deformable meshes.(a) A hanging fruit.(b) Building a fruit mesh.(c) Modeling a hanging fruit.

Figure 10 :
Figure 10: A visual tomato growing series frames generated with our method (in the subfigure title, d means the th day).

Figure 12 :
Figure 12: Daily average temperature in 2014 in California.

Figure 13 :
Figure 13: The simulated results (after planting 105 days) of tomato growing in different seasons according to CA daily average temperature.Planting on the 50th day (a), the 120th (b), the 190th (c), and the 260th day (d) of the year.

Figure 14 :
Figure 14: Comparison in the view of visualization.

Figure 15 :
Figure 15: Four states of one tree in growth in Unity3D software.Each model must be set manually, and some branches maybe appear suddenly as the discrete setting environment in Unity3D.Referring to Figure 10, our TomatoVis system can generate the models continually without any special settings for any growth stage.

Table 1 :
Parameters used in published papers.

Table 2 :
Results of simulating the growing of tomato planted in different dates.
Figure16: The time statistics in a growth cycle of a tomato plant in our TomatoVis system.The longest growth cycle for tomato is nearly 304 days in the greenhouse.In most cases, the growth cycle for tomatoes is 4-6 months.In any case, the growing and rendering time for one plant in our system is less than 0.007 seconds-per-frame, which means the growth process can be displayed in real time.