# Find a circle on sphere using spherical distance

I have a sphere with radius $R$. On this sphere I also have a point $P_1$ written in spherical coordinates, so I know $\theta_1$, $\phi_1$ and $R$ for this point (same as on this picture). I also defined distance $D$ which represents spherical distance from given point.

Now I wish to calucalte $\Delta\theta$ such that point $P_2$ on coordinates $(R,\theta_1-\Delta\theta,\phi_1)$ will be on spherical distance $D$ from my point $P_1$. I would also like to calculate $\Delta\phi$ for point $P_3$ on coordinates $(R,\theta_1,\phi_1-\Delta\phi)$ so $P_3$ will be on spherical distance $D$ from my point $P_1$.

I suppose that your $D$ is the length of the great circle arc between two points $\mathbf{P_1}$ and $\mathbf{P_2}$.
Let $\delta$ the angle subtended by the arc. We have, by definition of the dot product: $$\cos \delta=\cos \left(\frac{D}{R} \right)=\mathbf{P_1}\cdot\mathbf{P_2}$$ If $$\mathbf{P_1}=(R,\theta_1,\phi_1) \qquad \mathbf{P_2}=(R,\theta_2,\phi_2)$$ witha bit of calculations we find: $$\cos \delta=\cos\theta_1\cos\theta_2+\sin\theta_1\sin\theta_2\cos\left(\phi_1-\phi_2\right)$$ Now you can use this formula to solve your problem. Note that in the case $\theta_2=\theta_1-\Delta \theta$ and $\phi_2=\phi_1$, the solution is simply $\delta=\Delta \theta$, because the two angles are measured on the same great circle, but in the other case the solution is less simple $\Delta \phi$ is not on a great circle.