# Can you formulate a $\phi, \theta$ restriction in spherical coordinates for a great circle?

Further to this question

Quaternion rotation has a nice property that you can trace any great circle you like. You specify the axis of rotation, and you will automatically follow the great circle when rotating.

However spherical coordinates only trace a great circle when $\theta (elevation) = 0$, and $\phi (azimuth)$ is allowed to travel $0.. 2\pi$.

So my question is, is there a way to formulate a $\theta, \phi$ restriction that will allow me to trace an arbitrary great circle in spherical coordinates?

-
There are at least two ways to start with constructing the parametric equations of a great circle: one involves finding the plane through the origin where your great circle lies in, and the other involves finding two points where your great circle passes through. – J. M. Oct 23 '11 at 2:01
Do you have a little more detail? I've got 4 points in each plane, so can do both! – bobobobo Oct 23 '11 at 2:05

Since you've got four points in the plane of the great circle, you can find its normal $n$. Then the equation for the spherical coordinates is simply
$$\pmatrix{\sin\theta\cos\phi\\\sin\theta\sin\phi\\\cos\theta}\cdot n=0\;.$$
If you like, you can solve this for $\theta$ in terms of $\phi$:
$$\theta=-\arctan\left(\frac{n_z}{n_x\cos\phi+n_y\sin\phi}\right)\;,$$
where you have to add $\pi$ to negative values if you want $\theta$ in the usual range $[0,\pi]$.