How can I calculate the points of two lines that connect two circles? Let's say I have two circles of equal or differing radii, a variable distance apart.  
 
I want to calculate the end points of two lines, that will "connect" the circles.

And no matter how the circles may be oriented, they should still "connect" in the same way.
 
How can I calculate the end points of these two lines?

In either way if you know the circles find gradient of circle meaning y' and equate them so you get the line.
"this line will be tangent since they are not cutting circle"
Note: To joint endpoint of diameter they must be of equal radii and in any case the above method will get you result.
