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 :).

Here is a partial answer, if you don't mind a bit of linear algebra.
Let $u_1$ and $u_2$ be the vectors from the center of the sphere to $P_1$ and $P_2$ respectively. These vectors have length $R$. The points you are looking for will each correspond to vectors of length $R$ as well; let us call either of them $x$.
So you want a vector $x$ of length $R$ so that $$u_i\cdot x=R^2\cos\theta$$ for $i=1,2$. Here $\theta$ is the angle of the cone defined by the center of the spehere and the circle of radius $r$. (The exact value depends on whether $r$ is measured along the surface of the sphere or in the plane spanned by the circle.)
Writing $x=x_1u_1+x_2u_2+x_3u_3$, where $u_3$ is a suitable vector orthogonal to $u_1$ and $u_2$ (for example their cross product), you get two linear equations from the above equation. These involve only $x_1$ and $x_2$, so you get a unique solution. Then $x_3$ can be found from the requirement that the length of $x$ be $1$. There will be two solutions to this, a simple quadratic equation.
While carrying out the detailed calculations, don't forget that $u_1$ and $u_2$ are not orthogonal.
