79616376

Date: 2025-05-11 10:17:23
Score: 1
Natty:
Report link

The centers of 3 tangent circles constitute a triangle.

To simplify the explanation, we set our circles in a referential which help us, then it will be up to you to reorient according your real position.

Circle radiuses are named r1,r2 and r3.

Consider that circle 1 and 2 are on an horizontal line and coordinate of the first circle are [0,0] and the second circle are [c,0].

There are two solutions in mirror, third circle tangent on the bottom or the top of the others.

We choose to tangent on bottom to have the third triangle point on top.

The left side of the triangle length which we call ‘b’ is equal to r3-r1.

The right side of the triangle length which we call ‘a’ is equal to r3-r2.

Now to position the c3 center, we shall calculate one of the triangle angle.

This problem is known under the ‘law of cosines’ (see Wikipedia page on the topic)

The angle between the c side (horizontal) and b side (left) will be named ‘alpha’.

alpha = arccos ((b^2+c^2-a^2)/2bc) .

Now, to have the position of the third triangle, do simple trigonometry:

Third circle coordinates = [b cos(alpha), b sin(alpha)].

I did tested the stuff on OpenScad for my own use (finding this thread was of great help), just using rotation instead of trigonometric references.

Reasons:
  • RegEx Blacklisted phrase (1): help us
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Pierre