.geometry "version 0.2";
.l0; 
.text("Given circles C\subscript{1} and C\subscript{2},
find their common external tangents", .l0);
v1 = .free(-0.596536, 0.0439763, .in);
v2 = .free(-0.42, 0.05, "C\subscript{1}");
v3 = .free(0.392761, -0.0053242, .in);
v4 = .free(0.778101, 0.00911322, "C\subscript{2}");
.text("First, find the centers O\subscript{1} and
O\subscript{2} of the two circles", .l1);
c1 = .c.vv(v1, v2);
c2 = .c.vv(v3, v4);
v5 = .v.ccenter(c1, [.in, .blink, .white], "O\subscript{1}");
v6 = .v.ccenter(c2, [.in, .blink, .white], "O\subscript{2}");
.text("Assuming that C\subscript{1} is the
smaller circle, subtract its radius from
C\subscript{2} such that M\subscript{2}C\subscript{2}
is equal to O\subscript{1}C\subscript{1}", .l2);
l1 = .l.vv(v6, v4, [2 .in, .blink, .white]);
.text("construct a circle centered at O\subscript{2}
and passing through M\subscript{2}.  Its radius
is the difference of the radii of C\subscript{2} and C\subscript{1}", .l3);
c3 = .c.ctrvv(v4, v5, v2, .in);
v7 = .v.lc(l1, c3, 1, [2 .in, .blink, .white], "M\subscript{2}");
c4 = .c.vv(v6, v7, [3 .in, .blink, .white]);
.text("Next, using standard techniques, construct
the lines passing through O\subscript{1} that are
tangent to the circle of radius OM\subscript{2}", .l4);
l2 = .l.vc(v5, c4, 2, [4 .in, .blink, .white]);
l3 = .l.vc(v5, c4, 1, [4 .in, .blink, .white]);
v8 = .v.lc(l2, c4, 2, [4 .in, .blink, .white], "N\subscript{1}");
v9 = .v.lc(l3, c4, 2, [4 .in, .blink, .white], "N\subscript{2}");
.text("Construct lines from O\subscript{2} through
the points of tangency, and add length O\subscript{1}C\subscript{1}
to it and find T\subscript{1} and T\subscript{2} where
they hit circle C\subscript{2}", .l5);
l4 = .l.vv(v6, v8, [5 .in, .blink, .white], .ray12);
l5 = .l.vv(v6, v9, [5 .in, .blink, .white], .ray12);
v10 = .v.lc(l4, c2, 2, [5 .in, .blink, .white], "T\subscript{1}");
v11 = .v.lc(l5, c2, 2, [5 .in, .blink, .white], "T\subscript{2}");
.text("Finally, constuct tangents to C\subscript{2}
at T\subscript{1} and T\subscript{2}.  These are
the required external tangents", .l6);
l6 = .l.vlperp(v11, l5, [6 .in, .blink, .white], .longline);
l7 = .l.vlperp(v10, l4, [6 .in, .blink, .white], .longline);
.text("Press 'Next' to continue ...", .red, .tol5);
