How can I calculate the arc between two circles? The arc must be tangent to the two points on the circles.
Here is a picture illustrating it. I'm trying to code and calculate the orange arc and the blue arc.
more details:
Your applet should have 2 modes: 2D and 3D. The user should be able to switch between them by pressing the space bar. In the 2D mode, the user can edit the position of four control points A, B, C and D and should see 4 circular arcs defined by these points as follows. The red arc lies on a circle of center A and radius ||AB||. The green arc lies on a circle of center C and radius ||CD||. The orange arc lies on a supporting circle that is tangent to the supporting circle of the red arc at B and also tangent to the green circle at a point E, which your code must compute. This supporting circle should not separate A and C (i.e., A and C must either be both in that circle or out of it). Similarly, the blue arc lies on a circle that does not separate A and C and that is tangent to the supporting circle of the green arc at D and is also tangent to the supporting circle of the red arc at some point F which your program must compute. The red arc runs clockwise from F to B. The orange arc runs from B to E. The green arc runs from E to D. The blue arc runs from D back to F. These four arcs form a smooth boundary of a region S of the plane. Notice that depending on the position of the control points, the orange and blue arcs may each be either concave or convex. In the figure below, the blue arc is concave. (pictured above)