# concentric circles, find point based on distance

Me: General low math skilled user here (basic stuff, nothing fancy).

I'm kinda stuck on the following problem.

Given data:
- 2 concentric circles:
-- with there centers at the same spot. (origin, (0,0,0))
-- with radius r1 and r2.
- a distance d.

Problem:
- finding point P? on circle 2 based on the distance d (from point->(x=r1, y=0).

The original problem was/is to reconstruct the relative cords/positions(3D) of 4 points by the distances between them. With this part I'm trying to get the relative cord of point 4 in relation to point 3. (The first part, getting cord on point 3, was mainly solved by finding the proper code that did the job for me. In case your wondering how I got this far.)

---Edits---

http://en.wikipedia.org/wiki/Trilateration

If you let P=(x,y) then $$x^2+y^2=R_2^2 \\ (x-R_1)^2+y^2 = d^2$$ subtract the second from the first to get $$2 R_1 x - R_1^2 = R_2^2 - d^2 \Rightarrow x = \frac{R_1^2+R_2^2-d^2}{2 R_1}$$ Substitute in the first to get $y$. You will get additional condition for $y^2 \ge 0$, i.e limits on $d$.
Sorry hit submit too soon. With $R_2 > R_1 > 0$ we need $$R_2 - R_1 \le d \le R_2+R_1$$
• I thought I gave the explicit formula. Once you have $x$ just use $y = \pm \sqrt{R_2 - x^2}$. Not sure why you can't make it work for you. – user44197 Feb 2 '14 at 3:08