0

I am currently writing my PhD Thesis using Latex. I was told that it is better to draw a diagram using Tikz. However, I had never used Tikz before. I like to draw a diagram like presented below. Please help me in this matter. Thanks in advance. enter image description here

closed as too broad by Zarko, Stefan Pinnow, Raaja, schtandard, Phelype Oleinik Sep 4 at 18:13

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – BambOo Sep 4 at 13:37
  • @close-voters: Please don't downvote below a score of -1, even if the question in its current form needs some improvement. A score of -1 is enough to show that the question needs work, anything below that is of no use. Also, if you downvote or vote to close, please leave a comment explaining why you did so, but wait at least 24 hours after asking the OP for improvements to the question before voting to close. – Mensch Sep 4 at 14:56
  • It is straightforward, yet tedious, to draw this with tikz-3dplot. For the arrow with gradient I recommend shapes.arrows with something like \node[top color=red,bottom color=yellow,shading angle=<something derived>,single arrow,...]{};, where ... refers to the arrow parameters. – Schrödinger's cat Sep 4 at 15:39
3

None of this is difficult but it is very tedious to draw this. So this is a start. To complete this figure, you merely need to repeat things.

\documentclass[tikz,border=1mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{backgrounds,shapes.arrows}
\tikzset{marrow/.style={sloped,minimum height=1.4cm,minimum width=1.2cm,
   single arrow, single arrow
    head extend=.125cm, single arrow head indent=.08cm,    allow upside down}}
\begin{document}
\tdplotsetmaincoords{70}{30}
\begin{tikzpicture}[tdplot_main_coords,declare function={h=5;hz=2;r=0.5;},line
 join=round,line cap=round]
 % axes
 \path (0,0,0) coordinate (O);
 \draw[dashed] (-4,0,0) -- (4,0,0) (0,-4,0) -- (0,4,0) (0,0,-4) -- (0,0,4);
 % blue dots
 \path foreach \X in {1,...,20}{[/utils/exec=\pgfmathsetmacro{\rndan}{360*rnd}%
 \pgfmathsetmacro{\rrndr}{r*rnd}]
   ({\rrndr*cos(\rndan)},{\rrndr*sin(\rndan)},{-h/2+1.2*h*rnd}) 
   node[fill=blue!60,circle,inner sep=1pt]{} };
 % cylinder
 \draw plot[variable=\t,domain=0:360] ({r*cos(\t)},{r*sin(\t)},h/2)
 plot[variable=\t,domain=0:360] ({r*cos(\t)},{r*sin(\t)},h/2)
 ({r*cos(\tdplotmainphi)},{r*sin(\tdplotmainphi)},h/2) --
 plot[variable=\t,domain=\tdplotmainphi:\tdplotmainphi-180] 
 ({r*cos(\t)},{r*sin(\t)},-h/2)--
 ({r*cos(\tdplotmainphi-180)},{r*sin(\tdplotmainphi-180)},h/2);
 \draw[densely dotted] plot[variable=\t,domain=\tdplotmainphi:\tdplotmainphi+180] 
 ({r*cos(\t)},{r*sin(\t)},hz) ;
 % sphere
 \draw[fill=orange,fill opacity=0.2] plot[variable=\t,domain=\tdplotmainphi:\tdplotmainphi-180] 
 ({r*cos(\t)},{r*sin(\t)},hz) coordinate(aux)
 [tdplot_screen_coords]
 let \p1=($(aux)-(O)$),\n1={atan2(\y1,\x1)},
  \n2={veclen(\y1,\x1)}
  in (\n1:\n2) arc(\n1:540-\n1:\n2) ;
 % arc
 \begin{scope}[canvas is yz plane at x=0]
  \draw (-h/2-1,0) arc(180:90:h/2+1);
 \end{scope}
 % arrow
 \begin{scope}[canvas is xy plane at z=0,transform shape]
  \begin{scope}[on background layer]
   \path  (-4,0) -- (O)   node[pos=0.5,marrow,draw,top color=red,bottom color=yellow,
    shading angle={50}]{};
   \draw[fill=orange!30] (-15:5) -- (O) -- (-45:5);
  \end{scope}
  \draw[dashed] (O) -- (-30:5)
     node[pos=0.75,marrow,draw,solid,fill=yellow]{};
  \pgflowlevelsynccm
  \draw[latex-latex] (3,0)  arc(0:-30:3) 
  node[pos=0.25,right] {$\eta$};
 \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

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