# Calculating two points on two different circumference of circle

Given the center point[(x1, y1), (x2, y2)], the radius(r1, r2), how to calculate the coordinate of two points on the circumference of circle?

I have drawn a picture, the two points marked as red in following picture.

Do you know how to calculate the distance $d$ between the two points?

It is $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$

Once you have the distance, you can calculate $xr_1 =x_1+(x_2-x_1)\frac{r_1}{d}$ and $yr_1 =y_1+(y_2-y_1)\frac{r_1}{d}$

Similarly $xr_2 =x_2-(x_2-x_1)\frac{r_2}{d}$ and $yr_2 =y_2+(y_2-y_1)\frac{r_1}{d}$

Where $(xr_1,yr_1)$ is the first red point.

The reasoning is that when traveling from point 1 to point 2, you would travel a distance of $d$. When you have traveled $r_1$, you have traveled $\frac{r_1}{d}$ of the trip, so it reasons that the x and y values will have added that portion of their total change as well.

• It gives a bad result. the first point is correct, but the second is wrong. – towry Feb 14 '15 at 9:04
• I have figured it out, the second one should be xr2 = x2 + (x1 - x2) * r2/d Thanks! – towry Feb 14 '15 at 9:57

Let:-

(1) the circles be $P(x, y)$ be $[A(x_1, y_1), r_1]$ and $[B(x_2, y_2), r_2]$;

(2) $AB = d$, a calculated quantity;

(3) the required point on first circle = $P(x, y)$.

Then $P$ divides $AB$ internally in the ratio $r_1 : d – r_1$.

Therefore, by section formula, $x = \frac {(r_1)(x_2) + (d – r1)(x_1)}{d}$.

Other unknown can be found similarly.