Shapes & spaces

Smallest enclosing circle of disks calculator with support certificates

Find the smallest circle containing entire input disks, with active supports, containment residuals and a minimum-radius certificate.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Find the smallest circle containing entire input disks, with active supports, containment residuals and a minimum-radius certificate.

THE FORMULAminimize R subject to ||c-c_i||+r_i <= R for every disk i.

A worked example

Two unit disks centered at (0,0) and (4,0) require an enclosing circle centered at (2,0), of radius 3. Enclosing only their centers would incorrectly return radius 2.

Good to know

1–30 planar centers with nonnegative radii. Enumerate one/two/three-disk active supports with robust branch checks or a convex primal/dual certificate; all-disk containment and gap required. No center-only reduction, heuristic-only minimum or 3D dimension variant.

Containing disks rather than just centers

An enclosing circle of disks must contain every point of every supplied disk. The distance from the enclosing center to an input center, plus that input radius, cannot exceed the enclosing radius. Ignoring the input radii reduces the problem to a different point-enclosure calculation and can return a circle that cuts through much of the requested geometry.

The objective is to make the enclosing radius as small as possible. The resulting center is not generally the arithmetic average of disk centers, and the largest input disk need not determine the answer alone. A support certificate explains which disks constrain the optimum, while a containment check establishes that all remaining disks fit inside the same circle.

Smallest enclosing circle of disks calculator with support certificates worked exampleInput radii: 1 and 1Center separation: 4Enclosing center: (2,0)Minimum radius: 3
Scroll across to see the full diagram.
Two unit disks centered at (0,0) and (4,0) require an enclosing circle centered at (2,0), of radius 3. Enclosing only their centers would incorrectly return radius 2.

Compare this with the Minimum enclosing ellipse calculator for planar points. Minimize a circle containing entire input disks, including their radii; an enclosing ellipse of points does not impose these expanded circular constraints.

Entering and normalizing the data

Each row contains a disk center's two coordinates followed by its nonnegative radius. A zero radius represents a point, so ordinary point sets can be included without a separate page or formula. Coincident centers are allowed; a smaller concentric disk is redundant when a larger one is already present. All coordinates and radii must share a common length unit.

Very large coordinate offsets relative to tiny radii can make floating distance differences difficult to resolve. Translating and scaling the data internally helps numerical conditioning, but the result must be converted back to the original units. Negative radii have no meaning in this containment model and should be rejected rather than interpreted as signed weights or holes.

Why only a few disks support the answer

In the plane, a minimum enclosing circle can be fixed by at most three active disks. A single disk suffices if it contains all the others. Two disks can determine opposite limiting contacts, while three can balance the enclosing center in different directions. Additional disks may touch the boundary without being required in a minimal support set.

Enumerating candidate supports is practical at the displayed input bound. For every candidate, the chosen algebraic branch must have a radius large enough to contain its support disks and must pass all-disk containment. Merely solving equal-distance equations is insufficient: such equations may also produce an interior tangent solution or a circle that encloses none of the required interiors.

The convex optimality certificate

The radius objective can be written as the maximum of distance-to-center plus radius over all disks. This is a convex function of the enclosing center. At a nonsingular optimum, a nonnegative weighted combination of active outward distance gradients equals zero, with weights adding to one. Those weights provide a useful lower-bound certificate for the optimum radius.

Containment gives an upper bound from the returned circle. The support or convex dual argument gives a lower bound. Agreement within a declared numerical tolerance establishes a checked numerical optimum. If the bounds fail to agree, the page should report an unresolved calculation instead of describing a plausible-looking enclosing circle as the smallest possible one.

Two unit disks as a worked example

The default disks have radius one and centers (0,0) and (4,0). Their farthest outside points lie at x minus one and x five, six units apart. Any enclosing circle needs radius at least three to cover those two points. The circle centered at (2,0) with radius three contains both complete disks, so it achieves that lower bound.

Each disk satisfies center distance two plus radius one equal to the enclosing radius three. Both are active supports. By contrast, a minimum circle of the two centers would have radius two and would fail the actual containment constraints. This comparison makes the role of nonzero input radii visible without relying on a large or ill-conditioned numerical example.

Residuals and redundant disks

For each disk, the containment slack is enclosing radius minus center distance minus input radius. Active supports have slack near zero; deeply interior disks have positive slack. A materially negative slack means containment failed. A tiny rounding-level negative value should be assessed against the stated scale and tolerance rather than hidden by taking an absolute value.

Adding a disk already contained strictly inside the returned circle cannot increase the optimum. Translating every center should translate the answer by the same amount, and scaling centers and radii should scale the enclosing radius. These invariances, together with nested-disk and unequal-radius tests, are valuable checks against accidentally treating the problem as a center-only minimum circle.

Using the answer in a larger design

The returned circle is a geometric enclosure for the exact numbers entered. It is useful for packaging clearances, circular bounding regions or comparing a collection of circular footprints. It does not include uncertainty in disk location or radius. If a safety allowance is required, expand those inputs deliberately and retain the expanded values with the result.

The page does not solve a three-dimensional sphere problem, an ellipse enclosure or a minimum-area polygon enclosure. Those objectives have different support conditions. A numerical failure near a degenerate support does not prove that no enclosure exists; finite disks always have some enclosure. It means the implementation did not close its advertised minimum-radius certificate for those inputs.

A few questions, answered

Are zero-radius disks allowed?

Yes. They represent points within the same geometric containment model.

Can a single disk determine the optimum?

Yes, when that disk contains every other supplied disk.

Why is the average center insufficient?

The objective minimizes the largest center-distance-plus-radius constraint, not an average squared distance.

Does an unresolved certificate mean no enclosing circle exists?

No. It means the minimum was not numerically established within the supported checks.

Find your calculator

Start typing to explore the library.