Given a set of current x/y positions, this function computes an approximation of their minimum volume enclosing ellipsoid.

amvee(x)

Arguments

x

A matrix with two columns corresponding to the x and y positions for which to compute the ellipsoid.

Value

A vector with 5 elements: the x and y coordinated of the center of the ellipsoid, the width and height of the ellipsoid, and the angle of the ellipsoid relative to the y axis.

Author

Simon Garnier, garnier@njit.edu

Examples

x <- rnorm(25, 4)
y <- rnorm(25, 2)
ell <- amvee(cbind(x, y))
plot(x, y, asp = 1)
lines(ellipse(ell[1], ell[2], ell[3], ell[4], ell[5]))