If I have two Circles:
(x+100)^2 + (y-20)^2 = 20^2
(x-100)^2 + (y-10)^2 = 10^2
and a straight line
How can I find the equation of a circle which touch to two circle and tangent to the straight line?
The second circle has the center C(100 , -10) and . The x-axis is tangent to this circle.
Make a rough sketch of the situation. (see attachment. My sketch is not drawn to scale because the distance between the centers of the circles is too large - and the greater circle belongs to the left side)
You have 2 unknowns: x and . Use the 2 right triangles to set up a system of equations:
You'll get two solutions:
1. A small circle with it's center at and
2. A huge circle which touches the 2 circles from below and the tangent point to the straight line is very far away at the right. (I'll only give you the approximate values):
M(603.4280150, -6033.780150) and r = 6034.780150
1. It is quite difficult to place the centers at (-100, 20) and (100, 10). Therefore I took as an example (-10, -10) and (10, - 20)
2. Of course, you are right, the circles should be above the x-axis.
3. All my considerations should be OK. Therefore I will not post a repaired version.
There is a large circle of radius 20 units that is centered at point A(100,20). Then there is a small circle of radius 10 units that is centered at point B(100,10). Then there is that horizontal line y=1.
The circle we are looking for, P, that is tangent to all three....large and small circles and y=1 line... should be centered somehere in the 1st quadrant because of the location of the small circle B.
Let's call the center of circle P as point P(u,v). Its radius, we call r.
The tangent line from P to the horizontal line y=1 is a vertical line segment. This vertical tangent line is r.
So, r = v -1 --------(i)
Draw a line connecting the P to the center of circle A. This line segment is (r +20)
Draw a horizontal line connecting centerpoint A to the vertical r at point C. The length of this AC line segment is (100 +u). And, the length of PC is (v -20)
So in the right triangle PCA,
hypotenuse = r +20 = (v -1) +20 = v +19
vertical leg = v -20
horizontal leg = 100 +u
By Pythagorean Theorem,
(v +19)^2 = (v -20)^2 +(100 +u)^2 -----------(ii)
Draw a line connecting the P to the center of circle B. This line segment is (r +10)
Draw a horizontal line connecting centerpoint B to the vertical r at point D. The length of this BD line segment is (100 -u)
And, the length of PD is (v -10)
So in the right triangle PDB,
hypotenuse = r +10 = (v -1) +10 = v +9
vertical leg = v -10
horizontal leg = 100 -u
By Pythagorean Theorem,
(v +9)^2 = (v -10)^2 +(100 -u)^2 -----------(iii)
Now solve Eq.(ii) and Eq.(iii) simultaneously to find u and v.
From v you can get r.
So, the circle P in question is
(x -u)^2 +(y -v)^2 = r^2
((I'm getting u = 17.78685; v = 178.36849; r = 177.36849))
I did my calculations again:
According to ticbol you are looking for a circle with C(p, q) and radius r.
Then you can set up a system of three equations:
This system will yield two solutions:
1. (ticbols solution)
C( 17.787, 178.368), r = 177.368
C( 562.213, 5622.632), r = 5621.632
EDIT: I've attached a sketch of the situation. The red line is a small part of the big circle of solution #2.
Since both circles cut the line y = 1 there must be at least one more circles which touches the circles and the line from below:
This system of equations has only one solution:
C([ 0.05, -4984.50), r = 4985.50
I've attached a sketch of the circles. The green line is a part of the last circle, touching the small circles and the line from below.