0
$\begingroup$

https://i.stack.imgur.com/krUqK.png

Example we have one line and one circle above, and its equation are:

Circle: $(x-a)^2 + (y-b)^2 = r^2$

Line: $y = m(x-x_1) + y_1$

How do we find the intersection coordinate?

$\endgroup$
1
  • 1
    $\begingroup$ Substitute your equation for $y$ (from the line) into the equation of the circle, multiply everything out, and solve the quadratic equation to get $x$. Use the equation of the line to get a $y$ for each $x$. $\endgroup$ Mar 13, 2016 at 23:58

1 Answer 1

0
$\begingroup$

Well, why not bash here? Solve the equations in terms of $x,$ as follows:

Given: $$(x - a)^{2} + (y - b)^{2} = r^{2}$$ $$y = m\left(x - x_{1}\right) + y_{1}$$

With substitution: $$(x - a)^{2} + \left(m\left(x - x_{1}\right) + \left(y_{1} - b\right)\right)^{2} = r^{2}$$ $$\left(x^{2} - 2ax + a^{2}\right) + m^{2}\left(x^{2} - 2x_{1}x + x_{1}^{2}\right) + 2m\left(x - x_{1}\right)\left(y_{1} - b\right) + \left(y_{1}^{2} - 2by_{1} + b^{2}\right) = r^{2}.$$

I leave you to use the quadratic equation on $x$ and finish the problem. Note that sometimes, there will be no solution.

$\endgroup$
2
  • 1
    $\begingroup$ The distance between the circle centre and the intersection point is: $$D=\left|\frac{\sqrt{-4(m^2+1)((-mx_1+y_1-b_1)^2+a_1^2-c^2)+(2m(-mx_1+y_1-b_1)-2a_1)^2}-2m(-mx_1+y_1-b_1)+2a_1)}{2m^2+2}\right|$$ Bravo sir, thank you :) $\endgroup$
    – Newbie123
    Mar 14, 2016 at 0:26
  • $\begingroup$ No problem! When in doubt, try bashing the problem ;) $\endgroup$
    – K. Jiang
    Mar 14, 2016 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .