# Using Stochastic Ray Tracing to Simulate a Dense Time Series of Gross Primary Productivity
## 2 Methods
### Scene Reconstruction  
A 3D virtual forest scene was reconstructed from the ground-based laser scanning data using a modeling approach described by [33]. Briefly, single scans are projected onto a panoramic plane where individual pixels show range (m) to target. Individual tree stems are detected from the panoramic projection using image segmentation and filtering criteria. Image segmentation is used to detect surface edges and continuous surfaces that show sharp and gradual changes in range, respectively. Continuous surfaces relate to ground, foliage and stem objects and hence filtering criteria, including auto-correlation along surface edges and segment lengths are used to separate stem segments from other targets in the scans. Three-dimensional stem objects were created using the range information and diameter estimates derived from the laser scanning data. All scans and stem objects were merged to a common coordinate system that was clipped to the plot boundaries (_i.e._, 30 m \(\times\) 30 m). Overlapping stem objects were merged into a single object that was assigned the average stem attributes obtained from the individual scans. From the co-registered point cloud, a canopy height model (CHM), a digital elevation model (DEM), and a delineation of individual crowns [45] were obtained. Gaps due to data occlusion along the stem segments were filled using linear interpolation and the stem tips were extrapolated by tracing the local point cloud geometry [46]. Using the stem information, individual tree growing spaces were derived based on 2D Voronoi tesselation for horizontal slices across a regular vertical interval. A template tree crown was constructed using Arbaro [23] (Figure 1): computer animation software for the realistic modelling of crown architecture based on simple geometric parameters such as branch lengths and insertion angles of child-branches in relation to their parent branches. Scaled copies of the crown template were then fitted to the virtual scenes. In contrast to skeletal tree structures produced by Arbaro that contain a high level of structural detail (Figure 2a), the template tree used in this study had a much coarser resolution to reduce computation time. Recent studies have explored efficient means to abstract shoots and whorls using a series of projection planes (e.g., [25, 26]). The template tree used in this study was constructed using a layered series of planar polygons producing a much reduced scene complexity (Figure 2b). This abstraction was chosen to demonstrate the proposed concept, acknowledging that a comprehensive treatment of needle-level details at plot scale requires dedicated computing facilities and more advanced acceleration techniques. The chosen level of abstraction foremost affects transmissions from oblique incidence angles, as well as within-shoot distributions of \(E_{al}\) and re-collision and escape probabilities (e.g., [26]). Effects on the latter are considered small, however, in the PAR band. For each first-order branch, a planar polygon was fit to its principle stem and all of its sub-stems. This fit was computed as a two-dimensional triangulation of vertices (_i.e._, height-coordinates were not used in triangulating). The structural fidelity was chosen to resemble the clumping of foliage into crowns, but did not include clumping of needles into shoots or clumping of shoots around whorls [47, 48]. To provide for the simulation of un-collided transmission within whorls, gap fractions (\(GF_{\perp}\)) were assigned to the facets of the planar polygons. Whorl-level gap fraction was estimated as the fraction of visible sky (15%) in digital photographs taken underneath isolated Douglas-fir branches [33]. To assess model sensitivity to \(GF_{\perp}\), three scenarios were considered throughout the remaining analysis, for gap fractions of 10%, 15%, and 20%, respectively. Un-collided transmission \(\tau_{u}\) amounts to the gap fraction when the incidence angle is perpendicular and drops with the cosine of the incidence angle.