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?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
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$.