Project a point within a circle onto its edge.

4.8k Views Asked by At

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.

enter image description here

I give up! Any help is much appreciated!

4

There are 4 best solutions below

0
On 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.

0
On

If you are describing the points using polar coordinates $(\theta,r)$, then this is quite simple. If the given point has a $\theta$-coordinate of $\theta_1$, then the intersection has coordinates $\theta=\theta_1$ and $r=$the radius of the circle (which I assume is also given).

If you are using standard $(x,y)$ coordinates, you would convert the $x,y$ values of the given point into polar coordinates using the following equations: $$r=\sqrt{x^2+y^2}$$ $$\theta=arccos({x\over r})=arcsin({y\over r})$$ You would then find the polar coordinates for the intersection point the way that I mentioned earlier ($\theta=\theta_1$ and $r=$the radius of the circle).

Once you have the polar coordinates, you would convert them back into $x,y$ coordinates using the following equations: $$x=rcos\theta$$ $$y=rsin\theta$$

0
On

I get you can work in a coordinate system... If it's cartesian you only need to use multiplication, sum, division and square root.

Let's assume the origin of coordinates is the same as the center of the circle, and that you have to find $\vec{w}$ when $\vec{v}$ is known:

$$ \vec{v}=(x,y)\\ |\vec{v}|=\sqrt{x^2+y^2} $$

Vector $\vec{w}$ is parallel to $\vec{v}$, so:

$$ \vec{w}=a\vec{v}=(ax,ay) $$ for some $a > 1$ (because the starting point is internal). The modulus of $\vec{w}$ is equal to the radius $R$: $$ R=|\vec{w}|=\sqrt{a^2(x^2 + y^2)}=a\sqrt{x^2+y^2}=a|\vec{v}| $$ which allows us to solve for $a$ and eventually calculate $\vec{w}$: $$ a=\frac{R}{|\vec{v}|} \\ \vec{w}=\frac{R}{|\vec{v}|}\vec{v}=(\frac{Rx}{\sqrt{x^2+y^2}},\frac{Ry}{\sqrt{x^2+y^2}}) $$

You can also think in terms of unit vector:

$$ \hat{v} = \frac{1}{|\vec{v}|}\vec{v}\\ \vec{w} = R\hat{v} = \frac{R}{|\vec{v}|}\vec{v} $$

0
On

If the circle is $(x-a)^2+(y-b)^2 = r^2 $, and the point is $(u, v)$, then the line through $(a, b)$ and $(u, v)$ is $\dfrac{y-b}{x-a} =\dfrac{v-b}{u-a} $.

If this point is on the circle, then $y-b =\dfrac{(x-a)(v-b)}{u-a} $ and $(x-a)^2+(y-b)^2 = r^2 $.

Substituting the first equation into the second, $r^2 =(x-a)^2+(\dfrac{(x-a)(v-b)}{u-a})^2 =(x-a)^2(1+(\dfrac{v-b}{u-a})^2) =(x-a)^2(\dfrac{(u-a)^2+(v-b)^2}{(u-a)^2}) $, so that $(x-a)^2 =r^2\dfrac{(u-a)^2}{(u-a)^2+(v-b)^2} $, or $x =a \pm r\dfrac{u-a}{\sqrt{(u-a)^2+(v-b)^2}} $.

From this, you can get $y$.

Two values are expected, since a line through the center intersects the circle in two points.