Finding the second intersection point of a line on a circle.

138 Views Asked by At

I am trying to find the second intersection point of a line on a circle. I have draw a picture for reference.

Rough Draft

Given the drawing, I have a known radius circle. We can assume the circle is located at (0, 0). Angle t is also known (for this example we can say it is 20 degrees). Given the above, (X, Y) is also known (radius, 0). With the given information, I need to find (X', Y'). Any help (or a point in the right direction) would be greatly appreciated.

Also of the research I have done has yielded results that are directed at find where a line intersects a circle (both points) and I am not able to extrapolate what I need from the examples.

It is also worth mentioning that I am a software developer, not a mathematician. If I have left something out or make incorrect assumption or notations, I apologize and please let me know.

3

There are 3 best solutions below

2
On BEST ANSWER

Connecting $X',Y'$ to the center creates an iscoceles triangle.

The angle at $(X',Y')$ is also $t$

Which makes the angle at the center $180-2t$

In Trig we like to orient ourselves such that angles into QIV are negative.

We should call the angle at the center $2t-180$

$(X',Y') = r\cos (2t-180), r\sin (2t-180)$

And we have an identities that say $\cos (180 + x) = \cos -x,\sin (180 + x) = \sin -x$

$(X',Y') = r\cos (-2t), r\sin (-2t)$

enter image description here

2
On

One can view this problem as a simultaneous equation problem, where the two equations to solve are the equation of the circle (with centre at the origin and radius $r$): $$x^2+y^2=r^2$$ and the equation of the line $$y-y_1=m(x-x_1)$$ To match your notation, I'll denote the known points as $(X,Y)$ and the points to be found as $(X',Y')$. The equations are $$X'^2+Y'^2=r^2$$ $$Y'-Y=m(X'-X)$$ The value of $m$ is the gradient of the line, which you know because you know the angle $t$. The gradient of the line is $$m=\tan t$$ Then solve the system as a pair of simultaneous equations.

1
On

I think this is easiest if you use the fact that you can plot any point $(x,y)$ on a circle with center $(a,b)$ using something like the following equations: \begin{align} x &= a + r \cos\theta,\\ y &= b + r \sin\theta, \end{align} where $\theta$ is the direction angle from the center to the desired point and $r$ is the radius of the circle.

I say the equations are "something like" this because you might be measuring the direction angle clockwise or counterclockwise, some applications have different "zero angle" directions, and sometimes the axes are different (for example, the $y$ axis points downward instead of upward). The equations above are for an angle measured counterclockwise from the positive $x$ axis, with the $x$ axis pointing rightward and the $y$ axis pointing upward. As long as the angle is measured from one of the axial directions, however, the correct equations are some variation of the above: either as written, or swapping $\sin$ and $\cos$ functions, and/or changing one or the other of the $+$ operators to $-$. If you can get the correct answers for the angles zero and $90$ degrees then you know you have the correct variation of the equations for your application.

So let's say the "zero" direction angle is from $(a,b)$ to $(X,Y).$ Now consider the triangle with the three vertices $(a,b),$ $(X,Y),$ and $(X',Y').$ It is an isosceles triangle with angle $t$ at each of the vertices $(X,Y),$ and $(X',Y')$; therefore the angle at $(a,b)$ is $180 - 2t \text{ degrees}$ (assuming you measured the angle $t$ in degrees).

Not knowing exactly how your application maps coordinates to the plane, I'll assume your $y$ axis points upwards. But the angle $180 - 2t \text{ degrees}$ would be measured clockwise in the figure you drew. You have stated that $a = 0$ and $b = 0$ in this figure. Also, most computer libraries with sine and cosine functions expect the angle to be given in radians rather than degrees. Under these assumptions, the particular equations to find the point you want would be \begin{align} X' &= r \cos\theta,\\ Y' &= -r \sin\theta \end{align} where $\theta$ is $180 - 2t$ converted from degrees to radians.