from http://www.texample.net/tikz/examples/the-3dplot-package/ I'm trying to draw with tikz a differential volume element in spherical coordinates. I do not know how to draw the four arcs between the two planes \phi and \phi + d \phi
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage[active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\begin{document}
%Angle Definitions
\tdplotsetmaincoords{60}{110}
\pgfmathsetmacro{\rvec}{.8}
\pgfmathsetmacro{\thetavec}{30}
\pgfmathsetmacro{\phivec}{55}
\pgfmathsetmacro{\dphi}{-8}
\pgfmathsetmacro{\dtheta}{8}
\pgfmathsetmacro{\drvec}{0.15}
\begin{tikzpicture}[scale=5,tdplot_main_coords]
%-----------------------
\coordinate (O) at (0,0,0);
\pgfmathsetmacro{\Rvec}{\rvec+\drvec}
\pgfmathsetmacro{\Thetavec}{\thetavec+\dtheta}
\pgfmathsetmacro{\Phivec}{\phivec+\dphi}
\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
\tdplotsetcoord{P1}{\Rvec}{\thetavec}{\phivec}
\tdplotsetcoord{P2}{\Rvec}{\Thetavec}{\phivec}
\tdplotsetcoord{P3}{\rvec}{\Thetavec}{\phivec}
\tdplotsetcoord{Q}{\rvec}{\thetavec}{\Phivec}
\tdplotsetcoord{Q1}{\Rvec}{\thetavec}{\Phivec}
\tdplotsetcoord{Q2}{\Rvec}{\Thetavec}{\Phivec}
\tdplotsetcoord{Q3}{\rvec}{\Thetavec}{\Phivec}
%draw figure contents
%--------------------
%draw the main coordinate system axes
\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$};
%draw a line from origin to point (P)
\draw[,color=red] (O) -- (P)
;
\draw[,color=red] (O) -- (P2);
\draw[color=red] (O) -- (P3);
\draw[dashed, color=red] (O) -- (Pxy);
\draw[dashed, color=red] (P) -- (Pxy);
%
\draw[dashed, color=red] (O) -- (P2xy);
\draw[dashed, color=red] (P2) -- (P2xy);
%draw a line from origin to point (Q)
\draw[,color=red] (O) -- (Q);
\draw[,color=red] (O) -- (Q2);
\draw[color=red] (O) -- (Q3);
%\draw[,color=red] (P) -- (P1) --(P2) --(P3)--(P);
%draw projection on xy plane, and a connecting line
\draw[dashed, color=red] (O) -- (Qxy);
\draw[dashed, color=red] (Q) -- (Qxy);
%
\draw[dashed, color=red] (O) -- (Q2xy);
\draw[dashed, color=red] (Q2) -- (Q2xy);
\pgfmathsetmacro{\Rproj}{\Rvec*sin(\Thetavec)}
\draw (Pxy) -- (Qxy);
\tdplotdrawarc[-latex]{(O)}{0.3}{0}{\phivec}{anchor=north}{$\phi$}
\tdplotsetthetaplanecoords{\phivec}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.5}{0}{\thetavec}{anchor=south west}{$\theta$}
\draw[dashed,tdplot_rotated_coords] (\rvec,0,0) arc (0:90:\rvec);
\draw[dashed,tdplot_rotated_coords] (\Rvec,0,0) arc (0:90:\Rvec);
\draw[tdplot_rotated_coords,blue,fill=blue!30] (P) -- (P1) arc (\thetavec:\Thetavec:\Rvec) -- (P3) arc (\Thetavec:\thetavec:\rvec);
\draw[dashed] (\rvec,0,0) arc (0:90:\rvec);
\draw[dashed] (\Rvec,0,0) arc (0:90:\Rvec);
\tdplotsetthetaplanecoords{\Phivec}
\draw[dashed,tdplot_rotated_coords] (\rvec,0,0) arc (0:90:\rvec);
\draw[dashed,tdplot_rotated_coords] (\Rvec,0,0) arc (0:90:\Rvec);
\draw[tdplot_rotated_coords,blue,fill=blue!30,opacity=0.3] (Q) -- (Q1) arc (\thetavec:\Thetavec:\Rvec) -- (Q3) arc (\Thetavec:\thetavec:\rvec);
\end{tikzpicture}
\end{document}