DGS Studio

Geometry

Externally Touching Circles

Internal tangent length is 0 when the circles touch externally.

The circles have radii 4 and 3, and their centers are 7 apart. The internal common-tangent length is √[d² − (r1 + r2)²] = 0, so the circles touch and the tangent meets them at the contact point.

An external tangent keeps both centers on the same side of the line. An internal tangent puts the centers on opposite sides, which is why the radii are added inside the square root. A zero result is a real touch, not an error. A negative value under the square root means that tangent does not exist, and the circles are drawn without it.

Equation

common_tangent_internal(r1=4, r2=3, d=7)

Lengths and tangents

Geometry examples state objects and a relationship, then DGS draws the figure and reports the measurement. A distance is the length of the segment between two points. A common tangent is a line that touches two circles, either externally or internally.

The drawing is there so the algebra has a picture. Lengths that come out as perfect squares stay exact. Other lengths keep a radical when the engine can simplify one, plus a decimal. Editing a coordinate or a radius is the fastest way to see which part of the formula changed.

Reading the input

Try a change

Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.

Edit and generate

Generate Graph opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples