curveGE {biogeom}R Documentation

Drawing the Gielis Curve

Description

curveGE is used to draw the Gielis curve.

Usage

curveGE(expr, P, phi = seq(0, 2*pi, len = 2000),
        m = 1, simpver = NULL, nval = 1,
        fig.opt = FALSE, deform.fun = NULL, Par = NULL,
        xlim = NULL, ylim = NULL, unit = NULL, main="")

Arguments

expr

the original (or twin) Gielis equation or one of its simplified versions.

P

the three location parameters and the parameters of the original (or twin) Gielis equation or one of its simplified versions.

phi

the given polar angles at which we want to draw the Gielis curve.

m

the given m value that determines the number of angles of the Gielis curve within [0, 2\pi).

simpver

an optional argument to use the simplfied version of the original (or twin) Gielis equation.

nval

the specified value for n_{1} or n_{2} or n_{3} in the simplified versions.

fig.opt

an optional argument to draw the Gielis curve.

deform.fun

the deformation function used to describe the deviation from a theoretical Gielis curve.

Par

the parameter(s) of the deformation function.

xlim

the range of the x-axis over which to plot the Gielis curve.

ylim

the range of the y-axis over which to plot the Gielis curve.

unit

the units of the x-axis and the y-axis when showing the Gielis curve.

main

the main title of the figure.

Details

The first three elements of P are location parameters. The first two are the planar coordinates of the transferred polar point, and the third is the angle between the major axis of the curve and the x-axis. The other arguments in P (except these first three location parameters), m, simpver, and nval should correspond to expr (i.e., GE or TGE). Please note the differences in the simplified version number and the number of parameters between GE and TGE. deform.fun should take the form as: deform.fun <- function(Par, z){...}, where z is a two-dimensional matrix related to the x and y values. And the return value of deform.fun should be a list with two variables x and y.

Value

x

the x coordinates of the Gielis curve corresponding to the given polar angles phi.

y

the y coordinates of the Gielis curve corresponding to the given polar angles phi.

r

the polar radii of the Gielis curve corresponding to the given polar angles phi.

Note

simpver in GE is different from that in TGE.

Author(s)

Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.

References

Gielis, J. (2003) A generic geometric transformation that unifies a wide range of natural and abstract shapes. American Journal of Botany 90, 333-338. doi:10.3732/ajb.90.3.333

Li, Y., Quinn, B.K., Gielis, J., Li, Y., Shi, P. (2022) Evidence that supertriangles exist in nature from the vertical projections of Koelreuteria paniculata fruit. Symmetry 14, 23. doi:10.3390/sym14010023

Shi, P., Gielis, J., Niklas, K.J. (2022) Comparison of a universal (but complex) model for avian egg shape with a simpler model. Annals of the New York Academy of Sciences 1514, 34-42. doi:10.1111/nyas.14799

Shi, P., Gielis, J., Quinn, B.K., Niklas, K.J., Ratkowsky, D.A., Schrader, J., Ruan, H., Wang, L., Niinemets, Ü. (2022) 'biogeom': An R package for simulating and fitting natural shapes. Annals of the New York Academy of Sciences 1516, 123-134. doi:10.1111/nyas.14862

Shi, P., Ratkowsky, D.A., Gielis, J. (2020) The generalized Gielis geometric equation and its application. Symmetry 12, 645. doi:10.3390/sym12040645

Shi, P., Xu, Q., Sandhu, H.S., Gielis, J., Ding, Y., Li, H., Dong, X. (2015) Comparison of dwarf bamboos (Indocalamus sp.) leaf parameters to determine relationship between spatial density of plants and total leaf area per plant. Ecology and Evolution 5, 4578-4589. doi:10.1002/ece3.1728

See Also

areaGE, fitGE, GE, TGE

Examples

GE.par  <- c(2, 1, 4, 6, 3)
phi.vec <- seq(0, 2*pi, len=2000)
r.theor <- GE(P=GE.par, phi=phi.vec, m=5)

dev.new()
plot( phi.vec, r.theor, cex.lab=1.5, cex.axis=1.5, 
      xlab=expression(italic(phi)), ylab=expression(italic("r")),
      type="l", col=4 ) 

curve.par <- c(1, 1, pi/4, GE.par)
GE.res    <- curveGE(GE, P=curve.par, fig.opt=TRUE, deform.fun=NULL, Par=NULL, m=5)
# GE.res$r

GE.res    <- curveGE( GE, P=c(0, 0, 0, 2, 4, 20), m=1, simpver=1, fig.opt=TRUE )
# GE.res$r

GE.res    <- curveGE( GE, P=c(1, 1, pi/4, 2, 1, 3), m=5, simpver=1, fig.opt=TRUE )
# GE.res$r

GE.res    <- curveGE( GE, P=c(1, 1, pi/4, 2, 1, 3), m=2, simpver=1, fig.opt=TRUE )
# GE.res$r

GE.res    <- curveGE( GE, P=c(1, 1, pi/4, 2, 0.05), m=1, simpver=2, fig.opt=TRUE )
# GE.res$r

GE.res    <- curveGE( GE, P=c(1, 1, pi/4, 2), m=4, simpver=3, nval=2, fig.opt=TRUE )
# GE.res$r

GE.res    <- curveGE( GE, P=c(1, 1, pi/4, 2, 0.6), m=4, simpver=8, nval=2, fig.opt=TRUE )
# GE.res$r

graphics.off()

[Package biogeom version 1.4.2 Index]