4

I would like to draw a scattering experiment. For this purpose I need to draw the band of a sphere. It seems rather complicated and my basic tikz skills are sadly not enough. If somebody has an input for me, please let me know.

enter image description here

EDIT: I achieved the drawing of the spherical band using latitudes and rotating the picture 90 degrees. But how can I do the filling between the two latitudes like in my sketch?

     \begin{tikzpicture}

     \newcommand\latitude[1]{%
     \draw[dashed] (#1:2) arc (0:-180:{2*cos(#1)} and {0.25*cos(#1)}); 
     \draw (#1:2) arc (0:180:{2*cos(#1)} and {0.25*cos(#1)});
     }

    \begin{scope}[rotate around={90:(8,0)},shift={(8,0)}] 
    \draw[fill=black] (0,0) circle (0.1); 
    \draw[dashed] (0,0) circle (2);
    \latitude{-20}
    \latitude{-30}
    \end{scope} 
    %        
    \end{tikzpicture}
nerdizzle
  • 151

2 Answers2

1

Alternatively, you can use http://www.ctan.org/pkg/pst-solides3d

\documentclass{article}
\usepackage{tikz}
\usepackage{pst-solides3d}
\begin{document}

\begin{pspicture}
    \psSolid[
        object=calottesphere,
        r=3,ngrid=16 18,
        phi=20,theta=30,
        hollow,RotY=-80]%
\end{pspicture}
\end{document}
inyoot
  • 46
1

Here's a proposition based on yours: just combine your arcs into one path and fill.

\newcommand\latitudes[3][]{%
\draw[dashed] (#2:2) arc (0:-180:{2*cos(#2)} and {0.25*cos(#2)});
\draw[dashed] (#3:2) arc (0:-180:{2*cos(#3)} and {0.25*cos(#3)}); 
\draw[#1] (#2:2) arc (0:180:{2*cos(#2)} and {0.25*cos(#2)}) 
arc (180-#2:180-#3:2)
arc (180:0:{2*cos(#3)} and {0.25*cos(#3)}) 
arc (#3:#2:2);}

\begin{tikzpicture}

\begin{scope}[rotate around={90:(8,0)},shift={(8,0)}] 
\draw[fill=black] (0,0) circle (0.1); 
\draw[dashed] (0,0) circle (2); 

\latitudes[fill=yellow]{-20}{-30}

\end{scope} 
%        
\end{tikzpicture}

enter image description here