View source: R/utils_efourier.R
efourier_inv | R Documentation |
Performs an inverse elliptical Fourier transformation to construct a shape,
given a list with Fourier coefficients computed with efourier()
.
efourier_inv(x, nharm = NULL, a0 = NULL, c0 = NULL, npoints = 500)
x |
An object of class |
nharm |
An integer indicating the number of harmonics to use. If not
specified the number of harmonics used in |
a0, c0 |
the estimates of the coordinates of the centroid of the
configuration. If |
npoints |
The number of interpolated points on the constructed outline. Defaults to 500. |
Adapted from Claude (2008). pp. 223.
Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.
library(pliman)
plot_polygon(contours, aspect_ratio = 1)
# without alignment
ef <- efourier(contours, nharm = 10, align = FALSE)
ief <- efourier_inv(ef)
plot_contour(ief, col = "red", lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.