Finding circle of a sphere through two points We have two points $P_1, P_2$ on a sphere $S$ of radius $R$. Suppose for $r \ll R$, the distance between $P_1$ and $P_2$ is less than $2r$. 
Then, $P_1$ and $P_2$ both lie on exactly two  radius-$r$ circles of the sphere. This is clear: of the set of planes that contain $P_1$ and $P_2$, there are two of those planes that intersect $S$ to form a circle with radius $r$. 
Given $P_1$, $P_2$, $R$ and $r$, how can I calculate the centers of these two circles?
I would prefer to do as little messy spherical geometry as possible :).

Let $M$ be the midpoint of $P_1 P_2$ and $O_1,O_2$ the centres of the circles of radius $r$ through $P_1$ and $P_2$. Let $O$ be the centre of the sphere and $N$ the intersection between the ray $OM$ and the sphere. Let $2x$ be the distance between $P_1$ and $P_2$. By the Pythagorean theorem, we have:
$$ O_1 M = O_2 M = \sqrt{r^2-x^2},\qquad OM=\sqrt{R^2-x^2}$$
and since $OO_1=R$, we know the side lengths of $OO_1 M$ and $OO_2 M$. Using the cosine theorem is now easy to find the distance between $O_1$ and the $OM$-line, hence the distance between $O_1$ and $O_2$.
