plant3D: Plant the trees of an already created patch/stand

Description Usage Arguments Value Examples

Description

Plant the trees of an already created patch/stand

Usage

1
plant3D(stand = NULL, patch.id = NULL, crown.opacity = 1)

Arguments

stand

the stand for plantation

patch.id

one or several specific patches only

crown.opacity

alpha value for the green tree crowns. Setting it to something different than 1 slows down the rendering substatially!

Value

the updated stand

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
stand = initStand(npatch=2)
stand3D(stand, 1)
veg = data.frame(DBH=rep(0.4, 50))
veg$Height    = veg$DBH * 35
veg$Crownarea = veg$DBH * 5
veg$LeafType  = sample(1:2, nrow(veg), replace=TRUE)
veg$ShadeType = sample(1:2, nrow(veg), replace=TRUE)
stand@patches[[1]]@vegetation = establishTrees(veg, stand@hexagon@supp[['inner.radius']])
dummy = plant3D(stand, 1)

stand3D(stand, 2)
veg = data.frame(DBH=rep(0.5, 100) * rgamma(100, 2.5, 9))
veg$Height    = veg$DBH * 35  * rbeta(nrow(veg),10,1)
veg$Crownarea = veg$DBH * 5 * rnorm(nrow(veg), 1, 0.1)
veg$LeafType  = sample(1:2, nrow(veg), replace=TRUE)
veg$ShadeType = sample(1:2, nrow(veg), replace=TRUE)
stand@patches[[2]]@vegetation = establishTrees(veg, stand@hexagon@supp[['inner.radius']])
dummy = plant3D(stand, 2)

## End(Not run)

DGVM3D documentation built on May 2, 2019, 3:47 p.m.