Given 2 overlapping circles, and a given line, how can i find a pair of points such that the line fits between them?

96 Views Asked by At

This is hard to explain so ill attach visuals,

I have the the general equations 2 circles, i.e

$$ (x-x_1)^2 + (y-y_1)^2 = r_1^2 $$ $$ (x-x_2)^2 + (y-y_2)^2 = r_2^2 $$

and it's given that they overlap.

How can i find the pair of points (one on either circle) such that a line of some specified length $d$ and some specified angle of rotation $R$ passes through these points?

The example image depicts the 2 circles, and the black line connecting them. To clarify, the length of the black line and its angle to the X axis are to be the given variables, how can i find the pairs of points on the red and blue circles that fits the defined line?

Diagram of what i mean

1

There are 1 best solutions below

0
On BEST ANSWER

Let the two circles be $\Gamma_1$ and $\Gamma_2$. The given length and angle define up to sign a vector $v$ pointing from $p_1\in\Gamma_1$ to $p_2\in\Gamma_2$. It is clear upon translating $\Gamma_2$ by $-v_2$ that the desired pairs of points $(p_1,p_2)$ correspond to intersections of $\Gamma_1$ and $\Gamma_2-v_2$.

Thus, to find all pairs of points, translate $\Gamma_2$ by $\pm v$, find the intersections $p$ of $\Gamma_1$ and the translated $\Gamma_2$ and return for each $p$ $(p,p\mp v)$.