How far to move a circle along a ray so that it intersects with another circle only once?

89 Views Asked by At

Given two 2d circles that have intersected at two points, how do I find the distance along a ray that passes through the center of one of the circles so that when that circle is translated along that ray for that distance, the circles intersect exactly once?

Diagram

In the above image, I'm trying to find the distance between the green points. The information I have is: both centers and radii, and the ray direction vector.

Thanks!

Update: Here is a diagram with the known/unknown lengths and angles:

Diagram 2

In the triangle, the green line lengths are known and the green angle is known. The red ones are unknown. I thought about using the law of sines/cosines to solve for the angles, but it doesn't seem to me that I have enough information.

2

There are 2 best solutions below

0
On BEST ANSWER

Given the second diagram, let the angles be A, B and C and the lengths be a, b and c. Lengths a and b are known, and only the angle B is known. We want to find c. To do that, we first need to find A using the law of sines:

$A = \sin^{-1}(\sin(B) * \frac{a}{b})$

Now we can find c using the law of cosines. Since this is ambiguous, there will be two answers:

$c = b*\cos(A) \pm \sqrt{a^2+b^2*\cos^2(A)-b^2}$

To find which c is correct, I simply moved the circle and tested which b was closest to the sum of radii.

4
On

Hint: When the circles are tangent, the distance between their centers is the sum of the two radii. The Pythagorean Theorem should get you the rest of the way there.