Find point(s) of intersection between a line and a circle whose radius is parameterized by the same variable as the line

46 Views Asked by At

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?

2

There are 2 best solutions below

9
On

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$

2
On

Hint: convert the cirlce to the form $(x-a)^2+(y-b)^2=r^2$ and the line to $y=mx+b$. substitute to the cirlce, this would lead a quadratic equation and we know how to solve!