I am new to LaTeX. I have researched how to draw diagrams and found that TikZ could help. Please could someone give me a direction with the below image...
My document uses the article
class of and it is really simple. Hope someone can help.
I am new to LaTeX. I have researched how to draw diagrams and found that TikZ could help. Please could someone give me a direction with the below image...
My document uses the article
class of and it is really simple. Hope someone can help.
What you are asking here can be found scattered over some posts here. Some suggestions:
declare function
.sc
and rc
in the below code.random steps
decoration.Other than that it is mostly tedious to produce the desired output.
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[declare function={L=3;t=0.8;d=3;r=0.4;P=4;},
rc/.style={rounded corners=r*1cm},sc/.style={sharp corners},
>=stealth]
\draw[semithick] (0,0) coordinate (start)-- ++ (0,d) foreach \X [count=\Y] in
{0.1,0.1+0.8/3,0.1+1.6/3,0.9} {coordinate[pos=\X] (auxL\Y)
} [rc] -- ++ (P,0) [sc] -- ++ (0,t) coordinate (p1)
--++ (L,0) coordinate[pos=0.4] (p2) coordinate (p3) [rc] -- ++ (0,-t) [sc]
-- ++ (P,0) coordinate[pos=0.3] (p4) coordinate[pos=0.4] (p5) coordinate (p6)
-- ++ (0,-d) coordinate (p7)
foreach \X [count=\Y] in
{0,1/3,2/3,1} {coordinate[pos=\X] (auxR\Y)
}
[rc] -- ++(-P,0)[sc] --++ (0,-t) coordinate (p8)
-- ++(-L,0) [rc] --++(0,t) coordinate (p12) [sc] -- cycle
([xshift=0.6cm]auxR2) node[right]{$S$}
foreach \Y in {1,...,4}
{(auxR\Y) edge[->,shorten <=2pt] ++ (0.6,0)
(auxL\Y) node[left,circle,draw,inner sep=2pt](c\Y) {}};
\draw ([yshift=2mm]p1) -- coordinate (p9) ++ (0,0.8) ([yshift=2mm]p3) -- ++ (0,0.8)
([xshift=2mm]p3) -- ++ (0.8,0) coordinate[pos=0.8] (p10)
([xshift=2mm]p8) -- ++ (0.8,0) coordinate[pos=0.8] (p11);
\draw[<->] (p2) -- node[fill=white]{$H$} (p2|-p8);
\draw[<->] (p9) -- node[fill=white]{$L$} (p3|-p9);
\draw[<->] (p10) -- node[fill=white]{$t$} (p10|-p6);
\draw[<->] (p11) -- node[fill=white]{$t$} (p11|-p7);
\draw[<->] (p5) -- node[fill=white]{$d$} (p5|-p7);
\draw[<-] (p12) ++ (45:r) ++ (-r,-r) -- ++ (-135:0.5) node[below left] {$r$};
\fill[decorate,decoration={random steps,segment length=pi*1pt},gray!50]
(c1.west|-start) to[bend left] ++ (0,d);
\draw (c1.west|-start) -- ++ (0,d);
\end{tikzpicture}
\end{document}
I hope that this gives you a start and some of the information to draw the graphs you need.