Drawing the Preston Curve Produced by the the Explicit Preston Equation
Drawing the Preston Curve Produced by the the Explicit Preston Equation
curveEPE is used to draw the Preston curve that is produced by the explicit Preston equation.
UTF-8
curveEPE(P, np =5000, simpver =NULL, fig.opt =FALSE, deform.fun =NULL, Par =NULL, xlim =NULL, ylim =NULL, unit =NULL, main="")
Arguments
P: the three location parameters and the parameters of the explicit Preston equation or one of its simplified versions.
np: the number of data points on the Preston curve.
simpver: an optional argument to use the simplfied version of the explicit Preston equation.
fig.opt: an optional argument to draw the Preston curve.
deform.fun: the deformation function used to describe the deviation from a theoretical Preston curve.
Par: the parameter(s) of the deformation function.
xlim: the range of the x-axis over which to plot the Preston curve.
ylim: the range of the y-axis over which to plot the Preston curve.
unit: the units of the x-axis and the y-axis when showing the Preston 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 origin, and the third is the angle between the major axis of the curve and the x-axis. Here, the major axis is a straight line through the two ends of an egg's profile (i.e., the mid-line of the egg's profile). The other arguments in P
(except these first three location parameters), and simpver should correspond to those of P in EPE. 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.
Returns
x: the x coordinates of the Preston curve.
y: the y coordinates of the Preston curve.
Note
When the rotation angle is zero (i.e., the third element in P is zero), np data points are distributed counterclockwise on the Preston curve from the rightmost end of the egg's profile to itself.
Preston, F.W. (1953) The shapes of birds' eggs. The Auk 70, 160−182.
Shi, P., Chen, L., Quinn, B.K., Yu, K., Miao, Q., Guo, X., Lian, M., Gielis, J., Niklas, K.J. (2023) A simple way to calculate the volume and surface area of avian eggs. Annals of the New York Academy of Sciences 1524, 118−131. tools:::Rd_expr_doi("10.1111/nyas.15000")
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. tools:::Rd_expr_doi("10.1111/nyas.14862")
Shi, P., Wang, L., Quinn, B.K., Gielis, J. (2023) A new program to estimate the parameters of Preston's equation, a general formula for describing the egg shape of birds. Symmetry