I am trying to draw geodesics on a sphere. While many approaches, like for example this one, i am more interested in another way. If i specify two points, say qand p on the Sphere, i would like to join them by a geodesic, i.e. arc. Whether thats the longer or shorter arc, might be a problem for further stuff, i managed to do the following
\documentclass[a4paper]{standalone}
\usepackage{tikz,tikz-3dplot}
\tikzstyle{point}=[inner sep=0pt, outer sep=0pt,%
minimum size=2pt,fill=black,shape=circle]
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}
\begin{scope}[tdplot_main_coords]
%draw sphere
\tdplotsphericalsurfaceplot{72}{36}{1}{black!75!white}{blue!20!white}%
{\draw[color=black,thick,->] (1,0,0) -- (1.5,0,0) node[anchor=north east]{$x$};}%
{\draw[color=black,thick,->] (0,1,0) -- (0,1.5,0) node[anchor=north west]{$y$};}%
{\draw[color=black,thick,->] (0,0,1) -- (0,0,1.5) node[anchor=south]{$z$};}%
% draw geodesics
\tdplotdefinepoints(0,0,0)(0.7071,-0.7071,0)(0,0.7071,0.7071)
\tdplotdrawpolytopearc[thick,red!50!black]{1}{}{}
\tdplotdefinepoints(0,0,0)(0.7071,-0.7071,0)(0.7071,0.7071,0)
\tdplotdrawpolytopearc[thick,blue!50!black]{1}{}{}
\tdplotdefinepoints(0,0,0)(0.7071,0.7071,0)(0,0.7071,0.7071)
\tdplotdrawpolytopearc[thick,green!50!black]{1}{}{}
%draw point
\tdplotsetcoord{P}{1}{30}{60}
\node[point,label={0:\(p\)}] at (P) {};
\end{scope}
\end{tikzpicture}
\end{document}
which yields

and leads me to my two questions:
1) I would like to be able to specify both “spanning” points (the second and third of \tdplotdefinepoints in polar coordinates. It would be enough, to have a function performing theta,phi into px,py,pz, similar to the function used for the point P. Or maybe one could also kind of extract these coordinates from a label; is either of that possible?
2) when drawing an arc, is there a possibility – similar to the usual \draw to access the mid point? It would be enough to be able to place a node (with style) and label there, otherwhise a \coordinate would of course do the job, too. Any ideas on how to get that?
