randomplant: Generate a plant with randomly distributed leaves

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Generates a plant crown with specified total leaf area or number of leaves, in one of six crown shapes. These include cone, paraboloid, cylinder, and others. Leaves are randomly distributed in the crown shapes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
randomplant(nleaves = 500, 
radius = 250, 
height = 500, 
shape = c("BOX", "CONE", "HELIP", "PARA", "ELIP", "CYL"), 
crownbase = 0, 
LAD = angledist("ellipsoid", 1), 
leaflen = 30, 
LA = NULL,  
lfile = NULL, 
writefile = FALSE, 
quiet = FALSE)

Arguments

nleaves

Number of leaves, can be left unspecified if leaf area (LA) is given.

radius

Crown radius (mm).

height

Crown height (mm).

shape

One of six pre-specified crown shapes. See Details.

crownbase

Height to crownbase (mm).

LAD

Leaf angle distribution.

leaflen

The leaf length (constant value for all leaves).

LA

Total leaf area, optional (m2)

lfile

Name of the leaf file (see readl), if left unspecified a triangle is used.

writefile

Logical. If TRUE, writes a Q file to disk.

quiet

Logical. If FALSE, no messages are printed to the console.

Details

Six crown shapes are implemented, use one of the following abbreviations for the argument crownshape:

BOX

A box shape; radius in X and Y directions assumed to be the same.

CONE

A cone shape.

HELIP

A half ellipsoid (the top half of a full ellipsoid).

PARA

A paraboloid.

ELIP

A full ellipsoid.

CYL

Cylinder shape.

The leaf angle distribution (LAD) must be specified using the angledist function in the LeafAngle package. To assign a constant leaf angle of 45 degrees, use this command:

1
LAD = angledist("const", 45)

To assign a spherical LAD, use this command:

1
LAD = angledist("spherical")

Value

Produces a plant in the Q file format, see constructplant for details. If writefile=TRUE, the Q file is written to the current working directory. Otherwise, returns a dataframe that can be used directly in constructplant, see Details.

Note

Currently only random distributions are supported. I have at this time no idea how to produce clumped or uniform distributions in 3D (if you do, let me know).

Author(s)

Remko Duursma. Uses code from Belinda Medlyn (SURFACE subroutine in MAESTRA).

See Also

constructplant

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# An ellipsoid shape crown, write a Q file to disk.
# Specify approximate total leaf area.
randomplant(radius=400, height=2000, shape="ELIP",
leaflen=40, LA=1.5, writefile=TRUE)

# Embed the function in a call to 'constructplant', giving a plant in the 
# YplantQMC format.
# Because no leaf file is specified, it uses a built-in triangle-shaped leaf.
 coneplant <- constructplant(randomplant(radius=250, height=500, shape="CONE",
 leaflen=25, LA=1))


## End(Not run)

YplantQMC documentation built on May 2, 2019, 5:50 p.m.