Let's assume we have a line:
$$\begin{align} x&: x_0 + v_xt, \\ y&: y_0 + v_yt \end{align}$$
and a circle
$$\begin{align} x&: X_0 + kt\cos(s), \\ y&: Y_0 + kt\sin(s).\end{align}$$
Where does the line and the circle intersect?
Let's assume we have a line:
$$\begin{align} x&: x_0 + v_xt, \\ y&: y_0 + v_yt \end{align}$$
and a circle
$$\begin{align} x&: X_0 + kt\cos(s), \\ y&: Y_0 + kt\sin(s).\end{align}$$
Where does the line and the circle intersect?
Copyright © 2021 JogjaFile Inc.
Set $x_0+v_xt=X_0+kt\cos(s)$ and rearrange to make t the subject.
Set $y_0+v_yt=Y_0+kt\sin(s)$ and rearrange to make t the subject.
Make equal to each other and solve for s ... like this:
$x_0-X_0=kt\cos(s)-v_xt$
$t= \frac {x_0-X_0}{k\cos(s)-v_x}$
$y_0-Y_0=kt\sin(s)-v_yt$
$t= \frac {y_0-Y_0}{k\sin(s)-v_y}$
$\frac {x_0-X_0}{k\cos(s)-v_x}= \frac {y_0-Y_0}{k\sin(s)-v_y}$
$a \cos(s)-b\sin(s)=c$ where $a=k(y_0-Y_0)$ and $b=k(x_0-X_0)$ and $c=v_x(y_0-Y_0)-v_y(x_0-X_0)$
$rcos(s+\alpha)=c$ where $\alpha=\tan^{-1}(\frac b a)$ and $r=\sqrt{a^2+b^2}$
$s=\cos^{-1}(\frac c r)-\alpha$