How this calculation works
Solve the three-circle Apollonius tangency problem over all signed internal and external branches. Each positive-radius circle candidate is checked against the original geometric distance conditions.
||c−c_i||=|R+s_i r_i|,s_i∈{−1,1}; subtract squared equations to solve c as an affine function of R.A worked example
Three unit circles at(0,0),(4,0),(0,4)admit eight distinct positive-radius solutions under the signed tangency convention. The symmetric center(2,2)gives radii sqrt8−1 and sqrt8+1 for two of those branches.
Good to know
Exactly three positive-radius circles with noncollinear centers. Floating linear elimination and quadratic roots across eight sign patterns;positive solutions deduplicated and distance-checked. Collinear or unresolved degenerate families rejected. No straight-line limiting solutions or exact algebraic certification.
Reference: Marco Robalo:the Apollonius problem (opens in a new tab) ↗
Tangency has internal and external configurations
A solution circle can touch an input circle from outside or with one circle enclosing the other. Both configurations are expressed by a signed radius relation and a nonnegative center distance,rather than by one unconditional sum of radii.
This page enumerates those signed possibilities for three given circles. It returns circles of positive radius and verifies the original distances,which prevents a formally valid squared equation from introducing a negative-radius object without a geometric interpretation.
Compare this with the Circle inversion calculator for points lines and circles. Mapping circles by inversion does not enumerate circles satisfying three simultaneous tangencies.
Enter three actual circle centers and radii
Each row contains two planar center coordinates and a positive radius. The three centers must be noncollinear so the pair of subtracted center equations has an invertible2×2coefficient matrix in the supported elimination method.
Collinear configurations can still have interesting geometric solutions,but require separate treatment and can create degeneracies. They are rejected explicitly rather than perturbed or assigned a fictitious small determinant to force the general-position calculation to continue.
Subtraction removes the squared center terms
Writing each squared tangency equation includes the same unknown center norm and radius square. Subtracting the first equation from the other two removes those common terms and leaves the center as an affine function of the unknown radius.
Substituting that relation back into one original squared equation gives a quadratic in the radius for each sign pattern. A nearly linear equation is handled separately. Every recovered positive root must then satisfy the unsquared absolute-distance conditions before it is retained.
The equal-radius example reveals two symmetric solutions
The default centers form a right triangle with its circumcenter at(2,2). That center is sqrt8 units from every given center. A radius sqrt8−1 gives an outside-tangent solution,and sqrt8+1 gives a containing-circle solution.
Other sign patterns move the center away from this symmetric location. Together the default produces eight distinct positive-radius circles. This example checks that different tangency branches are preserved rather than collapsed into a single visually familiar enclosing circle.
Signed branches can describe the same final circle
Different algebraic sign choices can coincide in special configurations,especially when an absolute radius difference changes its geometric interpretation. The output therefore deduplicates by the resulting center and positive radius after reconstructing the geometry.
The stored sign vector documents one accepted branch,not a promise that each circle has a unique algebraic labeling. Count the verified geometric solutions rather than the number of quadratic roots generated before distance tests and duplicate handling.
Residuals guard against squared-equation artifacts
For each candidate,the largest difference between actual center distance and the required absolute signed-radius expression is reported. This checks the original geometric condition that was partially hidden during elimination and squaring.
Finite tolerances still matter near repeated roots or very large coordinates. The method is not an exact algebraic root isolation package,and it does not supply a certified count for degenerate limit cases where circles become lines or a family ceases to be isolated.
Use the construction as geometry rather than optimization
The Apollonius problem asks which circles are tangent to all three inputs. It does not choose the smallest enclosing circle,an empty disk in a polygon or a physically feasible packing among obstacles. Those are different objectives with additional constraints.
If a design needs one particular tangency arrangement,inspect its signs,center and radius before selecting a candidate. The full list is deliberately retained so the user can apply those external criteria rather than having the calculator silently prefer a branch.
A few questions, answered
Does this include internal tangency?
Yes. Signed branches cover both internal and external tangency configurations.
Can centers be collinear?
Not in this bounded elimination method;those configurations are rejected.
Why check unsquared distances?
They remove algebraic candidates that fail the original geometric condition.
Is this a smallest enclosing circle solver?
No. It enumerates tangency solutions without optimizing a radius objective.