I'm in the process of writing a script for work but realized that I need to calculate the length of a circular arc intersected by two tangent lines, and when I try finding it I get lost in a mess of trig that seems to go nowhere.
Here's what I have so far:
Tangent lines intersect each other at point $P$
Tangent lines intersect circle at points $A,B$
Circle radius is $R$
Point on circle nearest to $P$ is $Q$
Length of $\vec{PQ}$ is $T$
Using some trig, I found that $\vec{PA}=\vec{PB} = R\arccos(\frac{R}{R+T})$
But that's where I'm stuck. How can I find $\widehat{AQB}$ ?
$OAP$ is a right triangle because $PA$ is tangent to the circle. With other given data we are able to find angle $\widehat O$ in this triangle: $$\cos O = \frac{OA}{OP} = \frac{R}{R+T}$$ $$\widehat {AOQ} = arccos \frac{R}{R+T} $$ Now, it is easy to show that $\widehat{QOB}=\widehat{AOQ}$ and therefore $$\widehat {AOB} = 2 arccos \frac{R}{R+T}$$ The above is the angle of the arc $AQB$. If you are looking for the other arc that connects $A$ to $B$, it is $2 \pi - 2 arccos \frac{R}{R+T}$. And if you are looking for the angle $\widehat{AQB}$ , it is half of the latter arc: $$\widehat{AQB} = \pi - arccos \frac{R}{R+T} $$ .
May I ask, what kind of programming project are you involved in?