TITLE: Finding a point having the radius, chord length and another point
QUESTION [5 upvotes]: Me and a friend have been trying to find a way to get the position of a second point (B on the picture) having the first point (A), the length of the chord (d) and the radius (r).
It must be possible right? We know the solution will be two possible points but since it's a semicircle we also know the x coordinate of B will have to be lower than A and the y coordinate must be always greater than 0.
Think you can help?
Here's a picture to illustrate the example:

Thanks in advance!

REPLY [3 votes]: I prefer a trigonometric approach.

Points $A$ and $B$ on an origin-centered circle of radius $r$ can be represented as
$$A := (r \cos\alpha, r \sin\alpha) \qquad B := (r\cos\beta, r\sin\beta)$$
for angles $\alpha$ and $\beta$ as shown in the image.
Now, simply note that $\beta = \alpha - \theta$, where (as shown below) $\theta = 2\;\mathrm{asin}\frac{d}{2r}$, to get the location of $B$.

The formula for $\theta$ follows from the Law of Cosines:
$$d^2 = r^2 + r^2 - 2 r^2 \cos\theta = 2 r^2 ( 1 - \cos\theta) = 4 r^2 \sin^2\frac{\theta}{2} = \left( 2 r \sin\frac{\theta}{2} \right)^2$$
Therefore, $d = \pm 2 r \sin\frac{\theta}{2}$, although we can take the "$\pm$" to be "$+$". This gives $\theta = 2 \;\mathrm{asin}\frac{d}{2r}$, as claimed.