amvee: Fast Approximate Minimum Volume Enclosing Ellipsoid

View source: R/misc.R

amveeR Documentation

Fast Approximate Minimum Volume Enclosing Ellipsoid

Description

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

Usage

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(s)

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]))


swarm-lab/trackR documentation built on Nov. 20, 2022, 11:29 a.m.