[Math] Project a point within a circle onto its edge.
circlesgeometrysecant
What's the simplest way to find the intersection point of a straight line drawn from a circle's origin through a given point within the circle through the edge of the circle. I'm looking for the intersection point of the line and the edge of the circle.
I give up! Any help is much appreciated!
Best Answer
If the radius is $R$, the origin is $(0,0)$ and the point is $(x,y)$, so the intersection point in polar coordinates is $(R,\arctan(\frac{y}{x}))$ and you can easily convert this to Cartesian.
The data of your problem is: $P=(a,b)$ outside point; $C=(c,d)$ center of circle; $r$ radius of circle. Let Q=(x,y) be your generic point and $D$ the searched distance. You have two equations to use:
$$(1)....( PQ)^2=(x-a)^2+(y-b)^2= D^2$$
$$(2)....(x-c)^2+(y-d)^2=r^2$$
Hence (1)-(2) gives $$D^2=2(c-a)x+2(d-b)y+a^2+b^2-c^2-d^2+r^2$$
Where $D$ is function only of $x$ and $y$ as must be answer.
Best Answer
If the radius is $R$, the origin is $(0,0)$ and the point is $(x,y)$, so the intersection point in polar coordinates is $(R,\arctan(\frac{y}{x}))$ and you can easily convert this to Cartesian.