Learn R Programming

conics (version 0.3)

conicAxes: Axes of a conic

Description

Find the symmetry axes of a conic.

Usage

conicAxes(x)

Arguments

x
a 6-length vector or a symmetric 3x3 matrix

Value

A 2x2 matrix whose columns are the direction vectors of the axes. In order to find the coordinates of the center, see the function conicCenter.

Details

The conicAxes function calculates the coordinates of the symmetry axes of a conic specified by its coefficients or by its symmetric matrix.

The direction vectors of the axes are the eigenvectors of the top-left 2x2 submatrix of the matrix representing the conic.

See Also

conicAsymptotes, conicCenter, conicMatrix, conicPlot

Examples

Run this code
# Ellipse
# Equation: 2*x_1^2 + 2*x_1*x_2 + 2*x_2^2 - 20*x_1 - 28*x_2 + 10 = 0
v <- c(2,2,2,-20,-28,10)
conicAxes(v)

# Hyperbola
# Equation: 2*x_1^2 + 2*x_1*x_2 - 2*x_2^2 - 20*x_1 + 20*x_2 + 10 = 0
v <- c(2,2,-2,-20,20,10)
conicAxes(v)

Run the code above in your browser using DataLab