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?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityhttps://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?
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.