Conic¶
- class sonic.Conic¶
- Constructor Summary
- Conic(raw_conic, varargin)¶
Creates a conic object.
- Inputs:
raw_conic (1,6 double): Implicit representation of the conic. If inputs with 6 parameters, this is assumed to be the coefficients of the implicit equation [A;B;C;D;E;F] satisfying the equation Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.
OR
raw_conic (1,5 double): Explicit representation of the conic. If inputs with 5 parameters, this is assumed to be [xc; yc; a; b; psi] where xc and yc are the center, a and b are the semi major and minor axis, and psi is the conic rotation.
OR
raw_conic (3,3 double): Matrix containing either the locus or envelope representation of the conic. Must specify using varargin whether this is a locus or envelope as shown below.
varargin (string): “locus” for the locus representation and “envelope” for the envelope representation.
OR
raw_conic (1,1 sonic.Lines2): Lines2 object containing the degenerate conic representation of 2 lines. Must contain exactly two lines.
- Outputs:
obj (1,1 sonic.Conic): conic object containing properties of the input conic.
Last revised: 11/11/24 Last author: Michela Mancini
- Property Summary
- degenerateLocus¶
representation of degenerate conics as two lines
- envelope¶
inverse of Conic locus satisfying all lines tangent to the Conic
- explicit¶
values for the explicit representation of a conic [xc; yc; a; b; psi]
- implicit¶
normalized implicit coefficients [A;B;C;D;E;F] satisfying the equation Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0
- locus¶
Conic locus of the form [A, B/2, D/2; B/2, C, E/2; D/2, E/2, F] satisfies all points lying on the conic
- proper¶
degeneracy of conic
- stable¶
numerical stability, where a conic is considered not stable if a proper conic is recognized as such only after origin shift
- type¶
conic classification (ellipse, circle, parabola, etc…)
- Method Summary
- center(conic)¶
Takes a conic object and translates it by its center.
- Inputs:
conic (sonic.Conic object): the original conic
- Outputs:
translatedConic (sonic.Conic object): the conic
translated by its center - center (sonic.Points2 object): new origin of the coordinate system (center of the original conic)
Last revised: 11/14/2024 Last author: Michela Mancini
- static locusToParameter(locus)¶
Determine the semi-latus rectum for a proper conic
- Inputs:
locus (3x3 double): conic locus matrix
- Outputs:
p (1x1 double): semi-latus rectum
Last revised: 4/19/24 Last author: Michela Mancini
- static meetConicConic(locus1, locus2)¶
Performs the meet of two conics, the result of which are four points in P2.
- Inputs:
locus1 (a 3x3 double array): A non-degenerate conic locus
locus2 (a 3x3 double array): A non-degenerate conic locus
- Outputs:
pts (1x1 sonic.Points2): four points of intersection of the two conics
Last revised: 04/19/2024 Last author: Michela Mancini
- static meetLineConic(line, locus)¶
Performs the meet of a line and a conic, the result of which are two points in P2
- Inputs:
line (a sonic.Line2 object): A line in P2.
locus (a 3x3 double array): A conic locus
- Outputs:
pts (1x1 sonic.Points2): two points of intersection of line and conic
Last revised: 04/22/2024 Last author: Michela Mancini
- static parabolaToLocus(explicitParabola)¶
Determine the conic locus associated with a parabola with a specified vertex, tilt angle and semi-latus rectum
- Inputs:
explicitParabola (4x1 double): contains a parameterization of the parabola in terms of vertex coordinates (xc,yc), tilt angle (psi) and the semi-latus rectum (p). The expected ordering is the following: explicit_parabola = [xc; yc; psi; p].
- Outputs:
locus (3x3 double): conic locus
Last revised: 10/30/24 Last author: Michela Mancini
- rotate(conic, angle)¶
Takes a conic object and an angle and outputs the conic object rotated about the origin by that angle (counterclock rotation)
- Inputs:
conic (sonic.Conic object): the original conic
angle (double): the angle of counter clock rotation (rad)
- Outputs:
newConic (sonic.Conic object): the conic
translated by the translation vector
Last revised: 11/17/2024 Last author: Michela Mancini
- translate(conic, translation)¶
Takes a conic object and a translation vector and outputs the conic object shifted by the translation vector
- Inputs:
conic (sonic.Conic object): the original conic
translation (sonic.Points2 object): the translation
vector (origin of the new coordinate system)
- Outputs:
translatedConic (sonic.Conic object): the conic
translated by the translation vector
Last revised: 11/14/2024 Last author: Michela Mancini