conicMatrixToEllipse: Transformation of the matrix representation of an ellipse...

View source: R/conicMatrixToEllipse.R

conicMatrixToEllipseR Documentation

Transformation of the matrix representation of an ellipse into the ellipse parameters

Description

Ellipses can be represented by a (3 \times 3) matrix A, such that for each point x on the ellipse x^T A x = 0. The function conicMatrixToEllipse transforms the matrix A into the ellipse parameters: center location, semi-axes length and angle of rotation.

Usage

conicMatrixToEllipse(A)

Arguments

A

a (3 \times 3) matrix representation of an ellipse.

Value

loc

a (2 \times 1) vector of the Cartesian coordinates of the ellipse center.

saxes

a (2 \times 1) vector of the length of the ellipse semi-axes.

theta

the angle of rotation of the ellipse (in radians).

References

Wolfram, Mathworld (http://mathworld.wolfram.com/).

See Also

ellipseToConicMatrix

Examples

# ellipse parameter
saxes <- c(5,2)
loc <- c(0,0)
theta <- pi/4
# matrix representation of the ellipse
C <- ellipseToConicMatrix(saxes,loc,theta)
C
# back to the ellipse parameters
conicMatrixToEllipse(C)

RConics documentation built on March 18, 2022, 5:33 p.m.