# Interactive Pruning Simulation of Apple Tree

Lili Yang, Jiafeng Chen, Jing Hua, Mengzhen Kang, Qiaoxue Dong

► To cite this version:

Lili Yang, Jiafeng Chen, Jing Hua, Mengzhen Kang, Qiaoxue Dong. Interactive Pruning Simulation of Apple Tree. 9th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2015, Beijing, China. pp.604-611, 10.1007/978-3-319-48357-3_58 . hal-01557794

HAL Id: hal-01557794

https://inria.hal.science/hal-01557794

Submitted on 6 Jul 2017

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Interactive Pruning Simulation of Apple tree

Lili Yang ¹, JiaFeng Chen ¹, Jing Hua ², MengZhen Kang ², QiaoXue Dong ¹,*

¹College of Information and Electric Engineering, China Agriculture University, Beijing, China;

²State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Science, Beijing, China

**Abstract:** Pruning treatment is one of the important management practices of perennial fruit tree cultivation. Combining fruit tree growth theory with mathematics model and software development is an effective way in agricultural research. Virtual apple tree is built as a case to study pruning treatment in this paper. First, architectural development of apple tree was analyzed and stored in xml file. Then, the simulation software of apple tree pruning is build based on the Qt framework and OpenGL graphics library. The interactive pruning and automatic pruning with setting conditions are realized in the software. Reaction laws of apple tree pruning are extracted from the analysis on the experiment data. Stochastic 3D apple tree architectures after being pruned also can be simulated. Result indicates that simulation is efficient, accurate and timely judgment of pruning reaction is possible. This work is the foundation of future research, which will simulate the apple tree development of architecture and biomass after pruning treatment over time.

**Keywords:** apple tree, pruning, interactive, simulation.

# 1 Introduction

Tree architecture plays a key role in foliage distribution and consequently in light interception and carbon acquisition, which in turn strongly affect the reproductive growth of fruit trees. Pruning treatment is one of common measures for architecture study in perennial fruit tree cultivation. Reasonable pruning plays a key role in tree fruit quantity and quality [1]. It had been found that removal of flowering shoots at a young stage of growth with less pruning of old branches tends to stimulate growth of the remaining shoots and fruit set of adjacent inflorescences [2-4], Jean Stephan studied the effect of pruning strategies on shoot demography and development during 2 years based on experiment and demographic approach [5]. A biological model of apple tree production and a biomechanical model of apple tree development using mixed statistics are built successively [6-7]. The perennial nature of apple tree make modeling complex, but the simplifications and codes description of tree topology presented by E. Costes make apple tree model possible [8-9]. Many models are focus on the apple tree growth and development under the natural state rather than after pruning [10-11]. Pruning research based on virtual apple tree model can be meaningful and efficient. However, few interactive virtual platform of apple tree pruning are found [12-13]. The work in this paper include: (a) Build a virtual apple tree model based on architectural development of apple trees. (b) Design and realize 3D interactive pruning simulation on general PC. Pruning strategies commonly used in real planting are considered in this platform. (c) Stochastic 3D architectures of virtual apple tree were modeled after pruning. The work is the foundation of further work, which focuses on the relationship between
structure change which is reduced by pruning of apple tree and function change regarding as physiological character of fruit tree.

## 2 Overall design

The technical framework of apple tree pruning simulation is established on visual apple tree model combined with computer graphics technology. First, the hierarchical data organization which describes apple tree's morphological structure is formed based on the geometry structure of the apple tree. Second, the three-dimensional model of apple tree is build based on OpenGL. Finally, an interactive interface of apple tree pruning simulation based on QT framework is developed. The work is showed in figure 1.

<figure><img src="image_2.png" /><figcaption>Fig 1: Workflow of pruning simulation</figcaption></figure>

## 3 Interactive Pruning Simulation

### 3.1 The Model

It is commonly accepted that plants are modular organisms that develop by the repetition of elementary botanical entities [14]. Here, apple tree architecture is described in Growth Units (GU) level, which were divided into latent bud, medium shoot (5-15cm), short shoot (<5cm) and long shoot (>15cm) according to the length. Topology structure of apple tree, which describes the connection relationship among all units, is modeled using the dual-scale automata approach [15-17]. In this way, apple tree is divided into hierarchy according with self-similarity and branching order during apple tree growth. Different years of germination branches reflect difference vigor, which is called physiology age (PA). Except the trunk, primary branch on trunk is defined as PA1, and secondary branch on primary branch is defined as PA2 and so on. Each branch belongs to a certain GU according to the branch length. In commercial orchards apple tree usually are pruned short and less branch level. According to dual-scale automata model, four macro states are applied to simulate a young apple tree topology development.
<figure><img src="image_3.png" /><figcaption>Fig 2. Dual-scale automata model of a 5 years old apple tree</figcaption></figure>

Position of structure (POS) unit describes the linked relationship between units. Different node rank on branch will develop different GU according to certain probability obtained from field experiment data fitting.

A local-to-global approach is taken in building apple tree 3D model. Apple tree is decomposed into four level structure unit: node、internode、branch、organ. Node refers to the key point of apple tree skeleton. Node information, including space coordinates and distance to internode surface, is calculated by extracting a certain rule based on some measured data. The adjacent nodes constitute an internode and a series of internodes constitute a branch. Organ refers to apple tree leaves and apple fruit. Single organ geometric structure is built by 3d scanning. All organs, whose space position, orientation and size are simulated by using the information of measured data in special coordination system, are assumed only having differences in position, angle and size for same type.

## 3.2 Data Organization

Two categories of data are included in apple tree model: one is node information, another is organ information. Both are saved as a standard XML file with different suffix. Only the key node information of tree skeleton is stored in model, not including the surface node information of the branches in order to reduce the data storage.

The information of function topology is added into geometry topology based on the three-dimensional model structure of apple tree mentioned in 3.1. Taking the branch for example, the model data include PA, POS and all the node information on the branch. The coordinates of the pruning point located the branch where the pruning point is on, then, the function topology information of selected branch like PA is obtained from the node information XML file. POS is designed as a sequence which stores the position order from trunk to branch or organ in an even number. For example, the list<10,1,8,3>, means a piece of leaf or a shoot born on the 3th small branch of the 8th node , which is on the first branch of the 10th node of the trunk. A branch and an organ data are organized as below. All nodes are described by 3D space coordinates x,y,z and the diameter of the node to the branch. The organ is described by a transfer matrix that can generate different size and direction organ by organ transformation.
```xml
</Branch>
<Branch PA="4" POS="193,1,55,1,13,1">
    <Node>-50.1586,-6.02841,307.927,0.47941</Node>
    <Node>-48.5204,-6.78654,307.927,0.47941</Node>
    <Node>-46.883,-7.54428,307.869,0.47941</Node>
    <Node>-45.2471,-8.30138,307.774,0.481215</Node>
    <Node>-43.599,-9.06413,307.676,0.481215</Node>
    <Node>-41.9508,-9.82688,307.578,0.481215</Node>
    <Node>-40.3027,-10.5896,307.48,0.481215</Node>
</Branch>

<Organ ID="10" PA="1" POS="353,1">
    <Matrix>0,-4.08864,-5.23322,0</Matrix>
    <Matrix>0,5.23322,-4.08864,0</Matrix>
    <Matrix>6.64105,0,0,924.37</Matrix>
</Organ>
```

Vector is used to store the data of apple tree model by using the C++ programming language. The node vector corresponds to a node which contains the node coordinates and diameter of the branch which the node is on. The branch vector takes a single node vector as a basic item, and the whole apple tree vector takes a single branch vector as a basic item. The branch position vector consists of POS of each branch, and so as branch age vector.

### 3.3 Interactive pruning simulation

Interactive pruning includes deterministic point pruning and combined conditional pruning. Deterministic point pruning means pruning the branch from the mouse clicked point. The following steps are needed: (1) Coordinates transformation. It refers to transform the pruning point coordinates given by mouse click to the coordinates in apple tree model space. In OpenGL. First, transform 2d coordinates on screen to 3d view-part coordinates. Then, transform view-part coordinates to the model coordinates. (2) Considering that the coordinates processed in (1) is on the surface of the branch and may not be contained in the file of node information, a method based on distance is applied to establish a mapping between clicked-point and points in the apple tree model. The method tries to find the closest node to the pruning point and then get the POS character of the branch with pruning point. (3)The last step is to find all the related branches based on the POS character of matching point, and deletes point data and organ data of corresponding branch.

There are many pruning treatments in orchard management, not only including shape pruning and conditional pruning determined by branch or organ types, angles or PA, but also including different level pruning based on branch length, branch ratio and so on. Combined pruning refers to interactive pruning of apple tree in the way that combines mouse clicking with pruning parameters input.

For example, make the apple tree spindle shape and cut off 1/3 of the branches whose physiology age is 2, the steps of interactive pruning are as follows: (1) Click the key point on the screen to define spindle shape.(2) Expand 2d spindle shape to 3d spindle body.(3) Pruning judgment. First, delete the related nodes which are not in the scope of 3d spindle body. Second, find all the branches whose physiology age is 2 and then find the nearest nodes of the point at a third of the branch; finally delete the related information based on the found node coordinates. (4) Redraw the apple tree model based on the updated data information.
# 4 Result

## 4.1 Running time of interactive pruning simulation

Interactive pruning simulation on apple tree is running on an ordinary computer (INTEL CORE i5-2410M 2.3GHz / 4GB / visual studio 2010 / OpenGL 2.1 / QT 5.1).359 branches with 4411 sample nodes are included in node files. The program running time in different pruning modes are listed in the following table.

<table><caption>Table 1. Running time of different pruning modes</caption><thead><tr><th></th><th>Options</th><th>time/ms</th></tr></thead><tbody><tr><td rowspan="2">Defined point pruning</td><td>① Select a branch of PA = 2 and cut it off near the midpoint</td><td>1</td></tr><tr><td>② Select a branch of PA = 3 and cut it off near the midpoint</td><td>2</td></tr><tr><td rowspan="7">Pruning with conditions</td><td>③ Prune to make the tree look like sphere shape</td><td>1</td></tr><tr><td>④ Cut off all the branches of PA = 3</td><td>3</td></tr><tr><td>⑤ Cut off all the branches whose length &lt; 0.1m</td><td>1</td></tr><tr><td>⑥ Cut off 1/3 of the branches of PA = 2</td><td>2</td></tr><tr><td>⑦ ④+⑤</td><td>3</td></tr><tr><td>⑧ ④+⑥</td><td>3</td></tr><tr><td>⑨ ④+⑤+⑥</td><td>3</td></tr></tbody></table>

The results show that the pruning system makes it easy for users to select the branches need to be cut by mouse clicking or keyboard input with a single condition or several conditions combined. The simulation time with the average response time is ms level, which is independent of the complexity of pruning. The simulation of natural pruning could be achieved on ordinary PC hardware. The efficiency of the simulation could be probably improved if the GPU technology is applied.

## 4.2 3D results of interactive pruning simulation

<figure><img src="image_4.png" /><figcaption>Fig 3. Renderings of two pruning cases with interactive interface.</figcaption></figure>
The system comes into the view mode in default after the data of the tree model loaded. In this mode, mouse and keyboard are used to move, scale or rotate the visual tree model, then the exact position of pruning is easily to locate. The branches and organs are selected to be cut off by different ways in pruning mode after mode switching. Pruning is done before growth resumed in the spring when the leaves have not come out yet. Figure 3b, 3c clearly show the rendering of two different pruning cases. The pruning effect can be clearly observed.

## 4.3 Stochastic 3D apple tree architectures after being pruned.

<figure><img src="image_5.png" /><figcaption>Fig 4. Stochastic architecture of pruned tree</figcaption></figure>

Branching patterns of apple tree branches after all branches (PA=1) being pruned were simulated on the foundation of experimental data fitting. Lateral buds in the following years will develop to short shoot, medium shoot, long shoot or stay the original status, stochastically. The reason of different development for same pruned treatment is complex. Internal and external factors such as environment, morphology, and assimilate competition all can result to different branch. Different 3D architecture of virtual apple tree can reflect different branching patterns.

# 5 Discussion

Apple tree geometric model is established by the method that dividing the model into different structural units and levels, which reduces the complexity of the apple tree three-dimensional modeling. The topological relationship between the branches is well documented by reasonable way of data organization so that it is easily to realize the pruning operation that all the child branches also are cut off when the mother branch is cut off, which simplify pruning realization and improve simulation efficiency.

Both shape pruning and combined conditional pruning are considered in the view of actual planting. Two interactive ways of pruning, i.e. by mouse or keyboard and by parameters input, are provided for the convenient user operation. Stochastic architecture after pruned also is simulated according to experiment data. If we can get more nodes information on pruned branch from base to top, discrete-time and discrete-state-space stochastic processes can be used to illustrate the branching architecture for any pruning measure. Now stochastic branch is limited to batch pruning for same physiology age branch.

The method of interactive pruning on visual apple tree in this paper can provide a reference for pruning simulation of other species. It also can be used in entertainment, education or tree research. Meanwhile, this work provides an intuitive, flexible auxiliary tool for the further research on the tree
pruning effect combined with the function model of the apple tree. The stochastic architecture showed
in Fig 3 cannot be well explained, if tree structure model is considered independently. Pruning causes
apple tree architecture changed. New organs will create, which change apple tree production (source)
and demand (sink) ability. New local and global source-sink ratio is closely related to pruning bud fate.
Function-structural plant models (FSPM) have more advantages to explain it [18-21]. With more field
experiment and model developed, different virtual pruning treatment can be done to minimize the
vegetative branch. Optimal pruning strategy can be got by analyzing source-sink ratio of reproductive
branch. Optimization of simulation algorithm, the extensibility of the program simulation and
verification of the simulation can be further studied.

## Acknowledgements

This study was supported by the National Natural Science Foundation of China (#31200543).

## References

1. Lauri PE, Trottier C. Patterns of size and fate relationships of contiguous organs in the apple(Malus domestica) crown. New Phytologist 163:533-546,2004

2. Lauri PE.2002. From tree architecture to tree traning-an overview of recent concepts developed in apple in France. Journal of the Korean Society for Horticultural Science 43:782-788

3. Lauri PE, Terouanne E,Lespinasse JM.Relationship between the early development of apple fruiting branches and the regularity of bearing-an approach to the strategies of various cultivars. Journal of Horticultural Science 72:519-530.1997a

4. Lauri PE, Terouanne E,Lespinasse JM.Vegetative growth and reproductive strategies in apple fruiting branches-an investigation into various cultivars. Acta horticulture 451:717-724.1997b

5. Jean Stephan, Pierre-eric Lauri, Nicolas Dones,et al. Architecture of the Pruned Tree: Impact of Contrasted Pruning Procedures Over 2 Years on Shoot Demography and Spatial Distribution of Leaf Area in Apple(Malus domestica)

6. Susie Hester and Oscar Cacho. A Biological Model of Apple Tree Production, 1091-1096

7. Colin Smith, Christophe Godin,Yann Guedon et al. Simulation of Apple Tree Development Using Mixed Statistical and Biomechanical Models[J]:31-34

8. E Costes, H.Sinoquet, J.J.Kelner and C.Godin. Exploring Within-tree Architectural Development of Two Apple Tree Cultivars Over 6 Years.[J]. Annals of botany 91:91-104.2003.

9. E. Costes, P.-E.Lauri, and J.-L.Regnard. Tree Architecture and Production. Horticultural Review, 32:1-60,2006

10. Costes E, Guedon Y. Modelling branching patterns on 1-year-old trunks of six apple cultivars. Annal of Botany 89:513-524.2002

11. Seleznyova A, White M, Tustin S, Costes E. Application of Markovian models to study root/interstock effects on flowering of young apple tree. In:Godin et al., eds. Proceeding of the 4th International Workshop on Functional-Structural Plant Models.7-11 June 2004. Montpellier. France. 311-314.

12. Xia,N.,Hu,B.G.:Evaluation of Importance of Pruning on Branching Structures in Nectarine Tree Using the Model of Hidden Semi-Markov Chain. In: The 3rd International Symposium on Intelligent Information technology in Agriculture (2005)
13. Atkins, T.A., O'Hagan, T.A., Rogers et al. Virtual Reality in Horticulture Education, Pruning Simulated fruit Trees in a Virtual Environment. Acta Horti.416,243-246,1996

14. Daniel Barthelemy and Yves Caraglio. Plant architecture: a dynamic, multilevel and comprehensive approach to plant form, structure and ontogeny. Annals of Botany. 99:375-407,2007

15. Zhao Xing, de REDDYE Philippe, Xiong Fan-Lun et al. Dual-Scale Automation Model for virtual Plant Development. Chinese J.Computers[J].24(6): 608-1807,2001

16. Guo Hong, Lei Xiangdong, Diao Jun. A Review of Functional-Structural Tree Model. World Forestry Research.2(23):55-60, 2010

17. Pascal Ferraro, toward a quantification of set-similarity in plants [J]. Fractals,2005,13(2):91-109

18. Yubin Lin, Mengzhen Kang, Jing Hua. Fitting a Functional Structural Plant Model based on Global Sensitivity Analysis. 2012 IEEE International Conference in Automation Sciences and Engineering (CASE), Seoul, Korea, August 20-24, 2012

19 Haoyu Wang, Mengzhen Kang, Jing Hua. Simulating Plant Plasticity under Light Environment: a Source-Sink Approach. IEEE the Fourth International Symposium on Plant Growth Modeling, Simulation, Visualization and Applications. 31 Oct.-04 Nov., 2012. Shanghai, China. 431-438

20. P. de Reffye, M.-Z. Kang, J. Hua and D. Auclair. "Stochastic modelling of tree annual shoot dynamics.".Annals of Forest Science, 69:153-165. 2012

21. Vos J, Evers JB, Buch-Sorlin GH et al. Functional-structural plant modeling: a new versatile tool in crop science. J Exp Bot 61:2101-2115, 2010