2
$\begingroup$

I am looking for an algorithm for finding the intersection of a line and an ellipse.

I have the line in the form

$ax+by+c=0 \qquad(1)$

and the ellipse in the form

$Ax^2+Bxy+Cy^2+Dx+Ey+F=0 \qquad(2)$

My idea is to solve in a closed form the system $(1),(2)$. Is it too naive? What are the pitfalls of such approach?

  • 1
    Not naive. Use (1) to eliminate a variable in (2), then apply the quadratic formula.2011-06-07
  • 2
    One potential pitfall is that your equation for an ellipse includes parabolas and hyperbolas. So if you really want an ellipse, start with a more specific equation. I would rotate and translate so the ellipse is $x^2/A^2 + y^2/B^2 =1$.2011-06-07
  • 3
    @Joseph Good idea: you might as well follow that up with another affine transformation sending the ellipse to the unit circle and then rotate the whole picture to make the line vertical, making the computation obvious (and trivial). In fact, if you're willing to apply projective transformations, the same approach solves the problem for any conic section, not just ellipses.2011-06-07
  • 1
    @whuber: Good point!2011-06-07

0 Answers 0