Clairaut's relation for a great circle parametrized by $t$ is $r(t)\cos\gamma(t)=\text{Const}$ where $r$ is the distance to the $z$-axis and $\gamma$ is the angle with the latitude. The implicit equation of great circle in spherical coordinates $(\theta,\phi)$ is $\cot \phi= a\cos(\theta-\theta_0)$ where $\phi$ is the angle with the positive $z$-axis and $\theta$ is the usual angle of polar coordinates $(r,\theta)$ of the projection of the point to the $(x,y)$ plane.
What would be a reasonably short derivation of the latter from the former? The proof I am familiar with is somewhat roundabout and involves first developing a differential equation equivalent to Clairaut's relation, and then performing a clever trigonometric substitution to get the answer. Given the simplicity of the two relations there should be a more direct route to get from one to the other.