Learn R Programming

YplantQMC (version 0.6-3)

plot.projectedplant3d: Project plant coordinates onto a viewing plane

Description

Transform all leaf edge coordinates onto a viewplane coordinate system, with the 'z' axis pointing toward the viewer.

Usage

## S3 method for class 'projectedplant3d':
plot(x, silhouette = FALSE, xlim = NULL,
  ylim = NULL, leaffill = TRUE, leafcol = "forestgreen",
  zerocenter = FALSE, xlab = "X", ylab = "Y", ...)

## S3 method for class 'projectedplant3d':
print(x, ...)

projectplant(plant, azimuth, altitude)

Arguments

x
Object of class 'projectedplant3d'.
silhouette
Add a 2D convex hull (see Silhouette).
xlim,ylim
Limits for the X and Y axes.
leaffill
If TRUE, fills leaves with green stuff.
leafcol
If leaffill=TRUE, the color of the leaves.
zerocenter
Whether to shift the plant to X=0 and Y=0.
xlab,ylab
Labels for X and Y axes
plant
Object of class 'plant3d' (see constructplant.
azimuth,altitude
Azimuth and altitude from which plant is viewed.
...
Further parameters passed to plot() (but ignored for print).

Value

  • Returns an object of class 'projectedplant3d', with components: leaves - A list of matrices with the coordinates of the leaf edges. Each matrix has columns VX,VY and VZ, which are the viewplane coordinates (with the Z axis pointing toward the viewer). viewbound - List of min and max values of coordinates (minx, maxx, miny, etc.). viewangle - Azimuth and altitude used for projection.

See Also

STARbar

Examples

Run this code
# View a plant from above.
# The 2D convex hull is also plotted (the 'silhouette'),
# and the area of the hull is printed on the graph.
topview <- projectplant(pilularis, altitude=90, azimuth=180)
plot(topview, leaffil=TRUE, silhouette=TRUE)

Run the code above in your browser using DataLab