main/src/georegression/geometry/algs/TangentLinesTwoEllipses_F64.java
boolean initialize(EllipseRotated_F64 ellipseA, EllipseRotated_F64 ellipseB,
					   Point2D_F64 tangentA0, Point2D_F64 tangentA1,
					   Point2D_F64 tangentA2, Point2D_F64 tangentA3,
					   Point2D_F64 tangentB0, Point2D_F64 tangentB1,
					   Point2D_F64 tangentB2, Point2D_F64 tangentB3) {

		centerLine.set(ellipseA.center,ellipseB.center);

		UtilLine2D_F64.convert(centerLine, lineGeneral);

		Intersection2D_F64.intersection(lineGeneral, ellipseA, temp0, temp1, -1);
		if (temp0.distance2(ellipseB.center) < temp1.distance2(ellipseB.center)) {
			tangentA0.set(temp0);
		} else {
			tangentA0.set(temp1);
		}

		// Two seed points for B.  This points will be on two different sides of center line
		if( !tangentLines(tangentA0,ellipseB,tangentB0,tangentB1) )
			return false;

		// Find initial seed of 4 points on ellipse A.  Careful which pairs of points cross or
		// don't cross the center line
		if( !selectTangent(tangentB0,tangentA0,ellipseA,tangentA0, false))
			return false;
		if( !selectTangent(tangentB0,tangentA0,ellipseA,tangentA1, true))
			return false;
		if( !selectTangent(tangentB1,tangentA0,ellipseA,tangentA2, true))
			return false;
		if( !selectTangent(tangentB1,tangentA0,ellipseA,tangentA3, false))
			return false;

		// not all of the B's have been initialized.  That's ok.  It will just have a large error
		// the first iteration

		return true;
	}
boolean initialize(EllipseRotated_F64 ellipseA, EllipseRotated_F64 ellipseB,
					   Point2D_F64 tangentA0, Point2D_F64 tangentA1,
					   Point2D_F64 tangentA2, Point2D_F64 tangentA3,
					   Point2D_F64 tangentB0, Point2D_F64 tangentB1,
					   Point2D_F64 tangentB2, Point2D_F64 tangentB3) {

		centerLine.set(ellipseA.center,ellipseB.center);

		UtilLine2D_F64.convert(centerLine, lineGeneral);

		Intersection2D_F64.intersection(lineGeneral, ellipseA, temp0, temp1, -1);
		if (temp0.distance2(ellipseB.center) < temp1.distance2(ellipseB.center)) {
			tangentA0.set(temp0);
		} else {
			tangentA0.set(temp1);
		}

		// Two seed points for B.  This points will be on two different sides of center line
		if( !tangentLines(tangentA0,ellipseB,tangentB0,tangentB1) )
			return false;

		// Find initial seed of 4 points on ellipse A.  Careful which pairs of points cross or
		// don't cross the center line
		if( !selectTangent(tangentB0,tangentA0,ellipseA,tangentA0, false))
			return false;
		if( !selectTangent(tangentB0,tangentA0,ellipseA,tangentA1, true))
			return false;
		if( !selectTangent(tangentB1,tangentA0,ellipseA,tangentA2, true))
			return false;
		if( !selectTangent(tangentB1,tangentA0,ellipseA,tangentA3, false))
			return false;

		// not all of the B's have been initialized.  That's ok.  It will just have a large error
		// the first iteration

		return true;
	}
boolean initialize ( EllipseRotated_F64 ellipseA , EllipseRotated_F64 ellipseB , Point2D_F64 tangentA0 , Point2D_F64 tangentA1 , Point2D_F64 tangentA2 , Point2D_F64 tangentA3 , Point2D_F64 tangentB0 , Point2D_F64 tangentB1 , Point2D_F64 tangentB2 , Point2D_F64 tangentB3 ) { centerLine . set ( ellipseA . center , ellipseB . center ) ; UtilLine2D_F64 . convert ( centerLine , lineGeneral ) ; Intersection2D_F64 . intersection ( lineGeneral , ellipseA , temp0 , temp1 , - 1 ) ; if ( temp0 . distance2 ( ellipseB . center ) < temp1 . distance2 ( ellipseB . center ) ) { tangentA0 . set ( temp0 ) ; } else { tangentA0 . set ( temp1 ) ; } // Two seed points for B.  This points will be on two different sides of center line if ( ! tangentLines ( tangentA0 , ellipseB , tangentB0 , tangentB1 ) ) return false ; // Find initial seed of 4 points on ellipse A.  Careful which pairs of points cross or // don't cross the center line if ( ! selectTangent ( tangentB0 , tangentA0 , ellipseA , tangentA0 , false ) ) return false ; if ( ! selectTangent ( tangentB0 , tangentA0 , ellipseA , tangentA1 , true ) ) return false ; if ( ! selectTangent ( tangentB1 , tangentA0 , ellipseA , tangentA2 , true ) ) return false ; if ( ! selectTangent ( tangentB1 , tangentA0 , ellipseA , tangentA3 , false ) ) return false ; // not all of the B's have been initialized.  That's ok.  It will just have a large error // the first iteration return true ; }
Select the initial tangent points on the ellipses.  This is done by:

1) picking an arbitrary point on ellipseA.
2) Find tangent points on B using point from step 1
3) Use those two tangent points on B to find 4 points on ellipse A
4) Use those 4 points to select 4 points on B.
Select the initial tangent points on the ellipses . This is done by :