How to get the coordinates of where a line and a circle intersect when the result gives an imaginary number? if you select a two points (everything in 2 dimensions), draw a circle centered on the first point and connect the two points with a line, and you know both of the point's coordinates and the radius of the circle, how do you get the coordinates of where the line and the circle intersect when the result is an imaginary number? sometimes when solving this problem the quadratic formula has a negative number on it's root which makes it impossible for me to know the coordinates of the point. anyone know how to solve this problem?
For Example. if you take the first point's coordinates (center of the circle) as (1,1), the second point's coordinates as (-2,2) and the radius of the circle as 1.
now if you use the equation for a circle ($r^2=(x-x0)^2+(y-y0)^2$) and replace $y$ with the equation for the line ($y = mx+b$), we get the equation for the coordinate of the interception ($r^2=(x-x0)^2+(mx+b-y0)^2$).
we get $m$ by doing $\frac{y0-y1}{x0-x1}$ which in this case is $-\frac{1}{3}$. We get $b$ from $mx-y$ which in this case is $-\frac{4}{3}$. now if we put everything in the equasion, it should be like this: $1^2=(x-1)^2+(-\frac{1}{3}x-\frac{4}{3}-1)^2$
which I solve like this:
$1=(x-1)^2+(-\frac{1}{3}x-\frac{7}{3})^2$ $<=>$
$0=x^2-2x+1+\frac{1}{9}x^2+\frac{14}{9}x+\frac{49}{9}-1$ $<=>$
$\frac{10}{9}x^2-\frac{4}{9}x+\frac{49}{9}=0$ $<=>$
$x=\frac{-(-\frac{4}{9})\pm\sqrt{(-\frac{4}{9})^2-4\times(\frac{10}{9})\times(\frac{49}{9})}}{2\times(\frac{10}{9})}$ $<=>$
$x=\frac{\frac{4}{9}\pm\sqrt{-24}}{\frac{20}{9}}$
as you can see I can't calculate the X value of the interception because the $\sqrt{-24}$ gives a imaginary number.

Here's a simple geometric approach to finding the intersection point. Call the point around which the circle is drawn $u$, call the other point $v$, and call the intersection point $x$. Because $x$ lies along the line connecting $u$ and $v$, the displacement between $x$ and $u$ must point along the same direction as the displacement between $v$ and $u$. Next, because $x$ lies on a circle of radius $R$ around $u$, the displacement between $x$ and $u$ must have length $R$. Hence the displacement between $x$ and $u$ is given by $R(v-u)/\|v-u\|_2$, and the intersection point is thus given by,
$$x = u + R\frac{v-u}{\|v-u\|_2}$$
Plugging in coordinates should give you your answer! For instance, take $R=1$, $u=(1,1)$, and $v=(-2,2)$. Then $v-u=(-3,1)$, and $\|v-u\|_2=\sqrt{9+1}=\sqrt{10}$. So the intersection point is,
$$x=(1,1) + \frac{1}{\sqrt{10}}(-3,1)$$
