1

Currently writing a PhD Thesis and I want to write in Latex. So, for figures, I would like to draw using the Tikz to make my thesis more presentable and smaller in size. I am very grateful if anyone could help me with tikz code on how to draw these figures. These figures illustrate light scattered by a particle in a particle counter with different optics geometry. Please help me with all these figures. Thank you in advance This is figures of a light scattered by a particle of a particle counter with different optics geometry

1

This is maybe a start.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}[ring at/.style={insert path={
    (#1,0) circle[y radius={sqrt(R*R-#1*#1)},x radius={a*sqrt(R*R-#1*#1)}]}},
    cone at/.style={ring at=#1,insert path={(#1,{sqrt(R*R-#1*#1)}) -- (0,0)
        -- (#1,-{sqrt(R*R-#1*#1)})}},
    pics/shell/.style={code={
    \tikzset{shell/.cd,#1}
    \def\pv##1{\pgfkeysvalueof{/tikz/shell/##1}} 
    \pgfmathsetmacro{\Rone}{sqrt(R*R-\pv{x1}*\pv{x1})}
    \pgfmathsetmacro{\Rtwo}{sqrt(R*R-\pv{x2}*\pv{x2})}
    %\pgfmathsetmacro{\AngleA}{acos()}
    \draw [pic actions] (\pv{x1},-\Rone)
    arc[start angle=-90,end angle=90,x radius=a*\Rone,y radius=\Rone]
    arc[start angle={acos(\pv{x1}/R)},end angle={acos(\pv{x2}/R)},radius=R]
    arc[start angle=90,end angle=-90,x radius=a*\Rtwo,y radius=\Rtwo]
    arc[start angle={-acos(\pv{x2}/R)},end angle={-acos(\pv{x1}/R)},radius=R]
    --cycle;
    \draw [pic actions] (\pv{x1},-\Rone)
    arc[start angle=270,end angle=90,x radius=a*\Rone,y radius=\Rone]
    arc[start angle={acos(\pv{x1}/R)},end angle={acos(\pv{x2}/R)},radius=R]
    arc[start angle=90,end angle=270,x radius=a*\Rtwo,y radius=\Rtwo]
    arc[start angle={-acos(\pv{x2}/R)},end angle={-acos(\pv{x1}/R)},radius=R]
    --cycle;
    }},declare function={R=4;a=0.1;},shell/.cd,x1/.initial=1,x2/.initial=2
    ]
  \begin{scope}
   \draw circle[radius=R];
   \draw [cone at=2];
   \pic[pattern=north east lines]{shell={x1=2.75,x2=3}};
  \end{scope}
  \begin{scope}[xshift=9cm]
   \draw circle[radius=R];
   \draw [cone at=-3];
   \draw[rotate=45] [cone at=2];
   \pic[rotate=45,pattern=north east lines]{shell={x1=2.75,x2=3}};
  \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | |

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.