0

I need to input in my document this kind of images. How to 1. draw this image? 2. set its position to text? 3. enumerate and give name, to refer to its number?

enter image description here

  • For spherical drawings (and 3d in general) Asymptote is probably the drawing language of choice. There's a well written manual and plenty of examples. You will get more advice and help here, if you have a specific problem once you get started. – Thruston Feb 27 '15 at 16:33
  • 1.: tex.stackexchange.com/q/53445 tex.stackexchange.com/q/159445 2. and 3. are really basics and can be found in each introduction to TeX or on this site. – LaRiFaRi Feb 27 '15 at 16:33
  • 1
    You have the image already---why draw it again? Just do this: \begin{figure}\includegraphics[width=\linewidth,height=0.75\textheight,keepaspectratio]{sphereimagefile}\caption{Sphere}\label{fig:sphere}\end{figure} – musarithmia Feb 27 '15 at 16:49
  • 1
    If you don't know how to do labels and cross-references in LaTeX, I would not advise trying to draw a sphere. – musarithmia Feb 27 '15 at 16:50
  • I would like to put them by code, because the quality of image will be better. I'm aware of Asymptote, but I don't want to use it in LaTeX documment. – Giorgi Feb 27 '15 at 17:02
6

This is a possible solution via tikz-3dplot, to serve as a starting point.

enter image description here

code

\documentclass[border=10pt]{standalone}
\usepackage{tikz,amsmath}
\usepackage{tikz-3dplot}
\usetikzlibrary{shapes,calc,positioning}
\usetikzlibrary{calc,intersections}
\begin{document}

\tdplotsetmaincoords{90}{90}

\begin{tikzpicture}[scale=5,tdplot_main_coords]

% draw various ellipses
\tdplotsetthetaplanecoords{90}
\tdplotdrawarc[tdplot_rotated_coords,thick]{(0,0,0)}{0.8}{0}{360}{}{}
%
\tdplotsetrotatedcoords{60}{70}{0}
\tdplotdrawarc[dashed,tdplot_rotated_coords,name path=blue]{(0,0,0)}{0.8}{0}{360}{below}{$\alpha_2$}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.8}{0}{180}{above right}{$\alpha_1$}
%
\tdplotsetrotatedcoords{120}{110}{0}
\tdplotdrawarc[dashed,tdplot_rotated_coords,name path=green]{(0,0,0)}{0.8}{0}{360}{below}{$\beta$}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.8}{0}{180}{left}{$\mathcal A_2$}
%
\tdplotsetrotatedcoords{180}{16}{0}
\tdplotdrawarc[dashed,tdplot_rotated_coords,name path=red]{(0,0,0)}{0.8}{0}{360}{above left}{$\zeta$}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{0.8}{-90}{90}{below left}{$\gamma$}

% find intersections

\path [name intersections={of={green and blue}, total=\n}]  
\foreach \i in {1,...,\n}{(intersection-\i) circle [radius=0.5pt] coordinate(gb\i){}};

\path [name intersections={of={green and red}, total=\n}]  
\foreach \i in {1,...,\n} {(intersection-\i) circle [radius=0.5pt]coordinate(gc\i){}};

\path[name intersections={of={red and blue}, total=\n}]  
\foreach \i in {1,...,\n}{(intersection-\i) circle [radius=0.5pt]coordinate(cb\i){}};

% shading
\shade[top color=gray,bottom color=white,opacity=0.5]  
(cb4) to[bend left=7] (gc1) to[bend left=15] (gb2) to[bend left=15] cycle;

% label
\draw[dashed,fill] (gb2) circle [radius=0.5pt]--(gb4) circle [radius=0.5pt];
\draw[dashed, fill] (cb2) circle [radius=0.5pt]--(cb4)circle [radius=0.5pt];
\draw[dashed,fill] (gc1) circle [radius=0.5pt]--(gc3) circle [radius=0.5pt];
\draw[dashed,fill] (gb2) circle [radius=0.5pt]--(cb4) circle [radius=0.5pt];
\draw (gb2) node[below]{$\mathcal C$};
\draw (gc1) node[above right]{$\mathcal A_1$};
\draw (cb4) node[above left]{$\mathcal B$};
\draw[] (gc1) to[bend left=30] ++(1,0.71,0.5)node(a){}; 
\draw[dashed,fill] (a) circle [radius=0.5pt]--(gc1)circle [radius=0.5pt];
\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$};
\end{tikzpicture}

\end{document}
  • how to shade spherical triangle, or any complex surface properly? – Giorgi Feb 28 '15 at 14:14
  • For triangle, just replace to[bend left=xx] with --. For complex surface (3D), clip are often used, but usually not an easy task. – Jesse Feb 28 '15 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.