Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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