TGE | R Documentation |
TGE
is used to calculate the polar radii of the twin Gielis equation or
one of its simplified versions at given polar angles.
TGE(P, phi, m = 1, simpver = NULL, nval = 1)
P |
the parameters of the twin Gielis equation or one of its simplified versions. |
phi |
the polar angle(s). |
m |
the given |
simpver |
an optional argument to use the simplified version of the twin Gielis equation. |
nval |
the specified value for |
The general form of the twin Gielis equation can be represented as follows:
r\left(\varphi\right) = \mathrm{exp}\left\{\frac{1}{\alpha+\beta\,\mathrm{ln}\left[r_{e}\left(\varphi\right)\right]}+\gamma\right\},
where r
represents the polar radius of the twin Gielis curve at the polar angle \varphi
, and
r_{e}
represents the elementary polar radius at the polar angle \varphi
. There is a hyperbolic
link function to link their log-transformations, i.e.,
\mathrm{ln}\left[r\left(\varphi\right)\right] = \frac{1}{\alpha+\beta\,\mathrm{ln}\left[r_{e}\left(\varphi\right)\right]}+\gamma.
The first three elements of P
are \alpha
, \beta
, and \gamma
, and the remaining element(s) of
P
are the parameters of the elementary polar function, i.e., r_{e}\left(\varphi\right)
.
See Shi et al. (2020) for details.
\quad
When simpver = NULL
, the original twin Gielis equation is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\frac{1}{k}\,\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{3}},
where r_{e}
represents the elementary polar radius at the polar angle \varphi
;
m
determines the number of angles of the twin Gielis curve within [0, 2\pi)
;
and k
, n_{2}
, and n_{3}
are the fourth to the sixth elements in P
. In total, there are
six elements in P
.
\quad
When simpver = 1
, the simplified version 1 is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}},
where n_{2}
is the fourth element in P
. There are
four elements in total in P
.
\quad
When simpver = 2
, the simplified version 2 is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}},
where n_{2}
should be specified in nval
, and P
only includes three elements, i.e.,
\alpha
, \beta
, and \gamma
.
\quad
When simpver = 3
, the simplified version 3 is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{3}},
where n_{2}
and n_{3}
are the fourth and fifth elements in P
. There are
five elements in total in P
.
\quad
When simpver = 4
, the simplified version 4 is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\frac{1}{k}\,\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}},
where k
and n_{2}
are the fourth and fifth elelments in P
. There are
five elements in total in P
.
\quad
When simpver = 5
, the simplified version 5 is selected:
r_{e}\left(\varphi\right) = \left|\mathrm{cos}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}}+
\left|\frac{1}{k}\,\mathrm{sin}\left(\frac{m}{4}\varphi\right)\right|^{n_{2}},
where k
is the fourth elelment in P
. There are
four elements in total in P
. n_{2}
should be specified in nval
.
The polar radii predicted by the twin Gielis equation or one of its simplified versions.
simpver
here is different from that in the GE
function.
Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/sym14010023")}
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/nyas.14862")}
Shi, P., Ratkowsky, D.A., Gielis, J. (2020) The generalized Gielis geometric equation and its application. Symmetry 12, 645. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/sym12040645")}
areaGE
, curveGE
, fitGE
, GE
TGE.par <- c(2.88, 0.65, 1.16, 139)
varphi.vec <- seq(0, 2*pi, len=2000)
r2.theor <- TGE(P=TGE.par, phi=varphi.vec, simpver=1, m=5)
dev.new()
plot( varphi.vec, r2.theor, cex.lab=1.5, cex.axis=1.5,
xlab=expression(italic(varphi)), ylab=expression(italic("r")),
type="l", col=4 )
starfish4 <- curveGE(TGE, P=c(0, 0, 0, TGE.par), simpver=1, m=5, fig.opt=TRUE)
graphics.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.