amvee: Fast Approximate Minimum Volume Enclosing Ellipsoid

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

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

Usage

1
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

1
2
3
4
5
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 April 19, 2021, 3:02 p.m.