Learn R Programming

RConics (version 1.1.2)

conicMatrixToEllipse: 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)

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

Arguments

A

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

References

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

See Also

ellipseToConicMatrix

Examples

Run this code
# 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)

Run the code above in your browser using DataLab