MathLib.Conic()

MathLib.Conic is MathLib's implementation of conics. In Mathlib a conic is the set of solution of the following equation (x,y,z are projective coordinates). x y z a b d b c e d e f x y z = 0 or written out ax2+bxy+cy2+2dx+2ey+f2=0 You construct a conic by giving the constructor the parameters in form of a matrix: var conic = new MathLib.Conic([[a, b, d], [b, c, e], [d, e, f]]); If the conic is degenerated you should provide a second argument, containing the matrix of the dual conic.

Properties

.constructor
The function MathLib.Conic
.dual
The dual matrix.
.primal
The primal matrix.
.type
The string "conic"

Methods

.draw()
Draws the Conic.
.eccentricity()
Calculates the eccentricity of a conic.
.isDegenerated()
Checks if a conic is degenerated.
.isEqual()
Checks if a conic is equal to an other conic.
.latusRectum()
Calculates the latus rectum of a conic.
.linearEccentricity()
Calculates the linear eccentricity of a conic.
.meet()
Calculates the two meeting points of a conic and a line or the four meeting points with an other conic.
.normalize()
Calculates the normal form of a conic.
.splitDegenerated()
Splits a degenerated conic into two lines.

Static methods

.throughFivePoints()
Calculates a conic through five given points.