I have thought some time about writing a program that tells me if three circles with given diameters can fit inside a triangle with given side lengths without overlapping (touching is ok) each other.
How would one think about doing that?
Every triangle has three distinct excircles, each tangent to one of the triangle's sides. . Because the internal bisector of an angle is perpendicular to its external bisector, it follows that the center of the incircle together with the three excircle centers form an orthocentric system.
The largest circle which fits inside a triangle just touching the three sides of the triangle is called the inscribed circle or incircle. This article is about triangles in which the lengths of the sides and the radii of the inscribed circles are all whole numbers.
Given A, B, and C as the sides of the triangle and A as the area, the formula for the radius of a circle circumscribing a triangle is r = ABC / 4A, and for a circle inscribed in a triangle is r = A / S where S = (A + B + C) / 2.
I would try to find some way to enumerate the possible configurations for the three circles, and then test each configuration until one is found where the three circles fit, or until all configurations have been tested and rejected.
(In what follows I am assuming that each circle is known to fit in the triangle by itself. Obviously if any circle fails to fit by itself then it fails to fit in any configuration of three circles.)
Configuration (1) involves putting a circle in each corner of the triangle. (This is the configuration that everyone spotted.)
There are six ways to arrange the circles, and for each arrangement it sufficient to check whether the circles will fit pairwise:
The distance AS₁ is r₁/tan(½α), the distance S₂B is r₂/tan(½β), and the distance S₁S₂ is √((r₁ + r₂)² − (r₁ − r₂)²) = 2√r₁r₂
The circles fit if AS₁ + S₁S₂ + S₂B ≤ AB.
In configuration (2) we place two circles into two of the corners of the triangle, and the third circle between these two and one of the two edges that's not touching both circles:
Figuring out whether these will fit is a bit more complex:
To find the length AS₁ we have to walk round the triangle from corner C via the point T. I'll leave the details of this as an exercise.
There are eighteen ways to arrange the circles into this configuration.
Is there a configuration (3)? I looked but couldn't find one that couldn't be turned into one of the two I gave. For example, if all three circles touch the same side then there's always room to swap the middle circle over to the opposite side, getting configuration (2). However, enumeration of geometric configurations is always tricky and I could easily have missed one.
Just a guess: your problem could be related to that of Appolonius's circles.
I ran into it while trying to fit recursively 3 circles within a 4th one without any intersection for some fractal animation, so it may be worth a try.
You'll find it explained in length at Wolfram (this problem was solved only in 1968): http://mathworld.wolfram.com/ApolloniusProblem.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With