Intersection of chord with circle knowing the length and a point

Let's take a circle with radius R, and center in O (0, 0). We take on this circle a point A with coordinates xA and yA.

We know that point A is one of the endings of a chord with length l.

Which is the easiest method to find the intersections points with circle B and C, knowing this information?

Basically I think that the following sistem has to be solved in x and y.

\begin{matrix} l = \sqrt{(x_A - x)^2 + (y_A - y)^2}\\ x^2 + y^2 = R^2& \end{matrix}

See my drawing bellow, too. It's just an example. The great circle

I will give special thanks for who will solve this problem. It's a project for computer science that I will make it open source, when will it be finished.


Solution 1:

And, the project is open source!

Sure, it's not finished but, it starts working.

Follow it on Github: https://github.com/IonicaBizau/circular-mirror

Thank you for @mixedmath's suggestion: "You are essentially asking how to find the intersection points of two circles, right?" (link)

A screen shot with the app:

enter image description here

Any suggestions are appreciated.

Solution 2:

If you know $\angle{CAB}$, then you should be able to find $\angle{BOC}$ using the fact that (angle at circumference is half angle at centre): $$\angle{CAB} = 0.5\angle{BOC}$$

Say the lowest point of the circle is X. $\angle{COX} = 0.5\angle{BOC}$ (by symmetry). Now, the coordinates $(x_C,y_C)$ simply become: $$x_C = R\sin{\angle{COX}}$$ $$y_C = -R\cos{\angle{COX}}$$

Similarly, for $(x_B,y_B)$: $$x_B = -R\sin{\angle{BOX}}$$ $$y_B = -R\cos{\angle{BOX}}$$

Those are derived from: $$\sin(A) = \frac{Opp}{Hyp}$$ $$\cos(A) = \frac{Adj}{Hyp}$$

Solution 3:

Your approach is fine. I will use $L$ as the lower case looks too much like a $1$ You have $$L^2=(x_A-x_B)^2+(y_A-y_B)^2\\ x_B^2+y_B^2=R^2\\L^2-R^2-x_A^2-y_A^2=-2x_Ax_B-2y_Ay_B\\x_B=\frac 1{2x_A}(-2y_Ay_B+R^2+x_A^2+y_A^2-L^2)$$

Now square that, equate it to $R^2-y_B^2$ and you have a quadratic in $y_B$

An alternate approach is to use polar conversion. The angle at the center that the chord represents is $2 \arcsin \frac L{2R}$. So find the angle that $A$ is at, using ATAN2$(x_A,y_A)$ add and subtract the angle of the chord, and convert back to rectangular by $x = R \cos \theta, y=R \sin \theta$ This is certainly easier to program.