Learn R Programming

Momocs (version 0.2-6)

ellipse.par: Calculate ellipse parameters on a Coe-class object.

Description

It uses ellpar function to calculate ellipse parameters for all individuals and all harmonics contained in a Coe-class object.

Usage

ellipse.par(Coe, range = 1:nrow(Coe@coe), nb.pts = 120)

Arguments

Coe
The Coe object on which to calculate ellipses parameters.
range
Vector of integer that specifies the range of harmonics on which to calculate ellipse parameters. By default, all of them.
nb.pts
integer. How many points on the outline are used to estimate ellipse parameters (see Details section below).

Value

  • Four matrices are returned (with individual as rows and harmonic rank as columns).
  • aa matrix of all halves of the major axis.
  • ba matrix of all halves of the minor axis.
  • ea matrix of all eccentricities.
  • phia matrix of all ellipse angles.

Details

This method is not exact, see ellpar

References

See References in ellpar.

Examples

Run this code
data(bot)
botF <- eFourier(bot, nb.h=32)
ep <- ellipse.par(botF, 1:5, 64)
names(ep)
layout(matrix(1:4, ncol=2, byrow=TRUE))
boxplot(ep$a, log="y", main="1/2 Major axes")
boxplot(ep$b, log="y", main="1/2 minor axes")
boxplot(ep$e, , main="Eccentricities")
boxplot(ep$phi, main="Ellipse angles")

Run the code above in your browser using DataLab