View source: R/conicMatrixToEllipse.R
conicMatrixToEllipse | R Documentation |
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.
conicMatrixToEllipse(A)
A |
a (3 \times 3) matrix representation of an ellipse. |
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). |
Wolfram, Mathworld (http://mathworld.wolfram.com/).
ellipseToConicMatrix
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.