0
$\begingroup$

given a line segment with endpoints P1 and P2 and a Circle with Center C and Radius R where it is known that P1 lies outside the circle and P2 lies inside the circle, what is an efficient way to find the intersection point between the two, P3?

$\endgroup$
0
$\begingroup$

The line between $P_1$ and $P_2$ is given by $(1-t)P_1 + tP_2$, where $t$ is a real variable. The points in between $P_1$ and $P_2$ correspond values of $t$ between $0$ and $1$. One can find the point $P_3$ by solving $\|(1-t)P_1 + t P_2 - C\|^2 = R^2$ for $t$. This is a simple quadratic equation in $t$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.