Keywords

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 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 Fig. 1.

Fig. 1.
figure 1

Workflow of pruning simulation

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–15 cm), short shoot (<5 cm) and long shoot (>15 cm) 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 (Fig. 2).

Fig. 2.
figure 2

Dual-scale automata model of a 5 years old apple tree

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.

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-2410 M 2.3 GHz/4 GB/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 1.

Table 1. Running time of different pruning modes

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

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, c clearly show the rendering of two different pruning cases. The pruning effect can be clearly observed.

Fig. 3.
figure 3

Renderings of two pruning cases with interactive interface.

4.3 Stochastic 3D Apple Tree Architectures After Being Pruned

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 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. 4 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.

Fig. 4.
figure 4

Stochastic architecture of pruned tree