I'm working on an art project where I have a set of circles. I grow each circle around its center until it touches another circle. Once 2 circles touch, the point of contact remains fixed and they grow away from each other.
Now I'm working on dealing with 1 circle touching 2 others. Once they are actually touching, I can continue to grow them properly, but finding the proper parameters to get them to touch at exactly one point is proving tricky for me.
What's happening is that 2 circles are growing apart from one another. I expand the radius of one of them (and move it's center), but find that it's now overlapping a 3rd circle (that is, it intersects the 3rd circle at 2 points instead of 1). I'd like to back off the center and radius until it's touching the 3rd circle at exactly 1 point while still touching the 2nd circle at exactly 1 point.
Here are some pictures to make it more clear. Circle A is stationary at the moment, Circle B has just been expanded, and it now overlaps Circle C. I'd like to move Circle B's center along line AB and change its radius until it just touches Circle A and Circle C at a single point each.
How can I do that? I feel like there's some system of equations I could solve to find the proper center and radius, but my attempts at creating the proper system of equations always end up with 2 equations and 3 unknowns.
The circles can be of arbitrary size and may not be as nearly equally sized as in the above image.