rfourier_shape {Momocs} | R Documentation |
Calculates and draw 'rfourier' shapes.
Description
rfourier_shape
calculates a 'Fourier radii variation shape' given
Fourier coefficients (see Details
) or can generate some 'rfourier'
shapes.
Usage
rfourier_shape(an, bn, nb.h, nb.pts = 80, alpha = 2, plot = TRUE)
Arguments
an |
|
bn |
|
nb.h |
|
nb.pts |
|
alpha |
|
plot |
|
Details
rfourier_shape
can be used by specifying nb.h
and
alpha
. The coefficients are then sampled in an uniform distribution
(-\pi ; \pi)
and this amplitude is then divided by
harmonicrank^alpha
. If alpha
is lower than 1, consecutive
coefficients will thus increase. See rfourier for the mathematical
background.
Value
A matrix of (x; y) coordinates.
References
Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.
See Also
Other rfourier:
rfourier_i()
,
rfourier()
Examples
data(bot)
rf <- rfourier(bot[1], 24)
rfourier_shape(rf$an, rf$bn) # equivalent to rfourier_i(rf)
rfourier_shape() # not very interesting
rfourier_shape(nb.h=12) # better
rfourier_shape(nb.h=6, alpha=0.4, nb.pts=500)
# Butterflies of the vignette' cover
panel(Out(a2l(replicate(100,
rfourier_shape(nb.h=6, alpha=0.4, nb.pts=200, plot=FALSE)))))