Skip to contents

Performs an inverse elliptical Fourier transformation to construct a shape, given a list with Fourier coefficients computed with efourier().

Usage

efourier_inv(x, nharm = NULL, a0 = NULL, c0 = NULL, npoints = 500)

Arguments

x

An object of class efourier or efourier_lst computed with efourier().

nharm

An integer indicating the number of harmonics to use. If not specified the number of harmonics used in x is used.

a0, c0

the estimates of the coordinates of the centroid of the configuration. If NULL (default), the generated coordinates will be centered on the position of the original shape given by efourier().

npoints

The number of interpolated points on the constructed outline. Defaults to 500.

Details

Adapted from Claude (2008). pp. 223.

References

Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.

Examples

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)