node circle tangent - blossommerz/locus-hub GitHub Wiki
Home > Primitives > Circle: Apollonius
< Previous: Circle: Center Radius | Next: Circle Tangent to... >
Every circle tangent to, or through, three given things: point, circle, arc, line, segment or ray. A Radius above 0 replaces the third. All solutions come out as a collection, largest first.
Category: Primitives | Add menu: Primitives > Circle: Apollonius
This is the Problem of Apollonius: given three things, find the circles that touch all three. It is one of the oldest construction problems there is, and it has more answers than people expect. This node finds them all and hands back the whole set.
Each of A, B and C is read as the constraint its own type implies:
- a point is passed through,
- a circle or an arc is touched, and both the inside and the outside solutions are found,
- a line, segment or ray is touched as the infinite line it lies on, so a segment does not have to be long enough to actually reach the contact point.
- A (any): the first thing the circle must touch or pass through.
- B (any): the second.
- C (any): the third.
- Radius (number, editable): a fixed radius, which replaces C. 0, the default, means no fixed radius.
- Circles (region): every circle that satisfies all three constraints, as a collection.
Three objects and no radius, or two objects plus a radius. A Radius above 0 counts as the third constraint; a radius of 0 is ignored. Fewer than three produces nothing at all rather than a guess.
An impossible ask also produces nothing rather than something wrong. Three collinear points have no circle through them, and a radius too small to reach both circles has no solution, so in both cases the output is empty.
Each solution is its own item, not one merged shape, so the list nodes work on it directly: Item at Index to pull one out, List Length to count them. Item at Index accepts negative indices, counting from the end, the same as everywhere else.
Solutions come out largest radius first, so the order stays predictable as the inputs move.
A worked example: feed the three sides of a triangle in as A, B and C and you get four circles, the three excircles first and the incircle last.
Counts worth knowing:
- two points plus a radius: two circles, one either side of the chord,
- two circles plus a radius: a mirrored pair,
- three points: exactly one, the circumcircle,
- three circles: up to eight.
< Previous: Circle: Center Radius | Next: Circle Tangent to... >
- Circle: 3 Points: the circumcircle, which is the three-point case of this node.
- Tangent: the tangent line from a point to a circle.
- In the modeling view: Circle: Apollonius draws the same circle by clicking three objects.
- Primitive nodes | Circles & arcs
