# Apollonius PLC

Construction of circles tangent to a given line, a given circle and going through a given point.
Draggable point C and the magenta point define the circle.
The draggable blue points define the line, A is the given point.

Sorry, your browser is not Java compliant.

The perpendicular from C to given line (d) intersects the circle in D and E, and intersects the line in F.
Line DA intersects (d) in M.
The circumcircle to EFA intersects DA in another point P.
Construct the tangent MT to circle (EFA) and copy MU = MV = MT on line (d).
The perpendiculars from U and V to (d) intersect the perpendicular bisector of AP in O and O', centers of the searched circles.
The same construction is repeated, exchanging D and E.

There are only two solutions if the given line intersects the given circle.
Otherwise 0 or 4 solutions depending on location of A and circle with respect to the line.
(No solution if the line doesn't intersect the circle, and A and circle are on opposite sides of the line)

If a tangent from A to the given circle is parallel to the given line, one solution degenerates into that tangent.
The construction of this "circle" becomes then inaccurate.

#### AC perpendicular to d

When AC is perpendicular to the given line, the previous construction fails, as the circumcircle to ADF or AEF is line ACDEF itself.
From the beginning, point P is just defined as DP.DA = DE.DF, which is easily constructed with Thalès.
The circle going through A and P and tangent to (d) is then easily constructed.

Sorry, your browser is not Java compliant.

Through D, draw any line on which we copy segments DA' and DF' in same ratio as DA and DF.
The parallel to EA' from F' intersects line DE in P.
DP/DE = DF'/DA' = DF/DA.
The perpendicular bisector of AP, at distance m of line (d), intersects the circle centered in A with radius m in O and O', centers of searched circles.
The construction is repeated, exchanging D and E.