Learn R Programming

biogeom (version 1.4.3)

DETE: Calculation of the First-Order Derivative of the Explicit Troscianko Equation

Description

DETE is used to calculate the first-order derivative of the explicit Troscianko equation at a given x-value.

Usage

DETE(P, x)

Arguments

P

the parameters of the explicit Troscianko equation.

x

the x-value used in the explicit Troscianko equation.

Author

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

Details

The first-order derivative of the explicit Troscianko equation at a given x-value is:

$$h(x) = \left\{\alpha_{1}+\frac{2\,\alpha_{2}}{a}\,x-\frac{x}{a}\,\left[1-\left(\frac{x}{a}\right)^2\right]^{-1}\right\}\,\exp\left\{\alpha_{0}+\alpha_{1}\left(\frac{x}{a}\right)+\alpha_{2}\left(\frac{x}{a}\right)^2\right\}\,\sqrt{ 1-\left(\frac{x}{a}\right)^2 }, $$

where P has four parameters: \(a\), \(\alpha_{0}\), \(\alpha_{1}\), and \(\alpha_{2}\).

References

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")

See Also

ETE, fitETE, SurfaceAreaETE

Examples

Run this code
  Par5 <- c(2.25, -0.38, -0.29, -0.16)
  xx2  <- seq(-2.25, 2.25, by=0.001)
  h1   <- DETE(P=Par5, x=xx2)
  h2   <- -DETE(P=Par5, x=xx2)
  ind  <- which(is.na(h1) | is.na(h2))
  xx2  <- xx2[-ind]
  h1   <- h1[-ind]
  h2  <- h2[-ind]

  dev.new()
  plot(xx2, h1, type="l", col=4, cex.lab=1.5, cex.axis=1.5,
       xlim=c(-2.25, 2.25), ylim=c(-30, 30), xlab=expression(italic(x)), 
       ylab=expression(paste(italic(h), "(", italic(x), ")", sep="")))
  lines(xx2, h2, col=2)  

  graphics.off()

Run the code above in your browser using DataLab