# Finding the coordinates of a moving point along the surface of a sphere.

I am trying to do some simulation of the binomial point process, and I want some help with the following problem. I am trying to find a formula for the final coordinates of a moving point on the surface of a sphere of radius $$R$$. For simplicity, we assume the center of the sphere is the origin (0,0,0). Assume the initial coordinates of the point are $$(R,\theta_0,\phi_0)$$ in spherical coordinate system. Then, the point moves a distance $$d$$ along the surface of the sphere, so this displacement is not a straight line, but rather an arc along the surface. The direction of the movement is taken with respect to a reference point at coordinates $$(R,0,0)$$. For illustration see the following figure, let's say the initial point is $$P1$$, then it moves along the surface a distance $$d$$ at an angle $$\alpha$$ with respect to the arc connecting the reference point and $$P1$$. Given the coordinates of P1 are $$(R,\theta_0,\phi_0)$$, what are the coordinates of $$P2$$ in terms of $$\alpha$$ and $$d$$?

[illustration][1]

Edit: I have done the following. If we assumed the initial point $$P1$$ is the same as the reference point $$(R,0,0)$$, then we can find the final coordinates and lets call it $$P2'$$. $$P2'$$ will be on the outer margin of a spherical cap. To generalize for any initial point $$P1$$, we find what is the rotation matrix $$R=R_x(\alpha)R_y(\beta)R_z(\gamma)$$ that will move the point $$(R,0,0)$$ to $$P1$$ (see [reference][2]). This is done by solving a system of non-linear equations, which I want to avoid. Then, we apply that same rotation matrix on the point $$P2'$$.

• What have you tried to solve your problem? Commented Feb 20 at 22:13

The standard directions at any point $$P_1( R , \theta_0, \phi_0)$$ on the surface of the sphere are

$$u_1 = \begin{pmatrix} - \sin \phi_0 \\ \cos \phi_0 \\ 0 \end{pmatrix}$$

$$u_2 = \begin{pmatrix} - \cos \theta_0 \cos \phi_0 \\ - \cos \theta_0 \sin \phi_0 \\\sin \theta_0 \end{pmatrix}$$

The reference direction from which $$\alpha$$ is measured is $$u_2$$, clockwise. Therefore, the direction along which $$P_2$$ is located is

$$u = u_2 \cos \alpha + u_1 \sin \alpha$$

Now we have to assume that the center of rotation for motion of the moving point (which is actually rotating) is the center of the sphere. This means that the moving point is moving along a great circle of the sphere. A great circle of the sphere is any circle that lies on the surface of the sphere that has its center the center of the sphere.

To parametrize the arc of motion of $$P$$, we note that it is spanned by $$u$$ (the tangential vector) and $$r$$ (the radius vector). These two vector are orthogonal, and $$r$$ is given by

$$r = \begin{bmatrix} \sin \theta_0 \cos \phi_0 \\ \sin \theta_0 \sin \phi_0 \\ \cos \theta_0 \end{bmatrix}$$

Therefore, moving away from $$P_1$$ by an angle $$\phi$$, gives point $$P$$ as follows:

$$P = R \bigg( \cos \phi \ r + \sin \phi \ u \bigg)$$

To get $$P = P_2$$ set the value of angle $$\phi = \dfrac{d}{R}$$.

• I have been trying to implement this method but I always get the same great circle. I consider a unit sphere, and the starting point to be $P_1(R=1, \theta_0=\pi/2, \phi_0=0)$ ($(1,0,0)$ in Cartesian). Then, I chose $\alpha=\pi/2$. Varying $d$ from 0 to $2\pi$, the resulting great circle does not pass through $P_1$, and no matter what $\alpha$ I choose it is always the same great circle. Commented Mar 3 at 19:11
• Sorry for that, I just discovered my mistake, and corrected it. Please try the new solution, it should work. Commented Mar 4 at 16:56
• Yes, I think now it works as I intended. Thank you so much! Commented Mar 4 at 18:15