How can I find the set of the centers of the circles on sphere that pass through 2 given points and have pretedermined radius, using spherical coordinates? Assume that the radius of sphere is $R$.
(Thanks for helping me to point out the circle is not unique. I think there are 2 such circles.)
Thank you for your help.



Call the two given points $P,Q$ and let $r$ be the radius of the circle. Moreover we may assume that the sphere is centred at $(0,0,0)$ and that $P = (0,0,R)$, and let's write the coordinates of $Q$ as $(q_x,q_y,q_z)$. We will denote by $M$ the radius of a great circle and by $d(A,B)$ the great circle distance between any two points $A,B$ on the sphere.
Now, clearly if $r > M$ or if $r < \frac{1}{2} d(P,Q)$ there can be no solution. On the other hand, if $r = \frac{1}{2} d(P,Q)$ there is exactly one circle through $P$ and $Q$, with centre at the midpoint between them.
Otherwise, observe that a circle is just the locus comprised of all points a fixed distance from a given point, therefore a solution is given by any of the points of intersection of the circles of radius $r$ and centre $P$ and $Q$, respectively. Note that this gives exactly two solutions unless $P$ and $Q$ are antipodal, in which case we must have $r = M$ and there are infinitely many solutions, whose locus is the great circle cut by the plane $z = 0$.
Instead of actually computing the equations of those two circles, though, it is easier to write down the equations of the planes $\pi_P$ and $\pi_Q$ that cut them. Then we just have to compute the intersection between those two planes and the sphere.
In order to do this, though, I am going to assume that we know how to compute the coordinates of a point $(x_P,y_P,z_P)$ on the sphere at distance $r$ from $P$, and those of a point $(x_Q,y_Q,z_Q)$ on the sphere at distance $r$ from $Q$. Why? Because the plane that cuts a circle with centre a given point on the sphere is orthogonal to the line through that point and the origin. This means that $$ \begin{gather} \pi_P \colon \;\; z = z_Q\\ \text{and}\\ \pi_Q \colon \;\; q_x x + q_y y + q_z z = q_x x_Q + q_y y_Q + q_z z_Q =: c_Q. \end{gather} $$ Therefore the coordinates of the centres to the circles through $P$ and $Q$ of radius $r$ are given by the system $$ \begin{cases} z = z_Q\\ q_x x + q_y y + q_z z = c_Q \\ x^2 + y^2 + z^2 = R^2 \end{cases} $$ and solving it boils down to solving a quadratic equation in one variable.