# How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows annotating \Phi, \Theta, etc.

Can someone tell me if, and how, this can be done in latex (I am a fairly familiar with LaTeX for typesetting text but a novice when it comes to PSTricks and co.)!

• Welcome to TeX.SX! You may have a look on our starter guide. You should look up the tikz-3dplot documentation, which contains a number of relevant examples. May 26, 2013 at 12:41
• @Chris Take a look at texample.net/tikz/examples/the-3dplot-package
– user13907
May 26, 2013 at 12:43
• May 26, 2013 at 13:23
• Here is a question I asked about spherical coordinates which may be helpful as well: spherical coordinates in tikz May 26, 2013 at 15:41

Here is an embryonic tikz-3dplot solution, adapted from the example on p26 of the manual:

\documentclass{article}

\usepackage{tikz}
\usepackage{tikz-3dplot}

\begin{document}
\tdplotsetmaincoords{60}{110}
%
\pgfmathsetmacro{\rvec}{.8}
\pgfmathsetmacro{\thetavec}{30}
\pgfmathsetmacro{\phivec}{60}
%
\begin{tikzpicture}[scale=5,tdplot_main_coords]
\coordinate (O) at (0,0,0);
\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
\draw[-stealth,color=red] (O) -- (P) node[above right] {$P$};
\draw[dashed, color=red] (O) -- (Pxy);
\draw[dashed, color=red] (P) -- (Pxy);
\tdplotdrawarc{(O)}{0.2}{0}{\phivec}{anchor=north}{$\phi$}
\tdplotsetthetaplanecoords{\phivec}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.5}{0}%
{\thetavec}{anchor=south west}{$\theta$}

\end{tikzpicture}
\end{document}

• Wow, thank you guys for your fast and excellent help! My question is fully solved! May 27, 2013 at 7:24