Find the equation of the circle between 2 tangent lines

circlesgeometrytangent line

Find the radius of the circle and its position from origin. Given – equations of tangents of the circle and point of intersection of the tangents.(It's like a pair of tangents from a circle intersecting at a point, but I don't know the equation of the circle)

Best Answer

Let us rewrite the issue in the following way :

Being given two lines $(L_1)$ and $(L_2)$, find a general representation $x_m,y_m$ for the center and $R_m$ for the radius of any circle which is tangent to both of them ($m$ being a parameter). This tangency occurs either in the 2 smallest sectors corresponding to the acute angle between $(L_1)$ and $(L_2)$ (as is the case of Fig. 1) or in the 2 largest ones (left empty in this case).

We will consider the case where the intersection point of the two lines is the origin. If this is not the case, one has only to compute the intersection point and make coordinates' translation.

The main idea in this case (lines intersecting at the origin) is that it suffices to know a single circle (called prototype circle, depicted in red on Fig. 1) tangent to both lines and then homothetize it ( = enlarge it).

enter image description here

Fig. 1 : An example with lines whose polar angles are $\pi/12$ and $\pi/4$. The "prototype circle" is the red one.

Here is the Matlab program that has generated Fig. 1 :

clear all;close all;hold on;axis equal
t1=pi/12;a=cos(t1);b=sin(t1);% t1 = polar angle of line 1
t2=pi/4;c=cos(t2);d=sin(t2);% t2 = polar angle of line 2
R=(a-c)/(b+d);% radius (other expression R=(d-b)/(a+c)) 
x0=a-R*b;y0=b+R*a;% center coordinates of the proto. circle
t=0:0.01:2*pi;
for h=-2:0.1:2; % homothety coefficient
    co='b';
    if h==1;co='r';end;
    plot(h*(x0+R*cos(t)),h*(y0+R*sin(t)),'color',co);
end;
H=2.5;
plot(H*[-a,a],H*[-b,b],'b'); % first line
plot(H*[-c,c],H*[-d,d],'b'); % second line
plot([-3,3],[0,0]); % x-axis
plot([0,0],[-2,2]); % y-axis

Explanation : the important thing to understand is what are lines 4 and 5 made for.

Indeed these lines express the fact that the coordinates of the center of the prototype circle is

$$\binom{x_0}{y_0}=\underbrace{\binom{a}{b}}_{V}+R\underbrace{\binom{-b}{\ \ a}}_{V^{\perp}}\tag{1}$$

with

$$R=\frac{a-c}{b+d}=\frac{d-b}{a+c}\tag{2}$$

(the second equality is readily checked as a consequence of the fact that $a^2+b^2=c^2+d^2=1$).

The proof of the first equality in (2) can be given using trigonometric formulas :

$$\frac{a-c}{b+d}=\frac{\cos(\theta_1)-\cos(\theta_2)}{\sin(\theta_1)+\sin(\theta_2)}=\frac{-2\sin(\tfrac12(\theta_1+\theta_2))\sin(\tfrac12(\theta_1-\theta_2))}{2\sin(\tfrac12(\theta_1+\theta_2))\cos(\tfrac12(\theta_1-\theta_2))}$$

Thus

$$R=\tan(\tfrac12\theta_3) \ \text{with} \ \theta_3:=\theta_2-\theta_1,\tag{3}$$

(3) being true (see Fig. 2 for understanding it).

enter image description here

Fig. 2