3

I am writing a piece of software involving conic sections. I need to write a method that returns a different number (0, 1, 2...) for each type of conic section.

I have determined the following conic sections:

  • 0 - Circle
  • 1 - Ellipse
  • 2 - Parabola
  • 3 - Hyperbola
  • 4 - Rectangular Hyperbola

and these degenerate conics:

  • 5 - Line
  • 6 - Point
  • 7 - Intersecting Lines
  • 8 - Parallel Lines
  • 9 - No Graph

My Question: How to determine which of these ten types a given conic section is using only the values of A, B, C, D, E, and F in the equation below:

$$ Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 $$

Thanks in advance for any help, Zach Hilman

Mark Fischler
  • 41,743
  • I am removing the "algebraic-geometry" tag here. "algebraic-geometry" is the study of zeros of multivariate polynomials, and is different than analytic geometry, which this problem does concern. – Mark Fischler Oct 28 '16 at 20:58
  • Sorry, I was a little confused about that one. – Zach Hilman Oct 28 '16 at 20:58
  • I mean, this is fundamentally asking about classifying affine varieties given by the general form above. I see no reason why it couldn't be considered part of algebraic geometry (although another tag may indeed be more appropriate). – Michael L. Oct 28 '16 at 21:02
  • Have a look at (http://math.stackexchange.com/q/1539317) – Jean Marie Oct 28 '16 at 21:19
  • Could you re-explain that, I was a little confused at the first/second parts. – Zach Hilman Oct 28 '16 at 21:26
  • Have you already seen what is the "rank of a matrix" ? If yes, you have to check with the help of the first part (first page), in which case you are, the goal being of course to eliminate (or not!) the possibility to be in degenerate cases ; once the "tree of possibilities" has been pruned, and we are certain to be in a classical case, it remains to see which one (ellipse, hyperbola, parabola). This is the object of the page. OK ? – Jean Marie Oct 28 '16 at 23:09
  • Alright, thank you guys. I cannot test this right now, but I will post my code/solution if this works. – Zach Hilman Oct 28 '16 at 23:42
  • I went through that post, but I need to further narrow down what happens when you have the p(A) = 2, p(D) = 3 case [Real Ellipse, Imaginary Ellipse, Hyperbola] and the p(A) = 2, p(D) = 2 case [Real/Imaginary Intersecting]. Also, where would the case of a single point fall? – Zach Hilman Oct 29 '16 at 00:16
  • See https://en.wikipedia.org/wiki/Conic_section#General_Cartesian_form for a formulation that doesn’t involve matrices. – amd Oct 29 '16 at 06:24
  • 1
    This https://en.m.wikipedia.org/wiki/Conic_section#Discriminant has a formulation in terms of only the coefficients and the determinant $\delta=B^2-4AC$ – Sophie Dec 14 '16 at 03:53
  • http://mathworld.wolfram.com/QuadraticCurve.html – amd Oct 23 '19 at 08:40

0 Answers0