# Tangent line(s) to 2+ circles

1. Jul 12, 2011

### flyingmuskrat

How do you find the equation of the (sometimes 2 possible) tangent lines between two (or more) circles? like the 2 tangents that cross in the picture on this page: http://mathworld.wolfram.com/Circle-CircleTangents.html.

The application for this is for a program that would draw this tangent line and for some reason a couple approaches have failed using derivatives, trying to find the angle with the tangent, etc..

The known information is the coordinates of the centers of the circles and the radii of each circle.

I'm not sure what's wrong, but I'm looking for help walking through this kind of simple problem. thanks so much!

2. Jul 13, 2011

### gsal

It seems to me that all the information you need is right there in the page that you link...

Clearly, it is easiest if you do a transformation so that x1 and x2 fall on the horizontal (like they show in the middle picture), and even better if x1 is at the origin.

...assuming that:

you can calculate, for example, the tangent in the second picture.

They first determine the line that is parallel to the tangent but that passes through x2 and is tangent to a circle on x1 with a radius of r1-r2...do you get that?

you have the 2 centers
you have the distance between the two centers...this is the hypotenuse of the one triangle the you will need to solve.
you have the r1-r2 short side of the triangle
because you know that the short side (r1-r2) and the 'tangent' line are perpendicular at the tangent point, you can apply Pythagoras' theorem and calculate the length of the long side (the 'tangent' line that passes through x2) of this rectangle
once you have all the sides, you can now calculate the angle (slope) of the 'tangent' line
and since you know it passes through x2, you can come up with an equation for it
then, translate further so that it actually becomes tangent to the 2 circles

so, I am not you ever need derivatives, here...it's all geometry

3. Jul 13, 2011

### flyingmuskrat

All the stuff before with I'm fine on but I'm confused on "translating this line along the radius through a distance until it falls on the original two circles" as it says in the link or "translate further so that it actually becomes tangent to the 2 circles" as you described. I'm looking for the internal common tangents, not the external ones, so it's not parallel. It's not that I couldn't find this tangent line myself, but I'm trying to write a computer program that constructs this line using it's equation for a large quantity of data.

4. Jul 13, 2011

### flyingmuskrat

nevermind I think I'm fine. You just solve those equations.

5. Jul 13, 2011

### Hurkyl

Staff Emeritus
Given a circle C, can you solve the proposition "L is a tangent line to C" for L?

If you can do that, and find a convenient way to express the solution space, and are given another circle C', you could then proceed to solve the proposition "L is also a tangent line to C'".

Or, you can do some geometry to get rid of the circles and turn it into a problem of line segments and angles....

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook