Angle to bypass circle at n distance and direction

40 Views Asked by At

Forgive me if this is rather basic (I never did trig!). I'd like to work out the red angle in the picture below, assuming the black dot is n distance from the circle. It could also be in a different position (offset left or right from the center of the circle).

enter image description here

For example, lets say the circle is 10 metres in diameter, the dot is at a distance of 2 metres from the edge of the circle. How can we calculate the most efficient angle between the x and y axis that would allow a line (e.g. the one in purple) to be drawn from the dot, past the circle?

Many thanks.

1

There are 1 best solutions below

0
On

The problem, as stated, can't be solved. In fact, if you rotate the circle around the black dot, the value of $n$ remains the same, but the angles will be different.

I will solve the problem assuming that the coordinates of $n$ are both equal to $0$ and that the circle (I shall call it $c$) is centered at $(a,b)$ with radius $r$. I shall also assume that the circle lies in the upper half-plane (that is, $b>0$ and $r<b$). In that case, the tangency points must have these properties:

  • they belong to the circle;
  • the lini joining $(0,0)$ to the tangency point is orthogonal to the line joining the tangency point to the center of the circle (that is, to $(a,b)$).

This means that we have to solve the system of equations$$\left\{\begin{array}{l}(x-a)^2+(y-b)^2=r^2\\(x,y).(x-a),y-b)=0.\end{array}\right.$$It has two solutions $(x_1,y_1)$ and $(x_2,y_2)$, which are$$\begin{cases}\left(\dfrac{a^3+a(b^2-r^2)\pm\frac{|a|}abr\sqrt{a^2+b^2-r^2}}{a^2+b^2},\dfrac{a^2b+b^3-br^2\mp|a|r\sqrt{a^2+b^2-r^2}}{a^2+b^2}\right)&\text{ if }a\neq0\\\left(\pm r\sqrt{1-\dfrac{r^2}{b^2}},b-\dfrac{r^2}b\right)&\text{ if }a=0.\end{cases}$$The angles that you are interested in are $\arctan\left(\frac{y_1}{x_1}\right)$ and $\arctan\left(\frac{y_2}{x_2}\right)$.