AtoG
Convert from full quadratic "ABCDEF" to focus, axis, angle "hvab theta" parameters.
GtoA
Convert from "hvab theta" to "ABCDEF" parameters.
parab3toA
Simple conversion from a + bx + cx^2 to "ABCDEF" parameters.
FEDtoA
Convert focus, eccentricity, and directrix to "ABCDEF" parameters.
AtoG(parA, tol = 1e-06)
GtoA(parG, conicType = c("e", "h"))
parab3toA(ADF, theta = 0)
FEDtoA(focus = c(0, 0), directrix = c(1, 0, 1), eccentricity = 0.5)
for AtoG
,
c(h,v,a,b,theta)
a value used in fitConic. 1,2, or 3 for ellipse, hyperbola, parabola
matching exitCode with a char "e", "h", or "p"
for GtoA
the ABCDEF coefficients of the general quadratic
a value used in fitConic. 1,2, or 3 for ellipse, hyperbola, parabola
matching exitCode with a char "e", "h", or "p"
for FEDtoA
, the ABCDEF coefficients of the general quadratic
for parab3toA
,
the ABCDEF coefficients of the general quadratic
always numeric 3, a value used in fitConic
always char "p"
.
The six coefficients in the quadratic Ax^2 + Bxy + Cy^2 +Dx + Ey +F = 0
A small value, used to check whether small coefficient values might be actually zero. See "Details."
a five-element vector "h,v,a,b,theta" . See "Details" for the standard equation form for this.
Because the 'hvab' equation has a sign difference for ellipses vs. hyperbolas, it is necessary to indicate which kind of input is intended. See "Details."
location of the conic sections focus.
the 3-element directrix.
the eccentricity of the conic section.
The A,D,F coeffients in the standard quadratic. Thus, the x^2 term, the x term, and the constant term.
An angle by which the entire parabola is to be rotated.
The tol
input for AtoG
checks two conditions. First, is B practically zero, in which case B is set to exactly zero, implying no rotation of the conic section. Second, is B^2 - 4*A*C almost zero, implying that the conic is probably a parabola, and conversion to 'hvab' form is not useful.
The "hvab" form for describing an ellipse or a hyperbola looks like [Center(1:2), Axes(1:2)/2] angle A, to fill the equation
((x-h)cosA +(y-v)sinA)^2/a^2 + ((x-h)sinA-(y-v)cosA)^2/b^2 = 1 The length of the axes are 2*a, 2*b .
A discussion of the focus/directrix/eccentricity form of a conic section is rather lengthy and not presented here. One short introduction can be found at https://en.wikipedia.org/wiki/Conic_section#Eccentricity,_focus_and_directrix