Learn R Programming

Momocs (version 0.2-6)

rfourier.i: Calculates inverse radii variation analysis.

Description

rfourier.i uses the inverse radii variation transformation to calculate a shape, when given a list with Fourier coefficients, typically obtained computed with rfourier.

Usage

rfourier.i(rf, nb.h, nb.pts=300)

Arguments

rf
A list with ao, an and bn components, typically as returned by rfourier.
nb.h
integer. The number of harmonics to calculate/use.
nb.pts
integer. The number of points to calculate.

Value

  • A list with components:
  • xvector of x-coordinates.
  • yvector of y-coordinates.
  • anglevector of angles used.
  • rvector of radii calculated.

Details

See efourier for the mathematical background.

References

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

See Also

efourier for the reverse operation and also rfourier.shape. l2m, coeff.split may be useful.

Examples

Run this code
data(bot)
coo <- coo.center(bot@coo[[1]]) # centering is almost mandatory for rfourier family
coo.plot(coo)
rf  <- rfourier(coo, 12)
rf
rfi <- rfourier.i(rf)
l2m(rfi)
coo.draw(rfi, border="red", col=NA)
    # it works since coo.draw and coo.plot retrieve "x"
    # and "y" components (through l2m when passed with a list.

Run the code above in your browser using DataLab