<s>[INST] How can I find the points at which two circles intersect? Given the radius and $x,y$ coordinates of the center point of two circles how can I calculate their points of intersection if they have any?
 [/INST] Easy solution is to consider another plane such that the centers are along an axis.
Given the points $(x_1,y_1)$ and $(x_2,y_2)$.
We focus on the center point of both circles given by
$$
\left( \frac{x_1+x_2}{2}, \frac{y_1+y_2}{2} \right).
$$
The distance between the centers of the circles is given by
$$
R = \sqrt{ (x_2-x_1)^2 + (y_2-y_1)^2}.
$$
We can consider the following orthogonal vectors
$$
\vec{a} = \left( \frac{x_2-x_1}{R}, \frac{y_2-y_1}{R} \right),
\vec{b} = \left( \frac{y_2-y_1}{R}, - \frac{x_2-x_1}{R} \right).
$$

In the $(\vec{a},\vec{b})$ plane we get the equations
$$
\big( a + R / 2 \big)^2 + b^2 = r_1^2,\\
\big( a - R / 2 \big)^2 + b^2 = r_2^2.
$$
Whence
$$
a = \frac{r_1^2 - r_2^2}{2R},\\
b = \pm \sqrt{ \frac{r_1^2+r_2^2}{2} - \frac{(r_1^2-r_2^2)^2}{4R^2}
- \frac{R^2}{4}}.
$$
The intersection points are given by
$$
(x,y) =
\frac{1}{2} \big( x_1+x_2, y_1+y_2 \big)
+ \frac{r_1^2 - r_2^2}{2R^2} \big( x_2-x_1, y_2-y_1 \big)\\
\pm \frac{1}{2} \sqrt{ 2 \frac{r_1^2+r_2^2}{R^2} - \frac{(r_1^2-r_2^2)^2}{R^4}
- 1} \big( y_2-y_1, x_1-x_2 \big),
$$
where $R$ is the distance between the centers of the circles.
 
</s>