I need to draw two red lines connecting the tangents from two circles on both sides. I need an algorithm that would get them based on any angle these circles are in relation to another. I need the results in x, y coordinates for plotting them. The part I am having trouble with is finding the x, y using the radius based on the angle which would give me the tangent. I am more than happy doing some research - just point me the right direction.
The circles will always be the same size.
Thanks for any help.


If I understand the question properly, you have two circles of equal radii, and you want to draw the two common tangents on each side of the circle. The points of tangency to each circle fall on a line through the circle center that is perpendicular to the line connecting the centers (I know, I should really draw a picture, but it's too late at night). So if you know the centers and the common radius, it's easy to figure out the points of tangency, so you can determine the two red lines.