UtilityEx.GetLinesTangentToTwoCircles (Circle, Circle, out Line()) Method
For arcs, it returns the same result as for circles, for a different result use GetLinesTangentToTwoCircles.
All the lines start from c1 and end on c2, except for the tangent lines that are perpendicular to the line
connecting the two centers, we will refer to these tangents as vertical or VERT:
their length is equal to the diameter of the bigger circle and they touch the circles at the midPoint.
The position of the lines in the array is fixed and dependent from the number of solutions:
- [0] upper external (or outer),
- [1] lower external (or outer),
- [2] upper internal (or inner),
- [3] lower internal (or inner).
- 0 => [null, null, null, null]: one circle is completely inside the other and they don't intersect,
- 1 => [null, null, null, VERT]: one circle is completely inside the other and they are tangent
- 2 => [LINE, LINE, null, null]: the circles intersect in two different points, there are only the external tangents,
- 3 => [LINE, LINE, VERT, null]: the circles intersect in one point, but they aren't one inside the other, there are the external tangents and a vertical tangent,
- 4 => [LINE, LINE, LINE, LINE]: the circles don't intersect and they aren't one inside the other, there are the external tangents and the internal tangents.