Expand description
The classical 2D constructions: circles tangent to three entities, tangent lines, and bisector curves: the straightedge-and-compass repertoire, solved algebraically.
One linearization carries the whole tangency family. A circle with
centre c and radius r is tangent to a target once a side is
chosen, and with that side fixed every constraint is linear in
(c, r, Q) where Q = |c|² − r²:
- a target circle
(cᵢ, rᵢ)on sidesᵢ:Q − 2cᵢ·c − 2sᵢrᵢr = rᵢ² − |cᵢ|²; - a point is a zero-radius circle;
- a line with unit normal
nand offsetdon sidet:n·c − t·r = d, with noQat all.
Three constraints give three linear equations in at most four unknowns;
the solution family is a line, and re-imposing Q = |c|² − r² is a
quadratic along it. Enumerating the sides, solving, and verifying every
candidate against the literal tangency distances (the linearization can
manufacture roots the geometry rejects) yields exactly the classical
solution sets, Apollonius’s eight included.
Structs§
- Tangent
Circle - One tangent circle, with its standing toward each target in order.
Enums§
- Bisector2
- The locus of points equidistant from two targets.
- Placement
- How a tangent circle stands to one of its targets.
- Target2
- An entity a construction can be tangent to, or equidistant from.
Functions§
- bisector
- The bisector of two targets: the equidistant locus, as the conic it is.
- circles_
of_ radius_ tangent_ to_ two - Circles of a fixed radius tangent to two targets: the same machinery with the radius row supplied.
- circles_
tangent_ to_ three - Circles tangent to all three targets: the Apollonius family and its degenerate relatives, every candidate verified against the literal tangency distances before it is returned.
- lines_
tangent_ to_ two_ circles - The up-to-four lines tangent to two circles: the external pair where the circles lie on the same side, the internal pair where they straddle.