image
imagewidth (px) 384
384
| text
stringlengths 2.58k
12.8k
|
|---|---|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{relsize}
\usepackage{bm}
\usetikzlibrary{positioning,decorations.pathmorphing}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{camdrk}{RGB}{0,62,114}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, thick] (h1) {};
\node[circle, draw, thick, right=of h1] (h2) {};
\node[circle, draw, thick, below=of h1] (h3) {};
\node[circle, draw, thick, right=of h3] (h4) {};
\node[circle, draw, thick, below=of h3] (h5) {};
\node[circle, draw, thick, right=of h5] (h6) {};
\draw[-, thick] (h1) -- (h4);
\draw[-, thick] (h2) -- (h3);
\draw[-, thick] (h2) -- (h4);
\draw[-, thick] (h3) -- (h4);
\draw[-, thick] (h3) -- (h6);
\draw[-, thick] (h4) -- (h5);
\draw[-, thick] (h5) -- (h6);
\path [draw=black, smooth, fill=camdrk, fill opacity=0.3, very thick]
([xshift=-0.5em,yshift=0.5em]h1.north west) -- ([xshift=0.5em,yshift=0.5em]h2.north east) -- ([xshift=0.5em,yshift=-0.5em]h6.south east) -- ([xshift=-0.5em,yshift=-0.5em]h5.south west) -- cycle;
\node[circle, draw, thick, red, fill=red!10, right=10em of h1] (g1) {};
\node[circle, draw, thick, red, fill=red!10, right=of g1] (g2) {};
\node[circle, draw, thick, below=of g1] (g3) {};
\node[circle, draw, thick, right=of g3] (g4) {};
\node[circle, draw, thick, red, fill=red!10, below=of g3] (g5) {};
\node[circle, draw, thick, right=of g5] (g6) {};
\draw[-, thick, dashed, lightgray] (g1) -- (g4);
\draw[-, thick, dashed, lightgray] (g2) -- (g3);
\draw[-, thick, dashed, lightgray] (g2) -- (g4);
\draw[-, thick] (g3) -- (g4);
\draw[-, thick] (g3) -- (g6);
\draw[-, thick, dashed, lightgray] (g4) -- (g5);
\draw[-, thick, dashed, lightgray] (g5) -- (g6);
\node[red] (icr) at (g1) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (g2) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (g5) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\path [draw=black, smooth, fill=mymauve, fill opacity=0.3, very thick]
([xshift=-0.5em,yshift=0.5em]g3.north west) -- ([xshift=0.5em,yshift=0.5em]g4.north east) -- ([xshift=0.5em,yshift=-0.5em]g6.south east) -- ([xshift=-0.5em,yshift=-0.5em]g6.south west) -- ([xshift=-0.5em,yshift=-0.5em]g3.south west) -- cycle;
\node[circle, thick, right=10em of g1] (i1) {};
\node[circle, thick, right=of i1] (i2) {};
\node[circle, draw, thick, below=of i1] (i3) {};
\node[circle, draw, red, thick, fill=red!10, right=of i3] (i4) {};
\node[circle, thick, below=of i3] (i5) {};
\node[circle, draw, thick, right=of i5] (i6) {};
\draw[-, thick, dashed, lightgray] (i3) -- (i4);
\draw[-, thick] (i3) -- (i6);
\node[red] (icr) at (i4) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\draw[-stealth, ultra thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=0.5em]h4.east) -- node[below, black] {pool} node[above] {GCN} ([xshift=-0.5em]g3.west);
\draw[-stealth, ultra thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=0.5em]g4.east) -- node[above] {GCN} node[below] {pool}([xshift=-0.5em]i3.west);
\path [draw=black, smooth, fill=mygreen, fill opacity=0.3, very thick]
([xshift=-0.5em,yshift=0.5em]i3.north west) -- ([xshift=0.5em,yshift=0.5em]i3.north east) --([xshift=0.5em,yshift=0.5em]i6.north east) --([xshift=0.5em,yshift=-0.5em]i6.south east) -- ([xshift=-0.5em,yshift=-0.5em]i6.south west) -- ([xshift=-0.5em,yshift=-0.5em]i3.south west) -- cycle;
\node[circle, draw, thick, right=10em of i3] (S) {$\boldsymbol\Sigma$};
\path[-stealth, mymauve, ultra thick] ([xshift=0.5em, yshift=0.5em]g4.north east) edge[bend left,decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] node[sloped,above] {mean $\|$ max} (S);
\path[-stealth, mygreen, ultra thick] ([xshift=0.4em]i6.east) edge[bend right,decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] node[sloped,below] {mean $\|$ max} (S);
\node[right=5em of S] (P) {\emph{predict}};
\draw[-stealth, ultra thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (S.east) --node[above] {MLP} (P.west);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{bm}
\usepackage{relsize}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, thick] (i1) {};
\node[circle, draw, thick, above=2em of i1] (i2) {};
\node[circle, draw, thick, above=2em of i2] (i3) {};
\node[circle, draw, thick, below=2em of i1] (i4) {};
\node[circle, draw, thick, below=2em of i4] (i5) {};
\node[circle, draw, thick, right=4em of i1] (h1) {};
\node[circle, draw, thick, right=4em of i2] (h2) {};
\node[circle, draw, thick, right=4em of i3] (h3) {};
\node[circle, draw, thick, right=4em of i4] (h4) {};
\node[circle, draw, thick, right=4em of i5] (h5) {};
\node[circle, draw, thick, right=4em of h1] (hh1) {};
\node[circle, draw, thick, right=4em of h2] (hh2) {};
\node[circle, draw, thick, right=4em of h3] (hh3) {};
\node[circle, draw, thick, right=4em of h4] (hh4) {};
\node[circle, draw, thick, right=4em of h5] (hh5) {};
\node[circle, draw, thick, right=4em of hh2] (o1) {};
\node[circle, draw, thick, right=4em of hh4] (o2) {};
\draw[-stealth, thick] (i1) -- (h1);
\draw[-stealth, thick] (i1) -- (h2);
\draw[-stealth, thick] (i1) -- (h3);
\draw[-stealth, thick] (i1) -- (h4);
\draw[-stealth, thick] (i1) -- (h5);
\draw[-stealth, thick] (i2) -- (h1);
\draw[-stealth, thick] (i2) -- (h2);
\draw[-stealth, thick] (i2) -- (h3);
\draw[-stealth, thick] (i2) -- (h4);
\draw[-stealth, thick] (i2) -- (h5);
\draw[-stealth, thick] (i3) -- (h1);
\draw[-stealth, thick] (i3) -- (h2);
\draw[-stealth, thick] (i3) -- (h3);
\draw[-stealth, thick] (i3) -- (h4);
\draw[-stealth, thick] (i3) -- (h5);
\draw[-stealth, thick] (i4) -- (h1);
\draw[-stealth, thick] (i4) -- (h2);
\draw[-stealth, thick] (i4) -- (h3);
\draw[-stealth, thick] (i4) -- (h4);
\draw[-stealth, thick] (i4) -- (h5);
\draw[-stealth, thick] (i5) -- (h1);
\draw[-stealth, thick] (i5) -- (h2);
\draw[-stealth, thick] (i5) -- (h3);
\draw[-stealth, thick] (i5) -- (h4);
\draw[-stealth, thick] (i5) -- (h5);
\draw[-stealth, thick] (h1) -- (hh1);
\draw[-stealth, thick] (h1) -- (hh2);
\draw[-stealth, thick] (h1) -- (hh3);
\draw[-stealth, thick] (h1) -- (hh4);
\draw[-stealth, thick] (h1) -- (hh5);
\draw[-stealth, thick] (h2) -- (hh1);
\draw[-stealth, thick] (h2) -- (hh2);
\draw[-stealth, thick] (h2) -- (hh3);
\draw[-stealth, thick] (h2) -- (hh4);
\draw[-stealth, thick] (h2) -- (hh5);
\draw[-stealth, thick] (h3) -- (hh1);
\draw[-stealth, thick] (h3) -- (hh2);
\draw[-stealth, thick] (h3) -- (hh3);
\draw[-stealth, thick] (h3) -- (hh4);
\draw[-stealth, thick] (h3) -- (hh5);
\draw[-stealth, thick] (h4) -- (hh1);
\draw[-stealth, thick] (h4) -- (hh2);
\draw[-stealth, thick] (h4) -- (hh3);
\draw[-stealth, thick] (h4) -- (hh4);
\draw[-stealth, thick] (h4) -- (hh5);
\draw[-stealth, thick] (h5) -- (hh1);
\draw[-stealth, thick] (h5) -- (hh2);
\draw[-stealth, thick] (h5) -- (hh3);
\draw[-stealth, thick] (h5) -- (hh4);
\draw[-stealth, thick] (h5) -- (hh5);
\draw[-stealth, thick] (hh1) -- (o1);
\draw[-stealth, thick] (hh1) -- (o2);
\draw[-stealth, thick] (hh2) -- (o1);
\draw[-stealth, thick] (hh2) -- (o2);
\draw[-stealth, thick] (hh3) -- (o1);
\draw[-stealth, thick] (hh3) -- (o2);
\draw[-stealth, thick] (hh4) -- (o1);
\draw[-stealth, thick] (hh4) -- (o2);
\draw[-stealth, thick] (hh5) -- (o1);
\draw[-stealth, thick] (hh5) -- (o2);
\draw[-stealth, double, dashed, thick] (5.5,0) -- node[above] {dropout} (8.6, 0);
%%% BOUNDARY %%%
\node[circle, draw, thick, red, fill=red!10, right=15em of hh1] (i1) {};
\node[circle, draw, thick, red, fill=red!10, above=2em of i1] (i2) {};
\node[circle, draw, thick, above=2em of i2] (i3) {};
\node[circle, draw, thick, below=2em of i1] (i4) {};
\node[circle, draw, thick, below=2em of i4] (i5) {};
\node[red] (icr) at (i1) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (i2) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[circle, draw, thick, red, fill=red!10, right=4em of i1] (h1) {};
\node[circle, draw, thick, right=4em of i2] (h2) {};
\node[circle, draw, thick, red, fill=red!10, right=4em of i3] (h3) {};
\node[circle, draw, thick, red, fill=red!10, right=4em of i4] (h4) {};
\node[circle, draw, thick, right=4em of i5] (h5) {};
\node[red] (icr) at (h1) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (h3) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (h4) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[circle, draw, thick, right=4em of h1] (hh1) {};
\node[circle, draw, thick, red, fill=red!10, right=4em of h2] (hh2) {};
\node[circle, draw, thick, right=4em of h3] (hh3) {};
\node[circle, draw, thick, red, fill=red!10, right=4em of h4] (hh4) {};
\node[circle, draw, thick, right=4em of h5] (hh5) {};
\node[red] (icr) at (hh2) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[red] (icr) at (hh4) {$\mathlarger{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\bm{\times}}}}}}$};
\node[circle, draw, thick, right=4em of hh2] (o1) {};
\node[circle, draw, thick, right=4em of hh4] (o2) {};
\draw[-stealth, thick] (i3) -- (h2);
\draw[-stealth, thick] (i3) -- (h5);
\draw[-stealth, thick] (i4) -- (h2);
\draw[-stealth, thick] (i4) -- (h5);
\draw[-stealth, thick] (i5) -- (h2);
\draw[-stealth, thick] (i5) -- (h5);
\draw[-stealth, thick] (h2) -- (hh1);
\draw[-stealth, thick] (h2) -- (hh3);
\draw[-stealth, thick] (h2) -- (hh5);
\draw[-stealth, thick] (h5) -- (hh1);
\draw[-stealth, thick] (h5) -- (hh3);
\draw[-stealth, thick] (h5) -- (hh5);
\draw[-stealth, thick] (hh1) -- (o1);
\draw[-stealth, thick] (hh1) -- (o2);
\draw[-stealth, thick] (hh3) -- (o1);
\draw[-stealth, thick] (hh3) -- (o2);
\draw[-stealth, thick] (hh5) -- (o1);
\draw[-stealth, thick] (hh5) -- (o2);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% 1st column
\node at (0,6.5) {$t-1$};
\node[align=center, circle, draw, thick] (s1_1) at (0,5) {$s_1$\\{\scriptsize$\alpha_{t-1}(s_1)$}};
\node[align=center, circle, draw, thick] (s2_1) at (0,3) {$s_2$\\{\scriptsize$\alpha_{t-1}(s_2)$}};
\node[align=center, circle, draw, thick] (s3_1) at (0,1) {$s_3$\\{\scriptsize$\alpha_{t-1}(s_3)$}};
\node[align=center, circle, draw, thick] (s4_1) at (0,-1) {$s_4$\\{\scriptsize$\alpha_{t-1}(s_4)$}};
\node [draw, thick] at (0,-2.5) {$(y_{t-1}, id_{t-1})$};
% 2nd column
\node at (3.5,6.5) {$t$};
\node[circle, draw, thick] (s1_2) at (3.5,5) {$s_1$}
edge[gray, thin, stealth-] (s1_1)
edge[gray, thin, stealth-] (s2_1)
edge[gray, thin, stealth-] (s3_1)
edge[gray, thin, stealth-] (s4_1);
\node[circle, draw, thick] (s3_2) at (3.5,1) {$s_3$}
edge[gray, thin, stealth-] (s1_1)
edge[gray, thin, stealth-] (s2_1)
edge[gray, thin, stealth-] (s3_1)
edge[gray, thin, stealth-] (s4_1);
\node[circle, draw, thick] (s4_2) at (3.5,-1) {$s_4$}
edge[gray, thin, stealth-] (s1_1)
edge[gray, thin, stealth-] (s2_1)
edge[gray, thin, stealth-] (s3_1)
edge[gray, thin, stealth-] (s4_1);
\node[align=center, circle, draw, ultra thick, minimum size=4.25em] (s2_2) at (3.5,3) {$s_2$\\{\scriptsize$\alpha_{t}(s_2)$}};
% 3rd column
\node [] (asdf2) at (8.5,-2.5) {$(y_{t+1}, id_{t+1})$};
\node [draw, thick] (asdf3) at (12,-2.5) {$(y_{t+2}, id_{t+2})$};
\node[align=center, circle, draw, ultra thick, minimum size=4.25em] (s3_3) at (8.5,1) {$s_3$\\{\scriptsize$\beta_{t+1}(s_3)$}}
edge[gray, thin, stealth-] (s1_2)
edge[gray, thin, stealth-] (s3_2)
edge[gray, thin, stealth-] (s4_2);
\draw[-stealth, very thick, dashed, bend left=90] (asdf2.west) to node[pos=0.33, align=center, fill=white] {${\bf O'}_{3,id_{t+1}}$\\$\mathcal{N}(y_{t+1};\mu_{id_{t+1}},\sigma_{id_{t+1}})$} (s3_3.west);
\node [draw, thick] (asdf2) at (8.5,-2.5) {$(y_{t+1}, id_{t+1})$};
\node at (8.5,6.5) {$t+1$};
\node[circle, draw, thick] (s1_3) at (8.5,5) {$s_1$}
edge[gray, thin, stealth-] (s1_2)
edge[gray, thin, stealth-] (s2_2)
edge[gray, thin, stealth-] (s3_2)
edge[gray, thin, stealth-] (s4_2);
\node[circle, draw, thick] (s2_3) at (8.5,3) {$s_2$}
edge[gray, thin, stealth-] (s1_2)
edge[gray, thin, stealth-] (s2_2)
edge[gray, thin, stealth-] (s3_2)
edge[gray, thin, stealth-] (s4_2);
\node[circle, draw, thick] (s4_3) at (8.5,-1) {$s_4$}
edge[gray, thin, stealth-] (s1_2)
edge[gray, thin, stealth-] (s2_2)
edge[gray, thin, stealth-] (s3_2)
edge[gray, thin, stealth-] (s4_2);
% 4th column
\node at (12,6.5) {$t+2$};
\node[align=center, circle, draw, thick] (s1_4) at (12,5) {$s_1$\\{\scriptsize$\beta_{t+2}(s_1)$}}
edge[gray, thin, stealth-] (s1_3)
edge[gray, thin, stealth-] (s2_3)
edge[gray, thin, stealth-] (s4_3);
\node[align=center, circle, draw, thick] (s2_4) at (12,3) {$s_2$\\{\scriptsize$\beta_{t+2}(s_2)$}}
edge[gray, thin, stealth-] (s1_3)
edge[gray, thin, stealth-] (s2_3)
edge[gray, thin, stealth-] (s4_3);
\node[align=center, circle, draw, thick] (s3_4) at (12,1) {$s_3$\\{\scriptsize$\beta_{t+2}(s_3)$}}
edge[gray, thin, stealth-] (s1_3)
edge[gray, thin, stealth-] (s2_3)
edge[gray, thin, stealth-] (s4_3);
\node[align=center, circle, draw, thick] (s4_4) at (12,-1) {$s_4$\\{\scriptsize$\beta_{t+2}(s_4)$}}
edge[gray, thin, stealth-] (s1_3)
edge[gray, thin, stealth-] (s2_3)
edge[gray, thin, stealth-] (s4_3);
\draw[very thick, stealth-] (s2_2) to node [midway, fill=white] {${\bf T}_{12}$} (s1_1);
\draw[very thick, stealth-] (s2_2) to node [midway, fill=white] {${\bf T}_{22}$} (s2_1);
\draw[very thick, stealth-] (s2_2) to node [midway, fill=white] {${\bf T}_{32}$} (s3_1);
\draw[very thick, stealth-] (s2_2) to node [midway, fill=white] {${\bf T}_{42}$} (s4_1);
\draw[very thick, stealth-] (s1_4) to node [midway, fill=white] {${\bf T}_{31}$} (s3_3);
\draw[very thick, stealth-] (s2_4) to node [midway, fill=white] {${\bf T}_{32}$} (s3_3);
\draw[very thick, stealth-] (s3_4) to node [midway, fill=white] {${\bf T}_{33}$} (s3_3);
\draw[very thick, stealth-] (s4_4) to node [midway, fill=white] {${\bf T}_{34}$} (s3_3);
\draw[very thick, stealth-] (s3_3) to node [midway, fill=white] {${\bf T}_{23}$} (s2_2);
\node [draw, thick] (asdf) at (3.5,-2.5) {$(y_{t}, id_{t})$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,positioning}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\begin{document}
\begin{tikzpicture}
\node (1) [draw, dashed, minimum height=15em, minimum width=15em, xshift=6.5em, fill=olivegreen, fill opacity=0.2, very thick, rectangle, rounded corners] {};
\node (la1) [below=0em of 1] {\emph{encoder}};
\node (2) [draw, dashed, minimum height=14em, fill = red, fill opacity=0.2,minimum width=14em, xshift=19em, very thick, rectangle, rounded corners] {};
\node (la1) [below=0em of 2] {\emph{decoder}};
\node (3) [draw, dashed, minimum height=16em, fill = blue, fill opacity=0.2,minimum width=5em, xshift=-1.5em, very thick, rectangle, rounded corners] {};
\node (la3) [below=0em of 3] {\emph{corrupt}};
\node[circle, thick, fill=red!50, draw] (x1) {};
\node[circle, thick, draw, fill=red!50, below=1em of x1] (x2) {};
\node[circle, thick, fill=red!50, draw, below=1em of x2] (x3) {};
\node[circle, thick, fill=red!50, draw, below=1em of x3] (x4) {};
\node[circle, thick, fill=red!50, draw, above=1em of x1] (x5) {};
\node[circle, thick, fill=red!50, draw, above=1em of x5] (x6) {};
\node[circle, thick, fill=red!50, draw, above=1em of x6] (x7) {};
\foreach \x in {1,...,7}
\node at (x\x) (lx\x) {$\sim$};
\node[circle, thick, fill=white, left=2em of x1, draw] (i1) {};
\node[circle, thick, draw, fill=white, below=1em of i1] (i2) {};
\node[circle, thick, fill=white, draw, below=1em of i2] (i3) {};
\node[circle, thick, fill=white, draw, below=1em of i3] (i4) {};
\node[circle, thick, fill=white, draw, above=1em of i1] (i5) {};
\node[circle, thick, fill=white, draw, above=1em of i5] (i6) {};
\node[circle, thick, fill=white, draw, above=1em of i6] (i7) {};
\foreach \x in {1,...,7}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick] (i\x) -- (x\x);
\node[circle, thick, right=4em of x1, fill=white, draw] (xh1) {};
\node[circle, thick, draw, fill=white, below=1em of xh1] (xh2) {};
\node[circle, thick, fill=white, draw, below=1em of xh2] (xh3) {};
\node[circle, thick, fill=white, draw, above=1em of xh1] (xh4) {};
\node[circle, thick, fill=white, draw, above=1em of xh4] (xh5) {};
\node[circle, thick, fill=white, draw, right=8em of x1, yshift=5em] (hm1) {};
\node[circle, thick, draw, fill=white, below=0.5em of hm1] (hm2) {};
\node[circle, thick, draw, fill=white, below=0.5em of hm2] (hm3) {};
\node[circle, thick, draw, fill=white, above=0.5em of hm1] (hm4) {};
\node[circle, thick, fill=white, draw, right=8em of x1, yshift=-3em] (hs1) {};
\node[circle, thick, draw, fill=white, below=0.5em of hs1] (hs2) {};
\node[circle, thick, draw, fill=white, below=0.5em of hs2] (hs3) {};
\node[circle, thick, draw, fill=white, above=0.5em of hs1] (hs4) {};
\node[] at (hm1) (mu1) {$\mu$};
\node[] at (hm2) (mu2) {$\mu$};
\node[] at (hm3) (mu3) {$\mu$};
\node[] at (hm4) (mu4) {$\mu$};
\node[] at (hs1) (s1) {$\sigma$};
\node[] at (hs2) (s2) {$\sigma$};
\node[] at (hs3) (s3) {$\sigma$};
\node[] at (hs4) (s4) {$\sigma$};
\node[circle, thick, fill=lightgray, draw, right=12em of x1, yshift=1em] (h1) {};
\node[circle, thick, draw, fill=lightgray, below=1em of h1] (h2) {};
\node[circle, thick, draw, fill=lightgray, below=1em of h2] (h3) {};
\node[circle, thick, draw, fill=lightgray, above=1em of h1] (h4) {};
\node[circle, thick, right=16em of x1, fill=white, draw] (oh1) {};
\node[circle, thick, draw, fill=white, below=1em of oh1] (oh2) {};
\node[circle, thick, fill=white, draw, below=1em of oh2] (oh3) {};
\node[circle, thick, fill=white, draw, above=1em of oh1] (oh4) {};
\node[circle, thick, fill=white, draw, above=1em of oh4] (oh5) {};
\node[circle, thick, draw, fill=white, right=20em of x1] (o1) {};
\node[circle, thick, draw, fill=white, below=1em of o1] (o2) {};
\node[circle, thick, draw, fill=white, below=1em of o2] (o3) {};
\node[circle, thick, draw, fill=white, below=1em of o3] (o4) {};
\node[circle, thick, draw, fill=white, above=1em of o1] (o5) {};
\node[circle, thick, draw, fill=white, above=1em of o5] (o6) {};
\node[circle, thick, draw, fill=white, above=1em of o6] (o7) {};
\node[circle, thick, draw, fill=white, right=24em of x1] (oo1) {};
\node[circle, thick, draw, fill=white, below=1em of oo1] (oo2) {};
\node[circle, thick, draw, fill=white, below=1em of oo2] (oo3) {};
\node[circle, thick, draw, fill=white, below=1em of oo3] (oo4) {};
\node[circle, thick, draw, fill=white, above=1em of oo1] (oo5) {};
\node[circle, thick, draw, fill=white, above=1em of oo5] (oo6) {};
\node[circle, thick, draw, fill=white, above=1em of oo6] (oo7) {};
\node[] at (o1) (muu1) {$\mu$};
\node[] at (o2) (muu2) {$\mu$};
\node[] at (o3) (muu3) {$\mu$};
\node[] at (o4) (muu4) {$\mu$};
\node[] at (o5) (muu5) {$\mu$};
\node[] at (o6) (muu6) {$\mu$};
\node[] at (o7) (muu7) {$\mu$};
\foreach \x in {1,...,7}
\foreach \y in {1,...,5}
\draw[-stealth, thick] (x\x) -- (xh\y);
\foreach \x in {1,...,5}
\foreach \y in {1,...,4}
\draw[-stealth, thick] (xh\x) -- (hm\y);
\foreach \x in {1,...,5}
\foreach \y in {1,...,4}
\draw[-stealth, thick] (xh\x) -- (hs\y);
\foreach \x in {1,...,4}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick] (hs\x) -- (h\x);
\foreach \x in {1,...,4}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick] (hm\x) -- (h\x);
\foreach \x in {1,...,5}
\foreach \y in {1,...,4}
\draw[-stealth, thick] (h\y) -- (oh\x);
\foreach \x in {1,...,5}
\foreach \y in {1,...,7}
\draw[-stealth, thick] (oh\x) -- (o\y);
\foreach \x in {1,...,7}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick] (o\x) -- (oo\x);
\node[left=0.5em of i1] (l1) {$\vec{x}$};
\node[above=0em of h4] (l2) {$\vec{z}$};
\node[right=0.5em of oo1] (l3) {$\vec{x}'$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\definecolor{mygreen}{HTML}{006400}
\begin{document}
\begin{tikzpicture}[node distance=2.8em]
\node[circle, thick, fill=red, draw] (0) {};
\node[circle, thick, below left=of 0, fill=red, draw] (1) {};
\node[circle, thick, below right=of 0, fill=red, draw] (2) {};
\node[circle, thick, below right=of 1, fill=red, draw] (3) {};
\node[circle, thick, below left=of 3, fill=red, draw] (4) {};
\node[circle, thick, below right=of 3, fill=red, draw] (5) {};
\node[circle, thick, below right=of 4, fill=red, draw] (6) {};
\node[circle, thick, right=of 5, fill=mygreen, draw] (7) {};
\node[circle, thick, above right=of 7, fill=mygreen, draw] (8) {};
\node[circle, thick, below right=of 8, fill=mygreen, draw] (9) {};
\node[circle, thick, below right=of 7, fill=mygreen, draw] (10) {};
\node[circle, thick, below left=of 10, fill=mygreen, draw] (11) {};
\node[circle, thick, below right=of 10, fill=mygreen, draw] (12) {};
\node[circle, thick, above right=of 9, fill=blue, draw] (13) {};
\node[circle, thick, above right=of 13, fill=blue, draw] (16) {};
\node[circle, thick, above left=of 16, fill=blue, draw] (14) {};
\node[circle, thick, above right=of 14, fill=blue, draw] (15) {};
\node[circle, thick, above right=of 16, fill=blue, draw] (17) {};
\node[circle, thick, below right=of 16, fill=blue, draw] (18) {};
\path[-stealth, very thick] (0) edge [->, >=stealth, opacity=0.02, loop above] (0);
\draw[very thick, opacity=0.30, -stealth] (0) -- (1);
\draw[very thick, opacity=0.07, -stealth] (0) -- (2);
\draw[very thick, opacity=0.53, -stealth] (0) -- (3);
\draw[very thick, opacity=0.02, -stealth] (0) -- (4);
\draw[very thick, opacity=0.05, -stealth] (0) -- (5);
\path[-stealth, very thick] (1) edge [->, >=stealth, opacity=0.56, loop left] (1);
\draw[very thick, opacity=0.25, -stealth] (1) -- (2);
\draw[very thick, opacity=0.11, -stealth] (1) -- (3);
\draw[very thick, opacity=0.02, -stealth] (1) -- (4);
\draw[very thick, opacity=0.05, -stealth] (1) -- (5);
\draw[very thick, opacity=0.54, -stealth] (2) -- (1);
\path[-stealth, very thick] (2) edge [->, >=stealth, opacity=0.31, loop right] (2);
\draw[very thick, opacity=0.04, -stealth] (2) -- (3);
\draw[very thick, opacity=0.03, -stealth] (2) -- (4);
\draw[very thick, opacity=0.07, -stealth] (2) -- (5);
\draw[very thick, opacity=0.35, -stealth] (3) -- (1);
\draw[very thick, opacity=0.09, -stealth] (3) -- (2);
\path[-stealth, very thick] (3) edge [->, >=stealth, opacity=0.44, loop right] (3);
\draw[very thick, opacity=0.03, -stealth] (3) -- (4);
\draw[very thick, opacity=0.08, -stealth] (3) -- (5);
\draw[very thick, opacity=0.22, -stealth] (4) -- (1);
\draw[very thick, opacity=0.07, -stealth] (4) -- (2);
\draw[very thick, opacity=0.05, -stealth] (4) -- (3);
\path[-stealth, very thick] (4) edge [->, >=stealth, opacity=0.19, loop left] (4);
\draw[very thick, opacity=0.46, -stealth] (4) -- (5);
\draw[very thick, opacity=0.38, -stealth] (5) -- (1);
\draw[very thick, opacity=0.09, -stealth] (5) -- (2);
\draw[very thick, opacity=0.12, -stealth] (5) -- (3);
\draw[very thick, opacity=0.10, -stealth] (5) -- (4);
\path[-stealth, very thick] (5) edge [->, >=stealth, opacity=0.31, loop below] (5);
\draw[very thick, opacity=0.31, -stealth] (6) -- (1);
\draw[very thick, opacity=0.08, -stealth] (6) -- (2);
\draw[very thick, opacity=0.46, -stealth] (6) -- (3);
\draw[very thick, opacity=0.04, -stealth] (6) -- (4);
\draw[very thick, opacity=0.10, -stealth] (6) -- (5);
\path[-stealth, very thick] (7) edge [->, >=stealth, opacity=0.32, loop above] (7);
\draw[very thick, opacity=0.10, -stealth] (7) -- (8);
\draw[very thick, opacity=0.12, -stealth] (7) -- (9);
\draw[very thick, opacity=0.36, -stealth] (7) -- (10);
\draw[very thick, opacity=0.07, -stealth] (7) -- (11);
\draw[very thick, opacity=0.03, -stealth] (7) -- (12);
\draw[very thick, opacity=0.28, -stealth] (8) -- (7);
\path[-stealth, very thick] (8) edge [->, >=stealth, opacity=0.11, loop above] (8);
\draw[very thick, opacity=0.13, -stealth] (8) -- (9);
\draw[very thick, opacity=0.37, -stealth] (8) -- (10);
\draw[very thick, opacity=0.07, -stealth] (8) -- (11);
\draw[very thick, opacity=0.03, -stealth] (8) -- (12);
\draw[very thick, opacity=0.03, -stealth] (9) -- (7);
\draw[very thick, opacity=0.01, -stealth] (9) -- (8);
\path[-stealth, very thick] (9) edge [->, >=stealth, opacity=0.48, loop above] (9);
\draw[very thick, opacity=0.27, -stealth] (9) -- (10);
\draw[very thick, opacity=0.21, -stealth] (9) -- (11);
\draw[very thick, opacity=0.10, -stealth] (10) -- (7);
\draw[very thick, opacity=0.04, -stealth] (10) -- (8);
\draw[very thick, opacity=0.31, -stealth] (10) -- (9);
\path[-stealth, very thick] (10) edge [->, >=stealth, opacity=0.39, loop right] (10);
\draw[very thick, opacity=0.15, -stealth] (10) -- (11);
\draw[very thick, opacity=0.04, -stealth] (11) -- (7);
\draw[very thick, opacity=0.01, -stealth] (11) -- (8);
\draw[very thick, opacity=0.45, -stealth] (11) -- (9);
\draw[very thick, opacity=0.29, -stealth] (11) -- (10);
\path[-stealth, very thick] (11) edge [->, >=stealth, opacity=0.20, loop left] (11);
\draw[very thick, opacity=0.36, -stealth] (12) -- (7);
\draw[very thick, opacity=0.13, -stealth] (12) -- (8);
\draw[very thick, opacity=0.08, -stealth] (12) -- (9);
\draw[very thick, opacity=0.34, -stealth] (12) -- (10);
\draw[very thick, opacity=0.05, -stealth] (12) -- (11);
\path[-stealth, very thick] (12) edge [->, >=stealth, opacity=0.04, loop right] (12);
\path[-stealth, very thick] (13) edge [->, >=stealth, opacity=0.12, loop below] (13);
\draw[very thick, opacity=0.03, -stealth] (13) -- (14);
\draw[very thick, opacity=0.52, -stealth] (13) -- (16);
\draw[very thick, opacity=0.32, -stealth] (13) -- (17);
\draw[very thick, opacity=0.01, -stealth] (14) -- (13);
\path[-stealth, very thick] (14) edge [->, >=stealth, opacity=0.19, loop left] (14);
\draw[very thick, opacity=0.65, -stealth] (14) -- (16);
\draw[very thick, opacity=0.11, -stealth] (14) -- (17);
\draw[very thick, opacity=0.02, -stealth] (14) -- (18);
\draw[very thick, opacity=0.04, -stealth] (15) -- (13);
\draw[very thick, opacity=0.13, -stealth] (15) -- (14);
\path[-stealth, very thick] (15) edge [->, >=stealth, opacity=0.01, loop right] (15);
\draw[very thick, opacity=0.62, -stealth] (15) -- (16);
\draw[very thick, opacity=0.18, -stealth] (15) -- (17);
\draw[very thick, opacity=0.01, -stealth] (15) -- (18);
\draw[very thick, opacity=0.03, -stealth] (16) -- (13);
\draw[very thick, opacity=0.09, -stealth] (16) -- (14);
\path[-stealth, very thick] (16) edge [->, >=stealth, opacity=0.69, loop below] (16);
\draw[very thick, opacity=0.18, -stealth] (16) -- (17);
\draw[very thick, opacity=0.07, -stealth] (17) -- (13);
\draw[very thick, opacity=0.05, -stealth] (17) -- (14);
\draw[very thick, opacity=0.61, -stealth] (17) -- (16);
\path[-stealth, very thick] (17) edge [->, >=stealth, opacity=0.26, loop right] (17);
\draw[very thick, opacity=0.01, -stealth] (18) -- (13);
\draw[very thick, opacity=0.25, -stealth] (18) -- (14);
\draw[very thick, opacity=0.01, -stealth] (18) -- (15);
\draw[very thick, opacity=0.61, -stealth] (18) -- (16);
\draw[very thick, opacity=0.09, -stealth] (18) -- (17);
\path[-stealth, very thick] (18) edge [->, >=stealth, opacity=0.03, loop below] (18);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, decorations.pathmorphing}
\definecolor{mynavy}{HTML}{000080}
\definecolor{darkred}{HTML}{8B0000}
\definecolor{mygreen}{HTML}{006400}
\definecolor{mygold}{HTML}{B8860B}
\newcommand{\myGlobalTransformation}[2]
{
\pgftransformcm{1}{0}{0.4}{0.5}{\pgfpoint{#1cm}{#2cm}}
}
\tikzstyle myBG=[line width=3pt,opacity=1.0]
\begin{document}
\begin{tikzpicture}
\begin{scope}
\myGlobalTransformation{0}{0};
\draw [black!50,fill=red!5] rectangle (8,8);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{4.25};
\draw [black!50,fill=blue!5] rectangle (8,8);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{0};
\node (thisNode) at (1,3) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (thisNode) -- ++(0,4.25);
}
\node (thisNode) at (3,5) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
}
\node (thisNode) at (5,7) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
}
\node (thisNode) at (7,7) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
}
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{0}
\node (N1) at (1,3) [circle,white,fill=mynavy] {$S$};
\node (N2) at (3,5) [circle,white,fill=darkred] {$I$};
\node (N3) at (5,1) [circle,white,fill=mygreen] {$V$};
\node (N4) at (5,7) [circle,white,fill=mynavy] {$S$};
\node (N5) at (7,3) [circle,white,fill=darkred] {$I$};
\node (N6) at (7,7) [circle,white,fill=mynavy] {$S$};
\draw[-, darkred!10, very thick] (N3) -- (N6);
\draw[-, darkred!15, very thick] (N2) -- (N4);
\draw[-, darkred!20, very thick] (N2) -- (N6);
\draw[-, darkred!30, very thick] (N1) -- (N5);
\draw[-, darkred!50, very thick] (N2) -- (N5);
\draw[-, darkred!66, very thick] (N4) -- (N5);
\draw[-, darkred!70, very thick] (N1) -- (N3);
\draw[-, darkred!70, very thick] (N5) -- (N6);
\draw[-, darkred!75, very thick] (N3) -- (N4);
\draw[-, darkred!90, very thick] (N1) -- (N2);
\draw[-, darkred!90, very thick] (N4) -- (N6);
\draw[-, darkred, very thick] (N2) -- (N3);
\draw[-, darkred, very thick] (N3) -- (N5);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{4.25}
\node (N1) at (1,3) [circle,white,fill=magenta] {$U$};
\node (N2) at (3,5) [circle,white,fill=mygold] {$A$};
\node (N3) at (5,1) [circle,white,fill=mygold] {$A$};
\node (N4) at (5,7) [circle,white,fill=magenta] {$U$};
\node (N5) at (7,3) [circle,white,fill=magenta] {$U$};
\node (N6) at (7,7) [circle,white,fill=mygold] {$A$};
\draw[-, mynavy, very thick] (N1) -- (N2);
\draw[-, mynavy, very thick] (N1) -- (N3);
\draw[-, cyan, very thick] (N1) -- (N5);
\draw[-, blue, very thick] (N2) -- (N3);
\draw[-, mynavy, very thick] (N2) -- (N4);
\draw[-, mynavy, very thick] (N2) -- (N5);
\draw[-, blue, very thick] (N2) -- (N6);
\draw[-, mynavy, very thick] (N3) -- (N4);
\draw[-, mynavy, very thick] (N3) -- (N5);
\draw[-, blue, very thick] (N3) -- (N6);
\draw[-, cyan, very thick] (N4) -- (N5);
\draw[-, mynavy, very thick] (N4) -- (N6);
\draw[-, mynavy, very thick] (N5) -- (N6);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{0};
\node (thisNode) at (5,1) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
}
\node (thisNode) at (7,3) {};
{
\pgftransformreset
\draw[white,myBG,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
\draw[black,very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (thisNode) -- ++(0,4.25);
}
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{0}
\node (N3) at (5,1) [circle,white,fill=mygreen] {$V$};
\node (N5) at (7,3) [circle,white,fill=darkred] {$I$};
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{4.25}
\node (N3) at (5,1) [circle,white,fill=mygold] {$A$};
\node (N5) at (7,3) [circle,white,fill=magenta] {$U$};
\end{scope}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,ultra thick] (0, 0.2) -- node [above=1em,rotate=90] {self-awareness} (0, 4);
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,ultra thick] (11.3, 8.1) -- node [above=1em,rotate=-90] {immunisation} (11.3, 4.2);
\node at (10, 0.3) {\emph{\textbf{epidemics layer}}};
\node at (1.2, 8) {\emph{\textbf{awareness layer}}};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix, backgrounds}
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=5em, text centered, rounded corners, minimum height=4em]
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{echodrk}{HTML}{0099cc}
\begin{document}
\begin{tikzpicture}[node distance=3cm, auto]
\draw[opacity=0] (-6, -3.5) rectangle (4, 3.3);
\begin{scope}[shift={(-4,-2)},transform canvas={scale=0.7}]
\node [block, color=black, very thick, fill=lightgray!70, minimum height=15em, text width=20em] (cpu) {};
\node [above left] (lab) at (cpu.south east) {\LARGE \bf CPU};
\node [below right=2.5em, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (PC) at (cpu.north west) {\tt 13};
\node[below=0.1em of PC] (lPC) {\tt PC};
\node [right=1em of PC, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (SP) {\tt 25};
\node[below=0.1em of SP] (lSP) {\tt SP};
\node [right=1em of SP, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (A) {\tt 1};
\node[below=0.1em of A] (lA) {\tt A};
\node [right=1em of A, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (B) {\tt 7};
\node[below=0.1em of B] (lB) {\tt B};
\node [right=1em of B, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (C) {\tt 3};
\node[below=0.1em of C] (lC) {\tt C};
\node [right=0.6em of C] (etc) {\Huge \dots};
\node [below=1.5em of PC, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (ZF) {\tt F};
\node[below=0.1em of ZF] (lZF) {\tt ZF};
\node [right=1em of ZF, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (OF) {\tt T};
\node[below=0.1em of OF] (lOF) {\tt OF};
\node [right=1em of OF, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (HCF) {\tt F};
\node[below=0.1em of HCF] (lHCF) {\tt HCF};
\node [right=1em of HCF, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=2em] (CF) {\tt F};
\node[below=0.1em of CF] (lCF) {\tt CF};
\node [right=1em of CF, block, color=black, very thick, fill=lightgray!30, minimum height=2em, inner sep=0em, text width=5em] (tkz) {\tt 15739};
\node[below=0.1em of tkz] (ltkz) {\tt ticks};
\coordinate (PC) at (-0.5, 2);
\coordinate (A) at (1.1, 2);
\coordinate (ZF) at (-0.5, 0.6);
\coordinate (OF) at (0.3, 0.6);
\coordinate (HCF) at (1.1, 0.6);
\coordinate (CF) at (1.9, 0.6);
\coordinate (tkz) at (3.4, 1.0);
\end{scope}
\begin{scope}[font=\ttfamily, array/.style={matrix of nodes,nodes={draw, minimum size=7mm, fill=green!30},column sep=-\pgflinewidth, row sep=0.5mm, nodes in empty cells, row 2/.style={nodes={draw=none, fill=none, minimum size=5mm}}}, shift={(-2.9,2)},transform canvas={scale=1.0}]
\matrix[array,ampersand replacement=\&] (array) {
6 \& 12 \& 1 \& 214 \& 5 \& 0 \& 255 \& 4 \\
{\tiny \dots} \& 9 \& 10 \& 11 \& 12 \& 13 \& 14 \& {\tiny \dots}\\};
\begin{scope}[on background layer]
\fill[green!10] (array-2-1.north west) rectangle (array-2-8.south east);
\end{scope}
\draw[<->, opacity=0.0]([yshift=0mm]array-1-1.north west) -- node[above,color=black, opacity=1.0] {Memory} ([yshift=0mm]array-1-8.north east);
\node[draw, fill=red, opacity=0.5, minimum size=6mm] at (array-1-5) (box) {};
\draw (array-2-8.east)--++(0:3mm) node [right]{Address};
\draw[-stealth, ultra thick, red] (PC) -- (array-2-5);
\node[] (subi) at (6, -2) {\tt Sub(A, \textcolor{red}{5})};
\draw[-stealth, ultra thick, mygreen] (box) -- (subi);
\path[-stealth, ultra thick, echodrk] (subi.west) edge[bend right=20] (A);
\path[-stealth, ultra thick, echodrk] (subi.west) edge[bend right=20] (PC);
\draw[-stealth, ultra thick, echodrk] (subi) -- (tkz);
\path[-stealth, ultra thick, echodrk] (subi) edge[bend left=65] (ZF);
\path[-stealth, ultra thick, echodrk] (subi) edge[bend left=65] (OF);
\path[-stealth, ultra thick, echodrk] (subi) edge[bend left=65] (HCF);
\path[-stealth, ultra thick, echodrk] (subi) edge[bend left=65] (CF);
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
\usetikzlibrary{positioning, decorations.pathmorphing}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\begin{document}
\begin{tikzpicture}
\path[rounded corners, fill=blue, fill opacity=0.2] (-0.4, 3.5) -- (-0.4, -3.5) -- (4, -3.5) -- (4, -0.2) -- (5, -0.2) -- (5, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path[rounded corners, fill=red, fill opacity=0.2] (-0.4, -3.5) -- (-0.4, 3.5) -- (4, 3.5) -- (4, -0.2) -- (5, -0.2) -- (5, -3.5) -- (-0.4, -3.5) -- (-0.4, 0);
\path[rounded corners, fill=white] (-0.4, 0) -- (-0.4, -3.5) -- (4, -3.5) -- (4, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path[rounded corners, fill=olivegreen, fill opacity=0.2] (-0.4, 0) -- (-0.4, -3.5) -- (4, -3.5) -- (4, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path [draw, dashed, very thick, rectangle, rounded corners] (-0.4, 0) -- (-0.4, -3.5) -- (5, -3.5) -- (5, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\node[circle, thick, fill=white, draw] (x1) {};
\node[circle, thick, draw, fill=white, below=1em of x1] (x2) {};
\node[circle, thick, fill=white, draw, below=1em of x2] (x3) {};
\node[circle, thick, fill=white, draw, below=1em of x3] (x4) {};
\node[circle, thick, fill=white, draw, below=1em of x4] (x5) {};
\node[circle, thick, fill=white, draw, above=1em of x1] (x6) {};
\node[circle, thick, fill=white, draw, above=1em of x6] (x7) {};
\node[circle, thick, fill=white, draw, above=1em of x7] (x8) {};
\node[circle, thick, fill=white, draw, above=1em of x8] (x9) {};
\node[circle, thick, right=4em of x1, fill=white, draw] (xhh1) {};
\node[circle, thick, draw, fill=white, below=1em of xhh1] (xhh2) {};
\node[circle, thick, fill=white, draw, below=1em of xhh2] (xhh3) {};
\node[circle, thick, fill=white, draw, below=1em of xhh3] (xhh4) {};
\node[circle, thick, fill=white, draw, above=1em of xhh1] (xhh5) {};
\node[circle, thick, fill=white, draw, above=1em of xhh5] (xhh6) {};
\node[circle, thick, fill=white, draw, above=1em of xhh6] (xhh7) {};
\node[circle, thick, right=8em of x1, fill=white, draw] (xh1) {};
\node[circle, thick, draw, fill=white, below=1em of xh1] (xh2) {};
\node[circle, thick, fill=white, draw, below=1em of xh2] (xh3) {};
\node[circle, thick, fill=white, draw, below=1em of xh3] (xh4) {};
\node[circle, thick, fill=white, draw, above=1em of xh1] (xh5) {};
\node[circle, thick, fill=white, draw, above=1em of xh5] (xh6) {};
\node[circle, thick, fill=white, draw, above=1em of xh6] (xh7) {};
\node[circle, very thick, fill=blue!30, draw, right=12em of x1, yshift=5em] (hm1) {};
\node[circle, very thick, draw, fill=blue!30, below=0.5em of hm1] (hm2) {};
\node[circle, very thick, draw, fill=blue!30, below=0.5em of hm2] (hm3) {};
\node[circle, very thick, draw, fill=blue!30, above=0.5em of hm1] (hm4) {};
\node[circle, very thick, draw, fill=blue!30, above=0.5em of hm4] (hm5) {};
\node[circle, very thick, fill=red!30, draw, right=12em of x1, yshift=-5em] (hs1) {};
\node[right=1.5em of hm1, blue] (mu1) {$\pi_\theta(s, \alpha_3)$};
\node[right=1.5em of hm2, blue] (mu2) {$\pi_\theta(s, \alpha_4)$};
\node[right=1.5em of hm3, blue] (mu3) {$\pi_\theta(s, \alpha_5)$};
\node[right=1.5em of hm4, blue] (mu4) {$\pi_\theta(s, \alpha_2)$};
\node[right=1.5em of hm5, blue] (mu5) {$\pi_\theta(s, \alpha_1)$};
\node[right=1.5em of hs1, red] (s1) {$V_\psi(s)$};
\foreach \x in {1,...,9}
\foreach \y in {1,...,7}
\draw[-stealth, thick] (x\x) -- (xhh\y);
\foreach \x in {1,...,7}
\foreach \y in {1,...,7}
\draw[-stealth, thick] (xhh\x) -- (xh\y);
\foreach \x in {1,...,7}
\foreach \y in {1,...,5}
\draw[-stealth, thick, blue] (xh\x) -- (hm\y);
\foreach \x in {1,...,7}
\draw[-stealth, thick, red] (xh\x) -- (hs1);
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick, red] (hs1) -- (s1);
\foreach \x in {1,...,5}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick, blue] (hm\x) -- (mu\x);
\node[left=0.75em of x1] (l1) {$s$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsbsy}
\usetikzlibrary{automata, chains, decorations.pathmorphing, positioning}
\definecolor{echodrk}{HTML}{0099cc}
\begin{document}
\begin{tikzpicture} [scale=1.3, every node/.style={transform shape},start chain=1 going right, start chain=2 going right]
\node[state, fill=red!20, on chain=1, very thick, text depth=0pt] (1) {$s_0$};
\node[state, fill=red!20, on chain=1, very thick, text depth=0pt] (2) {$s_1$};
\node[state, fill=red!20, on chain=1, very thick, text depth=0pt] (3) {$s_2$};
\node[on chain=1] (md) {\dots};
\node[state, fill=red!20, on chain=1, very thick, text depth=0pt] (n) {$s_n$};
\draw[>=stealth, color=red, text=black, very thick, auto=right,loop above/.style={out=75,in=105,loop}, every loop]
(1) edge node[above] {\footnotesize$\boldsymbol \omega_{11}$} (2)
(2) edge node[above] {\footnotesize$\boldsymbol \omega_{11}$} (3)
(3) edge node[above] {\footnotesize$\boldsymbol \omega_{11}$} (md)
(md) edge node[above] {\footnotesize$\boldsymbol \omega_{11}$} (n);
\node[rectangle, thick, fill=red!20, draw] at (-2, 1.7) (y1) {$id_0$};
\node[rectangle, thick, fill=red!20, draw] at (0, 1.7) (y2) {$id_1$};
\node[rectangle, thick, fill=red!20, draw] at (2, 1.7) (y3) {$id_2$};
\node at (4, 1.7) (ymd) {\dots};
\node[rectangle, thick, fill=red!20, draw] at (6, 1.7) (yn) {$id_n$};
\draw[-stealth, color=red, text=black, very thick, dashed]
(1) edge node[right] {${\bf O'}_{0,id_0}^1$} (y1)
(2) edge node[right] {${\bf O'}_{1,id_1}^1$} (y2)
(3) edge node[right] {${\bf O'}_{2,id_2}^1$} (y3)
(n) edge node[right] {${\bf O'}_{n,id_n}^1$} (yn);
\node[rectangle, fill=red!20, draw, scale=0.2, minimum size=20em,above = 2cm of y1] at (-1, 2) (gauss1) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node[rectangle, fill=red!20, draw, scale=0.2, minimum size=20em,above = 2cm of y2] at (1, 2) (gauss2) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node[rectangle, fill=red!20, draw, scale=0.2, minimum size=20em,above = 2cm of y3] at (3, 2) (gauss3) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node at (5, 4.7) (gaussmd) {\dots};
\node[rectangle, fill=red!20, draw, scale=0.2, minimum size=20em,above = 2cm of yn] at (7, 2) (gaussn) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\draw[-stealth, color=red, text=black, very thick, dotted]
(y1) edge node[left] {$\mu_{id_0}^1$} node[right] {$\sigma_{id_0}^1$} (gauss1)
(y2) edge node[left] {$\mu_{id_1}^1$} node[right] {$\sigma_{id_1}^1$} (gauss2)
(y3) edge node[left] {$\mu_{id_2}^1$} node[right] {$\sigma_{id_2}^1$} (gauss3)
(yn) edge node[left] {$\mu_{id_n}^1$} node[right] {$\sigma_{id_n}^1$} (gaussn);
%%%%%% BOUNDARY %%%%%%%
%%%%%% BOUNDARY %%%%%%%
\node[state, fill=echodrk!20, on chain=2, very thick, text depth=0pt] (21) at (0, -2) {$s_0$};
\node[state, fill=echodrk!20, on chain=2, very thick, text depth=0pt] (22) {$s_1$};
\node[state, fill=echodrk!20, on chain=2, very thick, text depth=0pt] (23) {$s_2$};
\node[on chain=2] (2md) {\dots};
\node[state, fill=echodrk!20, on chain=2, very thick, text depth=0pt] (2n) {$s_n$};
\draw[>=stealth, color=blue, text=black, very thick, auto=right,loop above/.style={out=75,in=105,loop}, every loop]
(21) edge node[below] {\footnotesize$\boldsymbol \omega_{22}$} (22)
(22) edge node[below] {\footnotesize$\boldsymbol \omega_{22}$} (23)
(23) edge node[below] {\footnotesize$\boldsymbol \omega_{22}$} (2md)
(2md) edge node[below] {\footnotesize$\boldsymbol \omega_{22}$} (2n);
\node[rectangle, thick, fill=echodrk!20, draw] at (-2, -3.7) (2y1) {$id_0$};
\node[rectangle, thick, fill=echodrk!20, draw] at (0, -3.7) (2y2) {$id_1$};
\node[rectangle, thick, fill=echodrk!20, draw] at (2, -3.7) (2y3) {$id_2$};
\node at (4, -3.7) (2ymd) {\dots};
\node[rectangle, thick, fill=echodrk!20, draw] at (6, -3.7) (2yn) {$id_n$};
\draw[-stealth, color=blue, text=black, very thick, dashed]
(21) edge node[right] {${\bf O'}_{0,id_0}^2$} (2y1)
(22) edge node[right] {${\bf O'}_{1,id_1}^2$} (2y2)
(23) edge node[right] {${\bf O'}_{2,id_2}^2$} (2y3)
(2n) edge node[right] {${\bf O'}_{n,id_n}^2$} (2yn);
\node[rectangle, fill=echodrk!20, draw, scale=0.2, minimum size=20em,above = 2cm of 2y1] at (-1, -9.5) (2gauss1) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node[rectangle, fill=echodrk!20, draw, scale=0.2, minimum size=20em,above = 2cm of 2y2] at (1, -9.5) (2gauss2) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node[rectangle, fill=echodrk!20, draw, scale=0.2, minimum size=20em,above = 2cm of 2y3] at (3, -9.5) (2gauss3) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\node at (5, -6.8) (2gaussmd) {\dots};
\node[rectangle, fill=echodrk!20, draw, scale=0.2, minimum size=20em,above = 2cm of 2yn] at (7, -9.5) (2gaussn) {
\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}
};
\draw[-stealth, color=blue, text=black, very thick, dotted]
(2y1) edge node[left] {$\mu_{id_0}^2$} node[right] {$\sigma_{id_0}^2$} (2gauss1)
(2y2) edge node[left] {$\mu_{id_1}^2$} node[right] {$\sigma_{id_1}^2$} (2gauss2)
(2y3) edge node[left] {$\mu_{id_2}^2$} node[right] {$\sigma_{id_2}^2$} (2gauss3)
(2yn) edge node[left] {$\mu_{id_n}^2$} node[right] {$\sigma_{id_n}^2$} (2gaussn);
%%%% COMBO %%%%%
\draw[-stealth, very thick, auto=right,decoration={snake, segment length=2mm, amplitude=0.5mm,post length=1.5mm}]
(1) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{12}$} (22)
(2) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{12}$} (23)
(3) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{12}$} (2md)
(md) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{12}$} (2n);
\draw[-stealth, very thick, auto=right,decoration={snake, segment length=2mm, amplitude=0.5mm,post length=1.5mm}]
(21) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{21}$} (2)
(22) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{21}$} (3)
(23) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{21}$} (md)
(2md) edge[decorate] node[left, near start] {\footnotesize$\boldsymbol \omega_{21}$} (n);
%%%% START STATES %%%%%
\node[text depth=0pt] at (-2, -1) (S) {start};
\draw[-stealth, very thick, auto=right,decoration={snake, segment length=2mm, amplitude=0.5mm,post length=1.5mm}]
(S) edge[decorate] node[above] {\footnotesize$\pi_1$} (1)
(S) edge[decorate] node[below] {\footnotesize$\pi_2$} (21);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,positioning}
\definecolor{mynavy}{HTML}{000080}
\definecolor{darkred}{HTML}{8B0000}
\newcommand{\myGlobalTransformation}[2]
{
\pgftransformcm{1}{0}{0.5}{0.25}{\pgfpoint{#1cm}{#2cm}}
}
\tikzstyle myBG=[line width=3pt,opacity=1.0]
\begin{document}
\begin{tikzpicture}
\begin{scope}
\myGlobalTransformation{0}{0};
\draw [black!50,fill=red!5] (-1, 0) rectangle (9,8);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{4.25};
\draw [black!50,fill=blue!5] (-1, 0) rectangle (9,8);
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{0}
\node (N1) at (1,1) [circle,white,fill=darkred] {};
\node (N2) at (1,3) [circle,white,fill=darkred] {};
\node (N3) at (1,5) [circle,white,fill=darkred] {};
\node (N4) at (1,7) [circle,white,fill=darkred] {};
\node (N5) at (4,1) [circle,white,fill=darkred] {};
\node (N6) at (4,3) [circle,white,fill=darkred] {};
\node (N7) at (4,5) [circle,white,fill=darkred] {};
\node (N8) at (4,7) [circle,white,fill=darkred] {};
\node (N9) at (7,1) [circle,white,fill=darkred] {};
\node (N10) at (7,3) [circle,white,fill=darkred] {};
\node (N11) at (7,5) [circle,white,fill=darkred] {};
\node (N12) at (7,7) [circle,white,fill=darkred] {};
\node (N13) at (8.5,1) {};
\node (N14) at (8.5,3) {};
\node (N15) at (8.5,5) {};
\node (N16) at (8.5,7) {};
\node (N0) at (-0.5,1) {};
\node (N00) at (-0.5,3) {};
\node (N000) at (-0.5,5) {};
\node (N0000) at (-0.5,7) {};
\foreach \x in {1,...,4}
\foreach \y in {5,...,8}
\draw[-stealth, darkred, very thick] (N\x) -- (N\y);
\foreach \x in {5,...,8}
\foreach \y in {9,...,12}
\draw[-stealth, darkred, very thick] (N\x) -- (N\y);
\draw[-stealth, darkred, very thick] (N9) -- (N13);
\draw[-stealth, darkred, very thick] (N10) -- (N14);
\draw[-stealth, darkred, very thick] (N11) -- (N15);
\draw[-stealth, darkred, very thick] (N12) -- (N16);
\draw[-stealth, darkred, very thick] (N0) -- (N1);
\draw[-stealth, darkred, very thick] (N00) -- (N2);
\draw[-stealth, darkred, very thick] (N000) -- (N3);
\draw[-stealth, darkred, very thick] (N0000) -- (N4);
\begin{scope}
\pgftransformreset
\myGlobalTransformation{0}{4.25};
\node (T9) at (7,1) {};
\node (T10) at (7,3) {};
\node (T11) at (7,5) {};
\node (T12) at (7,7) {};
\foreach \x in {5,...,8}
\foreach \y in {9,...,12}
\draw[-stealth,very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (N\x) -- (T\y);
\end{scope}
\end{scope}
\begin{scope}
\myGlobalTransformation{0}{4.25}
\node (N1) at (1,1) [circle,white,fill=mynavy] {};
\node (N2) at (1,3) [circle,white,fill=mynavy] {};
\node (N3) at (1,5) [circle,white,fill=mynavy] {};
\node (N4) at (1,7) [circle,white,fill=mynavy] {};
\node (N5) at (4,1) [circle,white,fill=mynavy] {};
\node (N6) at (4,3) [circle,white,fill=mynavy] {};
\node (N7) at (4,5) [circle,white,fill=mynavy] {};
\node (N8) at (4,7) [circle,white,fill=mynavy] {};
\node (N13) at (8.5,1) {};
\node (N14) at (8.5,3) {};
\node (N15) at (8.5,5) {};
\node (N16) at (8.5,7) {};
\node (N0) at (-0.5,1) {};
\node (N00) at (-0.5,3) {};
\node (N000) at (-0.5,5) {};
\node (N0000) at (-0.5,7) {};
\begin{scope}
\pgftransformreset
\myGlobalTransformation{0}{0};
\node (T9) at (7,1) {};
\node (T10) at (7,3) {};
\node (T11) at (7,5) {};
\node (T12) at (7,7) {};
\foreach \x in {5,...,8}
\foreach \y in {9,...,12}
\draw[-stealth,very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (N\x) -- (T\y);
\end{scope}
\node (N9) at (7,1) [circle,white,fill=mynavy] {};
\node (N10) at (7,3) [circle,white,fill=mynavy] {};
\node (N11) at (7,5) [circle,white,fill=mynavy] {};
\node (N12) at (7,7) [circle,white,fill=mynavy] {};
\draw[-stealth, mynavy, very thick] (N0) -- (N1);
\draw[-stealth, mynavy, very thick] (N00) -- (N2);
\draw[-stealth, mynavy, very thick] (N000) -- (N3);
\draw[-stealth, mynavy, very thick] (N0000) -- (N4);
\foreach \x in {1,...,4}
\foreach \y in {5,...,8}
\draw[-stealth, mynavy, very thick] (N\x) -- (N\y);
\foreach \x in {5,...,8}
\foreach \y in {9,...,12}
\draw[-stealth, mynavy, very thick] (N\x) -- (N\y);
\draw[-stealth, mynavy, very thick] (N9) -- (N13);
\draw[-stealth, mynavy, very thick] (N10) -- (N14);
\draw[-stealth, mynavy, very thick] (N11) -- (N15);
\draw[-stealth, mynavy, very thick] (N12) -- (N16);
\end{scope}
\node at (11, 0.3) {\emph{\textbf{stream 1}}};
\node at (1, 6) {\emph{\textbf{stream 2}}};
\node at (10.8, 3.5) {\emph{\textbf{$\times$-connections}}};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix}
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={rectangle,draw=black,text width=0.05ex,align=center},
nodes in empty cells
},
texto/.style={font=\footnotesize\sffamily},
title/.style={font=\small\sffamily}
}
\tikzset{
tablet/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={rectangle,draw=black,text width=2.25ex,align=center},
text height=1.625ex,
text depth=0ex,
nodes in empty cells
},
texto/.style={font=\footnotesize\sffamily},
title/.style={font=\small\sffamily}
}
\tikzset{
tablett/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={rectangle, text width=0.05ex,align=center},
nodes in empty cells
},
texto/.style={font=\footnotesize\sffamily},
title/.style={font=\small\sffamily}
}
\begin{document}
\begin{tikzpicture}[node distance=0.5cm, auto]
\matrix[table] (t1)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\node[above = 0.01cm of t1] (c1) {Tile 1};
\matrix[table, right =of t1] (t2)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\node[above = 0.01cm of t2] (c2) {Tile 2};
\matrix[table, right =of t2] (t3)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\node[above = 0.01cm of t3] (c3) {Tile 3};
\matrix[tablet, below = 1cm of t1] (mp)
{
\node (1) {\tt 1}; & \node (2) {\tt 2}; & \node (22) {\tt 2}; & \node (3) {\tt 3}; & \dots \\
\vdots & \vdots & \vdots & \vdots & $\ddots$ \\
};
\node[below = 0.01cm of mp] (c4) {Background map};
\draw [-stealth, thick] (1.north) -- (t1.south) ;
\draw [-stealth, thick] (2.north) -- (t2.south);
\draw [-stealth, thick] (22.north) -- (t2.south);
\draw [-stealth, thick] (3.north) -- (t3.south);
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, below right = 1.1cm and -1.5cm of t2] (bg1)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg1] (bg2)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg2] (bg3)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg3] (bg4)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\node[below right = 0.01cm and 0.03cm of bg1] (c5) {Background};
\draw [-stealth, white, ultra thick] (t1.south) -- (bg1.north) ;
\draw [-stealth, white, ultra thick] (t2.south) -- (bg2.north);
\draw [-stealth, white, ultra thick] (t2.south) -- (bg3.north);
\draw [-stealth, thick] (t1.south) -- (bg1.north);
\draw [-stealth, thick] (t2.south) -- (bg2.north);
\draw [-stealth, thick] (t2.south) -- (bg3.north);
\draw [-stealth, thick] (t3.south) -- (bg4.north);
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, below right = 1.1cm and -1.5cm of t2] (bg1)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg1] (bg2)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg2] (bg3)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\matrix[tablett, rectangle, draw, scale=0.2, inner sep=0ex, nodes={inner sep=0.4ex}, right = 0cm of bg3] (bg4)
{
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
|[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
& & & |[fill=gray]| & |[fill=gray]| & & & \\
};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings,arrows}
\begin{document}
\begin{tikzpicture}
% lattice
\draw[->,ultra thick] (-2,0) -- (2,0);
\draw[->,ultra thick] (0,-2) -- (0,2);
\draw (-2,-2) grid (2,2);
\node [draw,ultra thick,rectangle,minimum width=1cm,minimum height=1cm,label=below:$2 \pi$,label=right:$2 \pi$] at (0.5,0.5) {};
% square
\begin{scope}[xshift=4cm,yshift=1cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .145 with {\arrow{latex}},
mark=at position .375 with {\arrow{latex}},
mark=at position .635 with {\arrowreversed{latex}},
mark=at position .875 with {\arrowreversed{latex}},
}
]
(0,-1) -- +(2,0) -- +(2,2) -- +(0,2) -- cycle;
\end{scope}
% bracelet
\begin{scope}[xshift=9.5cm,yshift=1cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}}
}
]
(0,.25) -- ++(2,0);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}}
}
]
(0,-.25) -- ++(2,0);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (0,-.25) to[out=-120,in=0] (-.35,-.75) to[out=180,in=180] (-.35,.75) to[out=0,in=120] (0,.25);
\draw (2,.25) to[out=120,in=0] (1.65,.75) -- (-.35,.75) (-.35,-.75) -- (1.65,-.75) to[out=0,in=-120] (2,-.25);
\begin{scope}
\clip (0,.25) rectangle (2,-.25);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrowreversed{latex}},
}
] (1.65,.75) to[out=180,in=180] (1.65,-.75);
\end{scope}
\end{scope}
% cylinder
\begin{scope}[xshift=14.7cm,yshift=1cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (0,0) -- (2,0);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (0,0) arc[start angle=0,delta angle=-360,x radius=.35,y radius=.75];
\draw (2,0) arc[start angle=0,delta angle=-90,x radius=.35,y radius=.75] -- ++(-2,0);
\draw (2,0) arc[start angle=0,delta angle=90,x radius=.35,y radius=.75] -- ++(-2,0);
\end{scope}
% long cylinder
\begin{scope}[xshift=4cm,yshift=-1.2cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (0,0) -- (3,0);
\draw[postaction={decorate},decoration={
markings,
mark=at position .6 with {\arrow{latex}},
}
] (0,0) arc[start angle=0,delta angle=-360,x radius=.15,y radius=.35];
\draw (3,0) arc[start angle=0,delta angle=-90,x radius=.15,y radius=.35] -- ++(-3,0);
\draw (3,0) arc[start angle=0,delta angle=90,x radius=.15,y radius=.35] -- ++(-3,0);
\end{scope}
% open torus
\begin{scope}[xshift=9cm,yshift=-1.7cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (1,0) arc[start angle=0,delta angle=-360,x radius=.15,y radius=.35];
\draw (1,0) ++(-.15,-.35) .. controls +(170:1) and +(-90:.5) .. ++(-1.5,1) .. controls +(90:.5) and +(180:1) .. ++(2,1) .. controls +(0:1) and +(90:.5) .. ++(2,-1) .. controls +(-90:.5) and +(10:1) .. ++(-1.5,-1) coordinate (a);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (a) ++(-.15,.35) arc[start angle=0,delta angle=-360,x radius=-.15,y radius=.35];
\draw (1,0) ++(-.15,.35) .. controls +(170:.5) and +(-60:.25) .. ++(-.9,.5) coordinate (b);
\draw (a) ++(0,.7) .. controls +(10:.5) and +(240:.25) .. ++(.9,.5) coordinate (c);
\begin{scope}
\clip (1,0) ++(-.15,.35) .. controls +(170:.5) and +(-60:.25) .. ++(-.9,.5) -- ++(0,2) -| (c) .. controls +(240:.25) and +(10:.5) .. ++(-.9,-.5);
\draw (1,0) ++(-.15,-.35) ++(0,-.7) .. controls +(170:1) and +(-90:.5) .. ++(-1.5,.8) .. controls +(90:.5) and +(180:1) .. ++(2,1.2) .. controls +(0:1) and +(90:.5) .. ++(2,-1.2) .. controls +(-90:.5) and +(10:1) .. ++(-1.5,-.8);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (1,0) ++(-.15,-.35) ++(0,-.8) .. controls +(170:1) and +(-90:.5) .. ++(-1.5,.8) .. controls +(90:.5) and +(180:1.2) .. ++(2,1.5) .. controls +(0:1.2) and +(90:.5) .. ++(2,-1.5) .. controls +(-90:.5) and +(10:1) .. ++(-1.5,-.8);
\end{scope}
\begin{scope}
\clip (a) ++(-.15,.35) arc[start angle=0,delta angle=-360,x radius=-.15,y radius=.35];
\draw (a) ++(-.15,.35) .. controls +(10:1) and +(-90:.5) .. ++(1.5,.8);
\end{scope}
\begin{scope}
\clip (1,0) arc[start angle=0,delta angle=-360,x radius=.15,y radius=.35];
\draw (1,0) .. controls +(170:1) and +(-90:.5) .. ++(-1.5,.8);
\end{scope}
\end{scope}
% torus
\begin{scope}[xshift=14cm,yshift=-1.7cm]
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrowreversed{latex}},
}
] (1.5,.35) arc[start angle=90,end angle=-90,y radius=.35,x radius=.1];
\draw (1.5,-.35) .. controls +(180:1) and +(-90:.65) .. ++(-2,1) .. controls +(90:.65) and +(180:1) .. ++(2,1) .. controls +(0:1) and +(90:.65) .. ++(2,-1) .. controls +(-90:.65) and +(0:1) .. ++(-2,-1); \draw (1.5,.35) .. controls +(180:.5) and +(-50:.25) .. ++(-1.3,.35) coordinate (b);
\draw (1.5,.35) .. controls +(0:.5) and +(230:.25) .. ++(1.3,.35) coordinate (c);
\begin{scope}
\clip (1.5,.35) .. controls +(180:.5) and +(-50:.25) .. ++(-1.3,.35) -- ++(0,2) -| (c) .. controls +(230:.25) and +(0:.5) .. ++(-1.3,-.35);
\draw (1.5,-.35) ++(0,-.7) .. controls +(180:1) and +(-90:.65) .. ++(-1.5,1) .. controls +(90:.65) and +(180:1) .. ++(1.5,1) .. controls +(0:1) and +(90:.65) .. ++(1.5,-1) .. controls +(-90:.65) and +(0:1) .. ++(-1.5,-1);
\draw[postaction={decorate},decoration={
markings,
mark=at position .5 with {\arrow{latex}},
}
] (1.5,-.35) ++(0,-.6) .. controls +(180:1) and +(-90:.65) .. ++(-1.5,1) .. controls +(90:.65) and +(180:1) .. ++(1.5,1) .. controls +(0:1) and +(90:.65) .. ++(1.5,-1) .. controls +(-90:.65) and +(0:1) .. ++(-1.5,-1);
\end{scope}
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{pgfplots,siunitx}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmode=log,
domain=1e17:1e21,
ymax=1,
enlargelimits=false,
ylabel=$zT$,
xlabel=Carrier concentration $n$ (\si{\per\centi\meter\cubed}),
grid=both,
width=12cm,
height=8cm,
decoration={name=none},
]
\addplot [ultra thick, smooth, red!85!black] coordinates {
(1.174e+18, 0.2317)
(1.551e+18, 0.2787)
(2.016e+18, 0.3300)
(2.549e+18, 0.3816)
(3.171e+18, 0.4332)
(3.891e+18, 0.4842)
(4.697e+18, 0.5373)
(5.623e+18, 0.5892)
(6.714e+18, 0.6404)
(8.017e+18, 0.6923)
(9.650e+18, 0.7450)
(1.178e+19, 0.7963)
(1.461e+19, 0.8486)
(1.878e+19, 0.8964)
(2.481e+19, 0.9278)
(3.279e+19, 0.9318)
(4.334e+19, 0.9057)
(5.515e+19, 0.8571)
(6.662e+19, 0.8045)
(7.767e+19, 0.7519)
(8.859e+19, 0.7000)
(1.008e+20, 0.6476)
(1.143e+20, 0.5953)
(1.290e+20, 0.5449)
(1.447e+20, 0.4906)
(1.628e+20, 0.4374)
(1.837e+20, 0.3850)
(2.101e+20, 0.3327)
(2.436e+20, 0.2799)
(2.887e+20, 0.2281)
(3.594e+20, 0.1753)
(4.674e+20, 0.1271)
(6.178e+20, 0.08917)
(8.167e+20, 0.06240)
(1e+21, 0.05)
} node[pos=0.48, anchor=north] {$zT$};
\addplot [ultra thick, smooth, blue!70!black] coordinates {
(1.176e+18, 0.005689)
(1.554e+18, 0.008070)
(2.054e+18, 0.009285)
(2.714e+18, 0.01216)
(3.587e+18, 0.01561)
(4.740e+18, 0.02190)
(6.264e+18, 0.02984)
(8.277e+18, 0.04013)
(1.094e+19, 0.05127)
(1.445e+19, 0.06820)
(1.910e+19, 0.09120)
(2.511e+19, 0.1191)
(3.333e+19, 0.1593)
(4.344e+19, 0.2072)
(5.433e+19, 0.2587)
(6.613e+19, 0.3123)
(7.852e+19, 0.3739)
(8.925e+19, 0.4266)
(1.001e+20, 0.4779)
(1.110e+20, 0.5310)
(1.224e+20, 0.5824)
(1.335e+20, 0.6359)
(1.441e+20, 0.6893)
(1.551e+20, 0.7425)
(1.660e+20, 0.7960)
(1.767e+20, 0.8478)
(1.876e+20, 0.9009)
(1.986e+20, 0.9532)
(2.08e+20, 1)
} node[pos=0.95, anchor=east] {$\sigma$};
\addplot [ultra thick, smooth, green!70!black] coordinates {
(1.175e+18, 0.08187)
(1.553e+18, 0.08218)
(2.053e+18, 0.08379)
(2.713e+18, 0.08472)
(3.585e+18, 0.08684)
(4.738e+18, 0.08916)
(6.261e+18, 0.09142)
(8.274e+18, 0.09411)
(1.093e+19, 0.09912)
(1.445e+19, 0.1059)
(1.909e+19, 0.1145)
(2.523e+19, 0.1256)
(3.334e+19, 0.1391)
(4.405e+19, 0.1576)
(5.821e+19, 0.1830)
(7.691e+19, 0.2164)
(1.016e+20, 0.2605)
(1.302e+20, 0.3102)
(1.589e+20, 0.3629)
(1.882e+20, 0.4143)
(2.181e+20, 0.4641)
(2.472e+20, 0.5181)
(2.764e+20, 0.5714)
(3.066e+20, 0.6246)
(3.363e+20, 0.6780)
(3.669e+20, 0.7310)
(3.981e+20, 0.7826)
(4.273e+20, 0.8389)
(4.560e+20, 0.8942)
(4.868e+20, 0.9493)
(5.2e+20, 1)
} node[pos=0.95, anchor=west] {$\kappa$};
\addplot [ultra thick, smooth, orange] coordinates {
(1.65e+18, 1)
(1.931e+18, 0.9729)
(2.553e+18, 0.9248)
(3.375e+18, 0.8777)
(4.462e+18, 0.8302)
(5.899e+18, 0.7816)
(7.745e+18, 0.7351)
(1.031e+19, 0.6866)
(1.363e+19, 0.6397)
(1.802e+19, 0.5897)
(2.382e+19, 0.5412)
(3.149e+19, 0.4937)
(4.162e+19, 0.4471)
(5.503e+19, 0.3977)
(7.117e+19, 0.3500)
(9.181e+19, 0.2944)
(1.224e+20, 0.2436)
(1.618e+20, 0.2019)
(2.138e+20, 0.1687)
(2.826e+20, 0.1389)
(3.736e+20, 0.1161)
(4.938e+20, 0.09646)
(6.321e+20, 0.08022)
(8.578e+20, 0.06624)
(1e+21, 0.06)
} node[pos=0.1, anchor=south west] {$S$};
\addplot [ultra thick, smooth, cyan] coordinates {
(1.159e+18, 0.04006)
(1.532e+18, 0.04739)
(2.025e+18, 0.05790)
(2.676e+18, 0.06974)
(3.386e+18, 0.08033)
(4.675e+18, 0.09928)
(6.179e+18, 0.1176)
(8.168e+18, 0.1379)
(1.080e+19, 0.1608)
(1.427e+19, 0.1864)
(1.886e+19, 0.2142)
(2.492e+19, 0.2430)
(3.294e+19, 0.2713)
(4.353e+19, 0.2989)
(5.754e+19, 0.3230)
(7.605e+19, 0.3422)
(1.005e+20, 0.3528)
(1.314e+20, 0.3509)
(1.757e+20, 0.3326)
(2.327e+20, 0.3049)
(3.071e+20, 0.2777)
(4.061e+20, 0.2535)
(5.369e+20, 0.2304)
(7.098e+20, 0.2095)
(1e+21, 0.185)
} node[pos=0.4, anchor=south east] {$S^2 \sigma$};
\end{axis}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{patterns,decorations.markings}
\tikzset{
cross/.style={fill=white,path picture={\draw[black] (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);}},
dressed/.style={fill=white,postaction={pattern=north east lines}},
momentum/.style 2 args={->,semithick,yshift=5pt,shorten >=5pt,shorten <=5pt},
loop/.style 2 args={thick,decoration={markings,mark=at position {#1} with {\arrow{>},\node[anchor=\pgfdecoratedangle-90,font=\footnotesize] {$p_{#2}$};}},postaction={decorate}},
label/.style={thin,gray,shorten <=-1.5ex}
}
\def\lrad{5/4}
\def\mrad{0.15*\lrad}
\def\srad{0.1*\lrad}
\begin{document}
% Diagram 1
\begin{tikzpicture}
% Loop
\draw[loop/.list={{0.0625}{6},{0.0625*3}{1},{0.0625*5}{2},{0.0625*7}{3},{0.0625*10}{4},{0.0625*14}{5}}] (0,0) circle (\lrad);
\draw[cross] (0,\lrad) circle (\srad) node[above=5pt] {$\partial_k R_{k,ij}(p_1,p_2)$};
\draw[dressed] (135:\lrad) circle (\srad) node[above left] {$G_{k,jk}(p_2,p_3)$};
\draw[dressed] (45:\lrad) circle (\srad) node[above right] {$G_{k,ni}(p_6,p_1)$};
\draw[dressed] (0,-\lrad) circle (\srad) node[below=3pt] {$G_{k,lm}(p_4,p_5)$};
% External lines
\draw (-2*\lrad,0) coordinate (xl) -- (-\lrad,0) node[pos=0.4,below] {$\varphi_a$};
\draw[momentum] (-2*\lrad,0) -- (-1.25*\lrad,0) node[midway,above] {$q_1$};
\draw (\lrad,0) -- (2*\lrad,0) coordinate (xr) node[pos=0.6,below] {$\varphi_b$};
\draw[momentum] (1.25*\lrad,0) -- (2*\lrad,0) node[midway,above] {$q_2$};
% Vertices
\node at (-1.6*\lrad,-\lrad) (Gkail) {$\Gamma_{k,akl}^{(3)}(q_1,p_3,-p_4)$};
\draw[label] (Gkail) -- (-\lrad,0);
\draw[dressed] (-\lrad,0) circle (\mrad);
\node at (2*\lrad,-\lrad) (Gkbde) {$\Gamma_{k,bmn}^{(3)}(-q_2,p_5,-p_6)$};
\draw[label] (Gkbde.150) -- (\lrad,0);
\draw[dressed] (\lrad,0) circle (\mrad);
\end{tikzpicture}
% Diagram 2
\begin{tikzpicture}
% Loop
\draw[loop/.list={{0.0625*2}{6},{0.0625*6}{3},{0.0625*9}{4},{0.0625*11}{1},{0.0625*13}{2},{0.0625*15}{5}}] (0,0) circle (\lrad);
\draw[cross] (0,-\lrad) circle (\srad) node[below=5pt] {$\partial_k R_{k,ij}(p_1,p_2)$};
\draw[dressed] (-45:\lrad) circle (\srad) node[below right] {$G_{k,jm}(p_2,p_5)$};
\draw[dressed] (-135:\lrad) circle (\srad) node[below left] {$G_{k,li}(p_4,p_1)$};
\draw[dressed] (0,\lrad) circle (\srad) node[above=3pt] {$G_{k,nk}(p_6,p_3)$};
% External lines
\draw (-2*\lrad,0) coordinate (xl) -- (-\lrad,0) node[pos=0.4,below] {$\varphi_a$};
\draw[momentum] (-2*\lrad,0) -- (-1.25*\lrad,0) node[midway,above] {$q_1$};
\draw (\lrad,0) -- (2*\lrad,0) coordinate (xr) node[pos=0.6,below] {$\varphi_b$};
\draw[momentum] (1.25*\lrad,0) -- (2*\lrad,0) node[midway,above] {$q_2$};
% Vertices
\node at (-1.8*\lrad,\lrad) (Gkail) {$\Gamma_{k,akl}^{(3)}(q_1,p_3,-p_4)$};
\draw[label] (Gkail) -- (-\lrad,0);
\draw[dressed] (-\lrad,0) circle (\mrad);
\node at (1.8*\lrad,\lrad) (Gkbde) {$\Gamma_{k,bmn}^{(3)}(-q_2,p_5,-p_6)$};
\draw[label] (Gkbde) -- (\lrad,0);
\draw[dressed] (\lrad,0) circle (\mrad);
\end{tikzpicture}
% Diagram 3
\begin{tikzpicture}
% Loop
\draw[loop/.list={{0.0625*2}{1},{0.0625*6}{2},{0.0625*10}{3},{0.0625*14}{4}}] (0,0) circle (\lrad);
\draw[cross] (0,\lrad) circle (\srad) node[above=5pt] {$\partial_k R_{k,ij}(p_1,p_2)$};
\draw[dressed] (-\lrad,0) circle (\srad) node[left=2pt] {$G_{k,jk}(p_2,p_3)$};
\draw[dressed] (\lrad,0) circle (\srad) node[right=2pt] {$G_{k,li}(p_4,p_1)$};
% External lines
\draw (-2.2*\lrad,-\lrad) -- (2.2*\lrad,-\lrad) node[pos=0.1,below] {$\varphi_a$} node[pos=0.9,below] {$\varphi_b$};
\draw[momentum] (-2*\lrad,-\lrad) -- (-\lrad,-\lrad) node[midway,above] {$q_1$};
\draw[momentum] (\lrad,-\lrad) -- (2*\lrad,-\lrad) node[midway,above] {$q_2$};
% Vertices
\draw[dressed] (0,-\lrad) circle (\mrad) node[below] {$\Gamma_{k,abkl}^{(4)}(q_1,-q_2,p_3,-p_4)$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
% Gradient Info
\tikzset {_4c6h9fmv2/.code = {\pgfsetadditionalshadetransform{ \pgftransformshift{\pgfpoint{0 bp } { 0 bp } } \pgftransformrotate{0 } \pgftransformscale{2 } }}}
\pgfdeclarehorizontalshading{_w5gdki77u}{150bp}{rgb(0bp)=(1,1,1);
rgb(37.5bp)=(1,1,1);
rgb(62.5bp)=(0,0,0);
rgb(100bp)=(0,0,0)}
\tikzset{_flphwwo2w/.code = {\pgfsetadditionalshadetransform{\pgftransformshift{\pgfpoint{0 bp } { 0 bp } } \pgftransformrotate{0 } \pgftransformscale{2 } }}}
\pgfdeclarehorizontalshading{_mxyd2nws7} {150bp} {color(0bp)=(transparent!0);
color(37.5bp)=(transparent!0);
color(62.5bp)=(transparent!10);
color(100bp)=(transparent!10) }
\pgfdeclarefading{_atyxpg39b}{\tikz \fill[shading=_mxyd2nws7,_flphwwo2w] (0,0) rectangle (50bp,50bp); }
% Gradient Info
\tikzset {_1vv4aec2h/.code = {\pgfsetadditionalshadetransform{ \pgftransformshift{\pgfpoint{0 bp } { 0 bp } } \pgftransformrotate{0 } \pgftransformscale{2 } }}}
\pgfdeclarehorizontalshading{_sprp2j4ay}{150bp}{rgb(0bp)=(0.65,0.81,0.87);
rgb(37.5bp)=(0.65,0.81,0.87);
rgb(62.5bp)=(0.14,0.33,0.54);
rgb(100bp)=(0.14,0.33,0.54)}
\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,386.25); %set diagram left start at 0, and has height of 386.25
%Rounded Rect [id:dp8427758470201833]
\draw (388.63,108.07) .. controls (388.63,95.88) and (398.51,86) .. (410.7,86) -- (485.57,86) .. controls (497.75,86) and (507.63,95.88) .. (507.63,108.07) -- (507.63,174.27) .. controls (507.63,186.45) and (497.75,196.33) .. (485.57,196.33) -- (410.7,196.33) .. controls (398.51,196.33) and (388.63,186.45) .. (388.63,174.27) -- cycle ;
%Rounded Rect [id:dp3169403847789256]
\draw (129.63,181.07) .. controls (129.63,168.88) and (139.51,159) .. (151.7,159) -- (226.57,159) .. controls (238.75,159) and (248.63,168.88) .. (248.63,181.07) -- (248.63,247.27) .. controls (248.63,259.45) and (238.75,269.33) .. (226.57,269.33) -- (151.7,269.33) .. controls (139.51,269.33) and (129.63,259.45) .. (129.63,247.27) -- cycle ;
%Shape: Circle [id:dp7450020212232851]
\draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (217,126.32) .. controls (217,121.72) and (220.72,118) .. (225.32,118) .. controls (229.91,118) and (233.63,121.72) .. (233.63,126.32) .. controls (233.63,130.91) and (229.91,134.63) .. (225.32,134.63) .. controls (220.72,134.63) and (217,130.91) .. (217,126.32) -- cycle ;
%Shape: Circle [id:dp005827607772636467]
\draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (216,175.32) .. controls (216,170.72) and (219.72,167) .. (224.32,167) .. controls (228.91,167) and (232.63,170.72) .. (232.63,175.32) .. controls (232.63,179.91) and (228.91,183.63) .. (224.32,183.63) .. controls (219.72,183.63) and (216,179.91) .. (216,175.32) -- cycle ;
%Shape: Circle [id:dp34524209173568676]
\draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (289.32,143.33) .. controls (289.32,138.74) and (293.04,135.02) .. (297.63,135.02) .. controls (302.23,135.02) and (305.95,138.74) .. (305.95,143.33) .. controls (305.95,147.93) and (302.23,151.65) .. (297.63,151.65) .. controls (293.04,151.65) and (289.32,147.93) .. (289.32,143.33) -- cycle ;
%Straight Lines [id:da8271448645768573]
\draw (297.63,143.33) -- (385.32,143.33) ;
\draw [shift={(387.32,143.33)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
%Shape: Square [id:dp7469087349202225]
\draw [fill={rgb, 255:red, 74; green, 144; blue, 226 } ,fill opacity=0.34 ] (11.32,110.82) -- (31.5,110.82) -- (31.5,131) -- (11.32,131) -- cycle ;
%Shape: Square [id:dp2906273668048538]
\draw [fill={rgb, 255:red, 155; green, 155; blue, 155 } ,fill opacity=0.56 ] (11.32,131) -- (31.5,131) -- (31.5,151.18) -- (11.32,151.18) -- cycle ;
%Shape: Square [id:dp0257238778260086]
\draw [fill={rgb, 255:red, 184; green, 233; blue, 134 } ,fill opacity=1 ] (11.32,151.18) -- (31.5,151.18) -- (31.5,171.37) -- (11.32,171.37) -- cycle ;
%Shape: Square [id:dp34631290295164263]
\draw [fill={rgb, 255:red, 248; green, 231; blue, 28 } ,fill opacity=0.63 ] (11.32,171.37) -- (31.5,171.37) -- (31.5,191.55) -- (11.32,191.55) -- cycle ;
%Shape: Square [id:dp7099563053307321]
\path [shading=_w5gdki77u,_4c6h9fmv2,path fading= _atyxpg39b ,fading transform={xshift=2}] (11.32,211.73) -- (31.5,211.73) -- (31.5,231.92) -- (11.32,231.92) -- cycle ; % for fading
\draw (11.32,211.73) -- (31.5,211.73) -- (31.5,231.92) -- (11.32,231.92) -- cycle ; % for border
%Shape: Square [id:dp277447687834944]
\path [shading=_sprp2j4ay,_1vv4aec2h] (11.32,231.92) -- (31.5,231.92) -- (31.5,252.1) -- (11.32,252.1) -- cycle ; % for fading
\draw (11.32,231.92) -- (31.5,231.92) -- (31.5,252.1) -- (11.32,252.1) -- cycle ; % for border
%Shape: Square [id:dp2517468749584255]
\draw [fill={rgb, 255:red, 245; green, 166; blue, 35 } ,fill opacity=1 ] (11.32,252.1) -- (31.5,252.1) -- (31.5,272.28) -- (11.32,272.28) -- cycle ;
%Shape: Square [id:dp7774821387369513]
\draw [fill={rgb, 255:red, 224; green, 16; blue, 203 } ,fill opacity=0.6 ] (11.32,191.55) -- (31.5,191.55) -- (31.5,211.73) -- (11.32,211.73) -- cycle ;
% Text Node
\draw (448,112) node [scale=1.7280000000000002] [align=left] {{\Large D}};
% Text Node
\draw (443.75,170) node [align=left] {Discriminator};
% Text Node
\draw (184,203) node [scale=1.7280000000000002] [align=left] {G};
% Text Node
\draw (185.75,236) node [align=left] {Generator};
\end{tikzpicture}
\end{document}
|
|
\documentclass[11pt]{article}
\usepackage{tikz}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{comment}
:Title: Schema of Labs on a class
:Tags: Shadows;Styles;Backgrounds;Diagrams
:Author: Cristo J. Alanis
:Slug: labs-schema
Listado de pr\'acticas
\end{comment}
\usetikzlibrary{shadows,arrows}
% Define the layers to draw the diagram
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
% Define block styles
\tikzstyle{materia}=[draw, fill=blue!20, text width=6.0em, text centered,
minimum height=1.5em,drop shadow]
\tikzstyle{practica} = [materia, text width=8em, minimum width=10em,
minimum height=3em, rounded corners, drop shadow]
\tikzstyle{texto} = [above, text width=6em, text centered]
\tikzstyle{linepart} = [draw, thick, color=black!50, -latex', dashed]
\tikzstyle{line} = [draw, thick, color=black!50, -latex']
\tikzstyle{ur}=[draw, text centered, minimum height=0.01em]
% Define distances for bordering
\newcommand{\blockdist}{1.3}
\newcommand{\edgedist}{1.5}
\newcommand{\practica}[2]{node (p#1) [practica]
{Pr\'actica #1\\{\scriptsize\textit{#2}}}}
% Draw background
\newcommand{\background}[5]{%
\begin{pgfonlayer}{background}
% Left-top corner of the background rectangle
\path (#1.west |- #2.north)+(-0.5,0.5) node (a1) {};
% Right-bottom corner of the background rectanle
\path (#3.east |- #4.south)+(+0.5,-0.25) node (a2) {};
% Draw the background
\path[fill=yellow!20,rounded corners, draw=black!50, dashed]
(a1) rectangle (a2);
\path (a1.east |- a1.south)+(0.8,-0.3) node (u1)[texto]
{\scriptsize\textit{Unidad #5}};
\end{pgfonlayer}}
\newcommand{\transreceptor}[3]{%
\path [linepart] (#1.east) -- node [above]
{\scriptsize Transreceptor #2} (#3);}
\begin{document}
\begin{tikzpicture}[scale=0.7,transform shape]
% Draw diagram elements
\path \practica {1}{Diferencias en componentes electr\'onicos};
\path (p1.south)+(0.0,-1.0) \practica{2}{Serie de Fourier};
\path (p2.south)+(-2.5,-1.5) \practica{3}{Antena para HF};
\path (p3.south)+(0.0,-1.0) \practica{5}{Medidor de SWR};
\path (p3.south)+(5.0,-1.0) \practica{4}{Amplificador para HF};
\path (p4.south)+(-2.5,-1.5) \practica{6}{Oscilador de RF};
\path (p6.south)+(-2.5,-1.25) \practica{7}{Modulador AM};
\path (p6.south)+(2.5,-1.25) \practica{8}{Demodulador AM};
\path (p8.east)+(+5.5,0) node (ur1)[ur] {};
\path (p7.south)+(0.0,-1.5) \practica{9}{Codificador digital};
\path (p8.south)+(0.0,-1.5) \practica{10}{Decodificador digital};
\path (p10.east)+(+5.5,0) node (ur2)[ur] {};
\path (p9.south)+(0.0,-1.5) \practica{11}{Codificador FDM};
\path (p10.south)+(0.0,-1.5) \practica{12}{Decodificador FDM};
\path (p12.east)+(+5.5,0) node (ur3)[ur] {};
\path (p11.south)+(0.0,-1.5) \practica{13}{Codificador SSTV};
\path (p12.south)+(0.0,-1.5) \practica{14}{Decodificador SSTV};
\path (p14.east)+(+5.5,0) node (ur4)[ur] {};
\path (p14.south)+(-2.5,-1.5) \practica{15}{Conmutaci\'on telef\'onica};
\path (p15.south)+(0.0,-1.0) \practica{16}{Telfon\'ia celular an\'aloga};
\path (p16.south)+(0.0,-1.5) \practica{17}{Receptor de telemetr\'ia};
\path (p17.south)+(0.0,-1.5) \practica{18}{Gu\'ias de ondas};
% Draw arrows between elements
\path [line] (p1.south) -- node [above] {} (p2);
\path [line] (p2.south) -- +(0.0,-0.5) -- +(-2.5,-0.5)
-- node [above, midway] {} (p3);
\path [line] (p3.south) -- node [above] {} (p5) ;
\path [line] (p2.south) -- +(0.0,-0.5) -- +(+2.5,-0.5)
-- node [above, midway] {} (p4);
\path [linepart] (p3.east) -- +(+0.5,-0.0) -- +(+0.5,-1.75)
-- node [left, midway] {} (p4);
\path [linepart] (p3.east) -- +(+0.5,-0.0) -- +(+0.5,-1.75)
-- node [left, midway] {} (p4);
\path [line] (p4.south) -- +(0.0,-0.5) -- +(-2.5,-0.5)
-- node [above, midway] {} (p6);
\path [line] (p5.south) -- +(0.0,-0.5) -- +(+2.5,-0.5)
-- node [above, midway] {} (p6);
\path [linepart] (p2.east) -- +(2.75,0.0) -- +(2.75,-5.85)
-- node [right] {} (p6);
\path [line] (p6.south) -- +(0.0,-0.25) -- +(-2.5,-0.25)
-- node [above, midway] {} (p7);
\path [line] (p6.south) -- +(0.0,-0.25) -- +(+2.5,-0.25)
-- node [above, midway] {} (p8);
\path [linepart] (p7.east) -- node [left] {} (p8);
\transreceptor{p8}{AM banda 40m}{ur1}
\path [line] (p7.south) -- node [above] {} (p9) ;
\path [line] (p8.south) -- node [above] {} (p10) ;
\path [linepart] (p9.east) -- node [left] {} (p10);
\transreceptor{p10}{CW}{ur2}
\path [line] (p9.south) -- node [above] {} (p11) ;
\path [line] (p10.south) -- node [above] {} (p12) ;
\path [linepart] (p11.east) -- node [left] {} (p12);
\transreceptor{p12}{FDMDV}{ur3}
\path [line] (p11.south) -- node [above] {} (p13) ;
\path [line] (p12.south) -- node [above] {} (p14) ;
\path [linepart] (p13.east) -- node [left] {} (p14);
\transreceptor{p14}{SSTV}{ur4}
\path [line] (p14.south) -- +(0.0,-0.5) -- +(-2.5,-0.5)
-- node [above, midway] {} (p15);
\path [line] (p13.south) -- +(0.0,-0.5) -- +(+2.5,-0.5)
-- node [above, midway] {} (p15);
\path [line] (p15.south) -- node [above] {} (p16) ;
\path [line] (p16.south) -- node [above] {} (p17) ;
\path [line] (p17.south) -- node [above] {} (p18) ;
\background{p3}{p1}{p4}{p2}{I}
\background{p3}{p3}{p4}{p5}{II}
\background{p3}{p6}{p4}{p7}{III}
\background{p3}{p9}{p4}{p10}{IV}
\background{p3}{p11}{p4}{p12}{V}
\background{p3}{p13}{p4}{p14}{VI}
\background{p3}{p15}{p4}{p16}{VII}
\background{p3}{p17}{p4}{p17}{VIII}
\background{p3}{p18}{p4}{p18}{IX}
\end{tikzpicture}
\end{document}
|
|
% https://texample.net/tikz/examples/swan-wave-model/
% Author: Marco Miani
% SWAN (developed by SWAN group, TU Delft, The Netherlands) is a wave spectral numerical model.
%For Simlating WAves Nearshore, it is necessary to define spatial grids of
%physical dominant factors (wind friction, dissipation) as well as define a COMPUTATIONAL
%grid on which the model performs its (spectral) calculations: budgeting energy spectra over
%each cell of the (computational) grid. Grids might have different spatial resolution and extension.
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
% Define the layers to draw the diagram
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
\begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]
\begin{pgfonlayer}{background}
\draw [help lines, step=1,color=blue!15, very thin] (-6, 11) grid (10,-7);
\end{pgfonlayer}
\begin{pgfonlayer}{foreground}
% help guide lines
\draw [help lines,dashed] (0,-7) -- (0,11);
\draw [help lines,dashed] (-6,0) -- (10,0);
\node at (9,10) (zero) {(9,10)};
\node at (6,6) (zero) {(6,6)};
\node at (4,4) (zero) {(4,4)};
\node at (-5,4) (zero) {(-5,4)};
\node at (-5,1) (zero) {(-5,1)};
\node at (-5,-2) (zero) {(-5,-2)};
\node at (-5,-5) (zero) {(-5,-5)};
\node at (7,-5) (zero) {(7,-5)};
\node at (8,-7) (zero) {(8,-7)};
\node at (0,-7) (zero) {(0,-7)};
\end{pgfonlayer}
% Comp G
%slanting: production of a set of n 'laminae' to be piled up. N=number of grids.
\begin{scope}[
yshift=-83,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
% opacity to prevent graphical interference
\fill[white,fill opacity=0.9] (0,0) rectangle (5,5);
\draw[step=5mm, black] (0,0) grid (5,5); % defining grids
\draw[step=1mm, red!50,thin] (3,1) grid (4,2); % Nested Grid
\draw[black,very thick] (0,0) rectangle (5,5); % marking borders
\fill[red] (0.05,0.05) rectangle (0.5,0.5); % Idem as above, for the n-th grid:
% add some labels
\begin{scope}[color=blue,font=\footnotesize]
\node at (0,0) (a) {(0,0)};
\node at (5,5) (a) {(5,5)};
\node at (5,0) (a) {(5,0)};
\node at (0,5) (a) {(0,5)};
\end{scope}
\end{scope}
% Bathymetry up
\begin{scope}[
yshift=0,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=.9] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\draw[step=5mm, black] (0,0) grid (5,5);
\end{scope}
% Wind G
% grid with internal 3x3 of step=10mm
\begin{scope}[
yshift=90,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=.9] (0,0) rectangle (5,5);
\draw[step=10mm, black] (1,1) grid (4,4);
\draw[black,very thick] (1,1) rectangle (4,4);
\draw[black,dashed] (0,0) rectangle (5,5);
\node at (1,1) (a) {(1,1)};
\end{scope}
% Friction G
% grid with green subgrid of 2mm step
\begin{scope}[
yshift=170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.6] (0,0) rectangle (5,5);
\draw[step=10mm, black] (2,2) grid (5,5);
\draw[step=2mm, green] (2,2) grid (3,3);
\draw[black,very thick] (2,2) rectangle (5,5);
\draw[black,dashed] (0,0) rectangle (5,5);
\node at (2,2) (a) {(2,2)};
\end{scope}
% bottom grid
\begin{scope}[
yshift=-170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
%marking border
\draw[black,very thick] (0,0) rectangle (5,5);
%drawing corners (P1,P2, P3): only 3 points needed to define a plane.
\draw [fill=lime](0,0) circle (.1) ;
\draw [fill=lime](0,5) circle (.1);
\draw [fill=lime](5,0) circle (.1);
\draw [fill=lime](5,5) circle (.1);
%drawing bathymetric hypotetic countours on the bottom grid:
\draw [ultra thick](0,1) parabola bend (2,2) (5,1) ;
\draw [dashed] (0,1.5) parabola bend (2.5,2.5) (5,1.5) ;
\draw [dashed] (0,2) parabola bend (2.7,2.7) (5,2) ;
\draw [dashed] (0,2.5) parabola bend (3.5,3.5) (5,2.5) ;
\draw [dashed] (0,3.5) parabola bend (2.75,4.5) (5,3.5);
\draw [dashed] (0,4) parabola bend (2.75,4.8) (5,4);
\draw [dashed] (0,3) parabola bend (2.75,3.8) (5,3);
\draw[-latex,thick](2.8,1) node[right]{$\mathsf{Shoreline}$}
to[out=180,in=270] (2,1.99);
\end{scope} %end of drawing grids
% arrows
%putting arrows and labels:
\draw[-latex,thick] (6.2,2) node[right]{$\mathsf{Bathymetry (up)}$}
to[out=180,in=90] (4,2);
\draw[-latex,thick](5.8,-.3)node[right]{$\mathsf{Comp.\ G.}$}
to[out=180,in=90] (3.9,-1);
\draw[-latex,thick](5.9,5)node[right]{$\mathsf{Wind\ G.}$}
to[out=180,in=90] (3.6,5);
\draw[-latex,thick](5.9,8.4)node[right]{$\mathsf{Friction\ G.}$}
to[out=180,in=90] (3.2,8);
\draw[-latex,thick,red](5.3,-4.2)node[right]{$\mathsf{G. Cell}$}
to[out=180,in=90] (0,-2.5);
\draw[-latex,thick,red](4.3,-1.9)node[right]{$\mathsf{Nested\ G.}$}
to[out=180,in=90] (2,-.5);
\draw[-latex,thick](4,-6)node[right]{$\mathsf{Batymetry (dn)}$}
to[out=180,in=90] (2,-5);
\end{tikzpicture}
\end{document}
|
|
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb, latexsym}
%\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{fadings}
\begin{document}
\begin{tikzpicture}
\node at (0.5,-1){\begin{tabular}{c}input image\\layer $l = 0$\end{tabular}};
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- (0,0);
\node at (3,3.5){\begin{tabular}{c}convolutional layer\\with non-linearities\\layer $l = 1$\end{tabular}};
\draw[fill=black,opacity=0.2,draw=black] (2.75,1.25) -- (3.75,1.25) -- (3.75,2.25) -- (2.75,2.25) -- (2.75,1.25);
\draw[fill=black,opacity=0.2,draw=black] (2.5,1) -- (3.5,1) -- (3.5,2) -- (2.5,2) -- (2.5,1);
\draw[fill=black,opacity=0.2,draw=black] (2.25,0.75) -- (3.25,0.75) -- (3.25,1.75) -- (2.25,1.75) -- (2.25,0.75);
\draw[fill=black,opacity=0.2,draw=black] (2,0.5) -- (3,0.5) -- (3,1.5) -- (2,1.5) -- (2,0.5);
\draw[fill=black,opacity=0.2,draw=black] (1.75,0.25) -- (2.75,0.25) -- (2.75,1.25) -- (1.75,1.25) -- (1.75,0.25);
\draw[fill=black,opacity=0.2,draw=black] (1.5,0) -- (2.5,0) -- (2.5,1) -- (1.5,1) -- (1.5,0);
\node at (4.5,-1){\begin{tabular}{c}subsampling layer\\layer $l = 3$\end{tabular}};
\draw[fill=black,opacity=0.2,draw=black] (5,1.25) -- (5.75,1.25) -- (5.75,2) -- (5,2) -- (5,1.25);
\draw[fill=black,opacity=0.2,draw=black] (4.75,1) -- (5.5,1) -- (5.5,1.75) -- (4.75,1.75) -- (4.75,1);
\draw[fill=black,opacity=0.2,draw=black] (4.5,0.75) -- (5.25,0.75) -- (5.25,1.5) -- (4.5,1.5) -- (4.5,0.75);
\draw[fill=black,opacity=0.2,draw=black] (4.25,0.5) -- (5,0.5) -- (5,1.25) -- (4.25,1.25) -- (4.25,0.5);
\draw[fill=black,opacity=0.2,draw=black] (4,0.25) -- (4.75,0.25) -- (4.75,1) -- (4,1) -- (4,0.25);
\draw[fill=black,opacity=0.2,draw=black] (3.75,0) -- (4.5,0) -- (4.5,0.75) -- (3.75,0.75) -- (3.75,0);
\node at (7,3.5){\begin{tabular}{c}convolutional layer\\with non-linearities\\layer $l = 4$\end{tabular}};
\draw[fill=black,opacity=0.2,draw=black] (7.5,1.75) -- (8.25,1.75) -- (8.25,2.5) -- (7.5,2.5) -- (7.5,1.75);
\draw[fill=black,opacity=0.2,draw=black] (7.25,1.5) -- (8,1.5) -- (8,2.25) -- (7.25,2.25) -- (7.25,1.5);
\draw[fill=black,opacity=0.2,draw=black] (7,1.25) -- (7.75,1.25) -- (7.75,2) -- (7,2) -- (7,1.25);
\draw[fill=black,opacity=0.2,draw=black] (6.75,1) -- (7.5,1) -- (7.5,1.75) -- (6.75,1.75) -- (6.75,1);
\draw[fill=black,opacity=0.2,draw=black] (6.5,0.75) -- (7.25,0.75) -- (7.25,1.5) -- (6.5,1.5) -- (6.5,0.75);
\draw[fill=black,opacity=0.2,draw=black] (6.25,0.5) -- (7,0.5) -- (7,1.25) -- (6.25,1.25) -- (6.25,0.5);
\draw[fill=black,opacity=0.2,draw=black] (6,0.25) -- (6.75,0.25) -- (6.75,1) -- (6,1) -- (6,0.25);
\draw[fill=black,opacity=0.2,draw=black] (5.75,0) -- (6.5,0) -- (6.5,0.75) -- (5.75,0.75) -- (5.75,0);
\node at (9.5,-1){\begin{tabular}{c}subsampling layer\\layer $l = 6$\end{tabular}};
\draw[fill=black,opacity=0.2,draw=black] (10,1.75) -- (10.5,1.75) -- (10.5,2.25) -- (10,2.25) -- (10,1.75);
\draw[fill=black,opacity=0.2,draw=black] (9.75,1.5) -- (10.25,1.5) -- (10.25,2) -- (9.75,2) -- (9.75,1.5);
\draw[fill=black,opacity=0.2,draw=black] (9.5,1.25) -- (10,1.25) -- (10,1.75) -- (9.5,1.75) -- (9.5,1.25);
\draw[fill=black,opacity=0.2,draw=black] (9.25,1) -- (9.75,1) -- (9.75,1.5) -- (9.25,1.5) -- (9.25,1);
\draw[fill=black,opacity=0.2,draw=black] (9,0.75) -- (9.5,0.75) -- (9.5,1.25) -- (9,1.25) -- (9,0.75);
\draw[fill=black,opacity=0.2,draw=black] (8.75,0.5) -- (9.25,0.5) -- (9.25,1) -- (8.75,1) -- (8.75,0.5);
\draw[fill=black,opacity=0.2,draw=black] (8.5,0.25) -- (9,0.25) -- (9,0.75) -- (8.5,0.75) -- (8.5,0.25);
\draw[fill=black,opacity=0.2,draw=black] (8.25,0) -- (8.75,0) -- (8.75,0.5) -- (8.25,0.5) -- (8.25,0);
\node at (12,3.5){\begin{tabular}{c}fully connected layer\\layer $l = 7$\end{tabular}};
\draw[fill=black,draw=black,opacity=0.5] (10.5,0) -- (11,0) -- (12.5,1.75) -- (12,1.75) -- (10.5,0);
\node at (13,-1){\begin{tabular}{c}fully connected layer\\output layer $l = 8$\end{tabular}};
\draw[fill=black,draw=black,opacity=0.5] (12.5,0.5) -- (13,0.5) -- (13.65,1.25) -- (13.15,1.25) -- (12.5,0.5);
\end{tikzpicture}
\end{document}
|
|
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, patterns, decorations.pathreplacing}
\usetikzlibrary{calc}
\usetikzlibrary{arrows,shapes,backgrounds}
\begin{document}
\begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]
\tikzstyle{select arrow}=[->, thick,cyan!70!black]
\tikzstyle{action arrow}=[->, thick,cyan!90!black]
\tikzstyle{action good}=[thick,cyan!50!black]
\tikzstyle{action bad}=[thick,cyan!30]
\tikzstyle{active neuron}=[cyan!90]
\tikzstyle{selected neuron}=[cyan!30]
\tikzstyle{bad action}=[pattern=north west lines, pattern color=cyan!30]
%FINAL STATE. plane at the bottom
\begin{scope}[
yshift=-160,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.9] (0,0) rectangle (2.5,2.5);
\draw[step=5mm, black] (0,0) grid (2.5,2.5);
\draw[black,very thick] (0,0) rectangle (2.5,2.5);
\fill[active neuron] (0.55,0.55) rectangle (0.95,0.95);
\draw[->,thick, blue!50!cyan] (0.3,0.25) -- (0.7,0.25);
\end{scope}
\draw[action arrow, red, thin] (-0.5,-3.25) -- (0,-4.9);
%SECOND ACTION
\begin{scope}[
yshift=-120,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=.95] (0,0) rectangle (1.5,1.5);
\draw[step=5mm, black] (0,0) grid (1.5,1.5);
\draw[black,very thick] (0,0) rectangle (1.5,1.5);
\fill[bad action] (0.05,0.05) rectangle (0.45,0.45);
\fill[bad action] (1.05,0.05) rectangle (1.45,0.45);
\fill[bad action] (1.05,1.05) rectangle (1.45,1.45);
\fill[bad action] (0.05,1.05) rectangle (0.45,1.45);
\node[action good] at (0.25,0.75) {W};
\node[action good] at (1.25,0.75) {E};
\node[action good] at (0.75,1.25) {N};
\node[action bad] at (0.75,0.25) {S};
\end{scope}
\draw[action arrow] (0.5,-2.45) -- (0.5,-3.25);
\draw[action arrow, red] (0.5,-2.45) -- (-0.5,-3.25);
\draw[action arrow] (0.5,-2.45) -- (-0.5,-3.75);
%SECOND STATE
\begin{scope}[
yshift=-80,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.9] (0,0) rectangle (2.5,2.5);
\draw[step=5mm, black] (0,0) grid (2.5,2.5);
\draw[black,very thick] (0,0) rectangle (2.5,2.5);
\fill[active neuron] (0.55,0.05) rectangle (0.95,0.45);
\fill[selected neuron] (0.05,0.05) rectangle (0.45,0.45);
\fill[selected neuron] (1.05,0.05) rectangle (1.45,0.45);
\fill[selected neuron] (0.55,0.55) rectangle (0.95,0.95);
\draw[select arrow] (0.85,0.25) -- (1.25,0.25);
\draw[select arrow] (0.75,0.35) -- (0.75,.75);
\draw[select arrow] (0.65,0.25) -- (0.25,0.25);
\end{scope}
\draw[action arrow, red] (0.5,-0.45) -- (0.5,-2.3);
%FIRST ACTION
\begin{scope}[
yshift=-40,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=.95] (0,0) rectangle (1.5,1.5);
\draw[step=5mm, black] (0,0) grid (1.5,1.5);
\draw[black,very thick] (0,0) rectangle (1.5,1.5);
\fill[bad action] (0.05,0.05) rectangle (0.45,0.45);
\fill[bad action] (1.05,0.05) rectangle (1.45,0.45);
\fill[bad action] (1.05,1.05) rectangle (1.45,1.45);
\fill[bad action] (0.05,1.05) rectangle (0.45,1.45);
\node[action bad] at (0.25,0.75) {W};
\node[action good] at (1.25,0.75) {E};
\node[action good] at (0.75,1.25) {N};
\node[action bad] at (0.75,0.25) {S};
\end{scope}
\draw[action arrow, red] (0.125,0.125) -- (0.5,-0.45);
\draw[action arrow] (-0.125,0.125) -- (-0.5,-0.45);
%INITIAL STATE. plane at the top
\begin{scope}[
every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.9] (0,0) rectangle (2.5,2.5);
\draw[step=5mm, black] (0,0) grid (2.5,2.5);
\draw[black,very thick] (0,0) rectangle (2.5,2.5);
\fill[active neuron] (0.05,0.05) rectangle (0.45,0.45);
\fill[selected neuron] (0.55,0.05) rectangle (0.95,0.45);
\fill[selected neuron] (0.05,0.55) rectangle (0.45,0.95);
\draw [decorate,decoration={brace,amplitude=10pt}] (0,2.6) -- (2.6,2.6);
\node at (1.6,3.3) {d};
\draw[select arrow] (0.25,0.35) -- (0.25,0.75);
\draw[select arrow] (0.35,0.25) -- (0.75,0.25);
\node at (1.125,-0.3) {\textbf{x}};
\node at (-0.3,1.125) {\textbf{y}};
\end{scope}
\node at (4,1.25) {$S$};
\node at (4,-0.5) {$a$};
\node at (4,-1.5) {$S'$};
\node at (4,-3.25) {$a'$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[11pt]{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{comment}
:Title: Seismic focal mechanism in 3D view.
:Tags: 3D; Earth Sciences ; Geophysics; Seismology
:Author: Cyril Langlois
:Source: http://math.et.info.free.fr/TikZ/index.html
Adaptation for LaTeX of a figure proposed in P. Shearer's book 'Introduction to Seismology'.
It shows the focal sphere with the fault plane and auxiliary plane (which can
not be discriminate), limiting compression and dilatation quadrants, the first
movement of the rock through the sphere, and the Pression and Tension axis.
The figure is based on the sphere drawing's code proposed by J. Dumas in is
book `Tikz pour l'impatient <http://math.et.info.free.fr/TikZ/>`_, available online.
\end{comment}
%%%%%%%%%%%
%% helper macros
%: Styles for XYZ-Coordinate Systems
%: isometric South West : X , South East : Y , North : Z
\tikzset{isometricXYZ/.style={x={(-0.866cm,-0.5cm)}, y={(0.866cm,-0.5cm)}, z={(0cm,1cm)}}}
%: isometric South West : Z , South East : X , North : Y
\tikzset{isometricZXY/.style={x={(0.866cm,-0.5cm)}, y={(0cm,1cm)}, z={(-0.866cm,-0.5cm)}}}
%: isometric South West : Y , South East : Z , North : X
\tikzset{isometricYZX/.style={x={(0cm,1cm)}, y={(-0.866cm,-0.5cm)}, z={(0.866cm,-0.5cm)}}}
%% document-wide tikz options and styles
\begin{document}
\begin{tikzpicture} [scale=4, isometricZXY, line join=round,
opacity=.75, text opacity=1.0,%
>=latex,
inner sep=0pt,%
outer sep=2pt,%
]
\def\h{5}
\newcommand{\quadrant}[2]{
\foreach \t in {#1} \foreach \f in {175,165,...,5}
\draw [fill=#2]
({sin(\f - \h)*cos(\t - \h)}, {sin(\f - \h)*sin(\t - \h)}, {cos(\f - \h)})
-- ({sin(\f - \h)*cos(\t + \h)}, {sin(\f - \h)*sin(\t + \h)}, {cos(\f - \h)})
-- ({sin(\f + \h)*cos(\t + \h)}, {sin(\f + \h)*sin(\t + \h)}, {cos(\f + \h)})
-- ({sin(\f + \h)*cos(\t - \h)}, {sin(\f + \h)*sin(\t - \h)}, {cos(\f + \h)})
-- cycle;
}
%Quadrants
\quadrant{220,230,...,300}{black}
\quadrant{-60,-50,...,20}{white}
\quadrant{30,40,...,120}{black}
\quadrant{130,140,...,210}{none}
%Movement arrows
\foreach \t in {225,235,...,295}
\foreach \f in {50,40,...,0}
\draw [red, opacity=1.0, ->, thick]
({sin(\f - \h)*cos(\t - \h)}, {sin(\f - \h)*sin(\t - \h)}, {cos(\f - \h)})
-- ({(1 + 0.2*cos(90 - \f))*sin(\f - \h)*cos(\t - \h)},
{(1 + 0.2*cos(90 - \f))*sin(\f - \h)*sin(\t - \h)},
{(1 + 0.2*cos(90 - \f))*cos(\f - \h)});
\foreach \t in {125,135,...,205}
\foreach \f in {110,100,...,0}
\draw [black, ->, thick]
({(1 + 0.2*cos(90 - \f))*sin(\f - \h)*cos(\t - \h)},
{(1 + 0.2*cos(90 - \f))*sin(\f - \h)*sin(\t - \h)},
{(1 + 0.2*cos(90 - \f))*cos(\f - \h)})
-- ({sin(\f - \h)*cos(\t - \h)},{sin(\f - \h)*sin(\t - \h)},{cos(\f - \h)});
\foreach \t in {35,45,...,115}
\foreach \f in {130,120,...,0}
\draw [red, opacity=1.0 ,->, thick]
({sin(\f - \h)*cos(\t - \h)}, {sin(\f - \h)*sin(\t - \h)}, {cos(\f - \h)})
-- ({(1 + 0.2*cos(90 - \f))*sin(\f - \h)*cos(\t - \h)},
{(1 + 0.2*cos(90 - \f))*sin(\f - \h)*sin(\t - \h)},
{(1 + 0.2*cos(90 - \f))*cos(\f - \h)});
\foreach \t in {-55,-45,...,25}
\foreach \f in {130,120,...,0}
\draw [black, ->, thick]
({(1 + 0.2*cos(90 - \f))*sin(\f - \h)*cos(\t - \h)},
{(1 + 0.2*cos(90 - \f))*sin(\f - \h)*sin(\t - \h)},
{(1 + 0.2*cos(90 - \f))*cos(\f - \h)})
-- ({sin(\f - \h)*cos(\t - \h)},{sin(\f - \h)*sin(\t - \h)},{cos(\f - \h)});
%Annotations
\path ({1.5*sin(100)*cos(75)}, {1.5*sin(100)*sin(75)}, {1.5*cos(100)}) node [right] {Compression};
\path ({1.5*sin(70)*cos(-15)}, {1.5*sin(70)*sin(-15)}, {1.5*cos(70)}) node [right] {Dilatation};
\path ({1.25*sin(50)*cos(165)},{1.25*sin(50)*sin(165)},{1.25*cos(50)}) node [left] {Dilatation};
\path ({1.25*sin(30)*cos(255)},{1.25*sin(30)*sin(255)},{1.25*cos(30)}) node [left] {Compression};
%P and T axis
\begin{scope}[ultra thick]
\draw[->] ({1.75*sin(90)*cos(75)}, {1.75*sin(90)*sin(75)}, {1.75*cos(90)})
-- ({2*sin(90)*cos(75)},{2*sin(90)*sin(75)},{2*cos(90)}) node [above] {T-axis};
\draw[->] ({1.75*sin(90)*cos(255)},{1.75*sin(90)*sin(255)},{1.75*cos(90)})
-- ({2*sin(90)*cos(255)},{2*sin(90)*sin(255)},{2*cos(90)}) node [below] {T-axis};
\draw[<-] ({1.5*sin(90)*cos(-15)}, {1.5*sin(90)*sin(-15)}, {1.5*cos(90)})
-- ({1.75*sin(90)*cos(-15)},{1.75*sin(90)*sin(-15)},{1.75*cos(90)}) node [right] {P-axis};
\draw[<-] ({1.5*sin(90)*cos(165)}, {1.5*sin(90)*sin(165)}, {1.5*cos(90)})
-- ({1.75*sin(90)*cos(165)},{1.75*sin(90)*sin(165)},{1.75*cos(90)}) node [left] {P-axis};
\end{scope}
% Label
\node [anchor=north, yshift=-2mm] at (current bounding box.south)
{Seismic focal mechanism and Pression-Tension axis.};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz,border=9]{standalone}
\usetikzlibrary{mindmap}
\usepackage{xspace}
\definecolor{joli}{RGB}{225,95,0}
\definecolor{JOLI}{RGB}{225,95,0}
\newcommand\etoc{\textcolor{joli}{\ttfamily\bfseries etoc}\xspace}
\DeclareRobustCommand\csa[1]{{\ttfamily\hyphenchar\font45 \char`\\ #1}}
\newcount\tikznumberofcurrentgrandchild
\def\tikzretangulargroth{%
\pgftransformreset
\ifnum\tikztreelevel=1
\pgftransformrotate{55+((\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild)}%
\pgftransformxshift{\the\tikzleveldistance}%
\fi
\ifnum\tikztreelevel=2
\pgfmathsetmacro\tikzoffsetofcurrentchild{(\tikzsiblingdistance)*(\tikznumberofcurrentgrandchild)}%
\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth pt
\pgftransformxshift{\tikzlevelwidth/2-\tikzoffsetofcurrentchild}
\pgftransformyshift{\tikzlevelheight/2}
\else
\pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelwidth}%
\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight pt
\pgftransformxshift{-\tikzlevelwidth/2}
\pgftransformyshift{\tikzlevelheight/2-\tikzoffsetofcurrentchild}
\else
\pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelheight}%
\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth pt
\pgftransformxshift{-\tikzlevelwidth/2+\tikzoffsetofcurrentchild}
\pgftransformyshift{-\tikzlevelheight/2}
\else
\pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelwidth}%
\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight pt
\pgftransformxshift{\tikzlevelwidth/2}
\pgftransformyshift{-\tikzlevelheight/2+\tikzoffsetofcurrentchild}
\fi\fi\fi\fi
\global\advance\tikznumberofcurrentgrandchild by1
\fi
}
\tikzset{
branch color/.style={
concept color=#1!white,
every child/.append style={concept color=#1!white!30!white},
},
level width/.store in=\tikzlevelwidth,
level height/.store in=\tikzlevelheight
}
\begin{document}
\tikznumberofcurrentgrandchild=0
\begin{tikzpicture}[
mindmap,
growth function=\tikzretangulargroth,
nodes={concept},
concept color=orange!60,
root concept/.append style={font=\huge, minimum size=5.5cm},
level 1/.append style={level distance=6.5cm, sibling angle=360/8},
level 1 concept/.append style={font=\Large,minimum size=4cm},
level 2/.append style={level width=20cm,level height=28.7cm, sibling distance=2.77cm},
% A4 paper with margin=.5cm
]
\node [root concept]{The \etoc package}
child [branch color=teal!60]{node {I Overview}
child {node {3 Do I need to be a geek to use {\color {joli}\ttfamily \bfseries etoc}\xspace ?}}
child {node {4 Line styles and toc display style}}
child {node {5 A first example}}
child {node {6 A second example}}
child {node {7 Linked list of the main package commands}}
}
child [branch color=yellow!80]{node {II Arbitrarily many TOCs, and local ones too}
child {node {8 Labeling and reusing elsewhere}}
child {node {9 A powerful functionality of {\color {joli}\ttfamily \bfseries etoc}\xspace : the re-assignment of levels with \csa {etocsetlevel}}}
child {node {10 The \csa {etoc\discretionary {-}{}{}set\discretionary {-}{}{}toc\discretionary {-}{}{}depth} and \csa {etoc\discretionary {-}{}{}set\discretionary {-}{}{}next\discretionary {-}{}{}toc\discretionary {-}{}{}depth} commands}}
child {node {11 The command \csa {etoc\discretionary {-}{}{}set\discretionary {-}{}{}toc\discretionary {-}{}{}dep\discretionary {-}{}{}th.toc}}}
child {node {12 The commands \csa {etoc\discretionary {-}{}{}depth\discretionary {-}{}{}tag.toc} and \csa {etocsettagdepth}}}
child {node {13 Adding commands to the \texttt {.toc} file}}
child {node {14 Two Examples}}
}
child [branch color=green!50]{node {III Surprising uses of {\color {joli}\ttfamily \bfseries etoc}\xspace }
child {node {15 The TOC of TOCs}}
child {node {16 Arbitrary ``Lists Of...'', \csa {etoctoccontentsline}}}
child {node {17 A TOC with a fancy layout}}
child {node {18 Another compatibility mode}}
child {node {19 The TOC as a tree}}
child {node {20 The TOC as a molecule}}
child {node {21 The TOC as a TikZ Mindmap}}
child {node {22 The TOC as a table}}
}
child [branch color=teal!60]{node {IV Commands for the toc line styles}
child {node {23 The \csa {etocsetstyle} command}}
child {node {24 The \csa {etocsetlevel} command}}
child {node {25 Scope of commands added to the \texttt {.toc} file}}
child {node {26 Am I also red?}}
}
child [branch color=yellow!80]{node {V Commands for the toc display style}
child {node {27 Specifying the toc display style}}
child {node {28 Starred variants of the \csa {tableofcontents} etc... commands}}
child {node {29 Table of contents for this part}}
}
child [branch color=green!50]{node {VI Using and customizing {\color {joli}\ttfamily \bfseries etoc}\xspace }
child {node {30 Summary of the main style commands}}
child {node {31 The package default line styles: \csa {etocdefaultlines}}}
child {node {32 Customizing {\color {joli}\ttfamily \bfseries etoc}\xspace }}
child {node {33 One more example of colored TOC layout}}
}
child [branch color=teal!60]{node {VII Tips}
child {node {34 ... and tricks}}
}
child [branch color=yellow!80]{node {VIII The code}
child {node {35 Timestamp}}
child {node {36 Change history}}
child {node {37 Implementation}}
}
;
\end{tikzpicture}
\end{document}
|
|
\documentclass[]{standalone}
\usepackage{tikz}
\begin{document}
\tikzstyle{scale all}=[every node/.style={scale=#1}, scale=#1]
\tikzset{
solution/.pic = {
\begin{scope}
\draw (0, 0) rectangle ++(1, 1);
\draw (0, 1) rectangle ++(1, 1);
\draw (0, 2) rectangle ++(1, 1);
\draw (0, 3) rectangle ++(1, 1);
\node[anchor=center] at (0.5, 0.5) {$m_{123}$};
\node[anchor=center] at (0.5, 1.5) {$\ldots$};
\node[anchor=center] at (0.5, 2.5) {$\ldots$};
\node[anchor=center] at (0.5, 3.5) {$m_1$};
\end{scope};
},
population with number/.pic = {
\begin{scope}
\draw (0, 0) pic {solution} node at (0.5,-0.75) {1};
\draw (1.5, 0) pic {solution} node at (2,-0.75) {2};
\draw (4.5, 0) pic {solution} node at (5,-0.75) {123};
\draw (3, 2) circle (0.1);
\draw (3.5, 2) circle (0.1);
\draw (4, 2) circle (0.1);
\draw (0.3, 4.3) -- (-0.3, 4.3) -- (-0.3, -0.3) -- (0.3, -0.3);
\draw (5.2, 4.3) -- (5.8, 4.3) -- (5.8, -0.3) -- (5.2, -0.3);
\end{scope}
},
population/.pic = {
\begin{scope}
\draw (0, 0) pic {solution};
\draw (1.5, 0) pic {solution};
\draw (4.5, 0) pic {solution};
\draw (3, 2) circle (0.1);
\draw (3.5, 2) circle (0.1);
\draw (4, 2) circle (0.1);
\draw (0.3, 4.3) -- (-0.3, 4.3) -- (-0.3, -0.3) -- (0.3, -0.3); % left square bracket
\draw (5.2, 4.3) -- (5.8, 4.3) -- (5.8, -0.3) -- (5.2, -0.3); % right square bracket
\end{scope}
},
population expanded/.pic = {
\begin{scope}
\draw (0, 0) pic {solution};
\draw (1.5, 0) pic {solution};
\draw[#1] (4.5, 0) pic {solution};
\draw (7.5, 0) pic {solution};
\draw (3, 2) circle (0.1);
\draw (3.5, 2) circle (0.1);
\draw (4, 2) circle (0.1);
\draw (6, 2) circle (0.1);
\draw (6.5, 2) circle (0.1);
\draw (7, 2) circle (0.1);
\draw (0.3, 4.3) -- (-0.3, 4.3) -- (-0.3, -0.3) -- (0.3, -0.3);
\draw (8.2, 4.3) -- (8.8, 4.3) -- (8.8, -0.3) -- (8.2, -0.3);
\end{scope}
},
population sorted/.pic = {
\begin{scope}
\draw (0, 0) pic {solution} node at (0.5,-0.75) {1};
\draw (1.5, 0) pic {solution} node at (2,-0.75) {2};
\draw (4.5, 0) pic {solution} node at (5,-0.75) {123};
\draw[red] (6, 0) pic {solution} node at (6.5,-0.75) {124};
\draw[red] (9, 0) pic {solution} node at (9.5,-0.75) {123+n};
\draw (3, 2) circle (0.1);
\draw (3.5, 2) circle (0.1);
\draw (4, 2) circle (0.1);
\draw[red] (7.5, 2) circle (0.1);
\draw[red] (8, 2) circle (0.1);
\draw[red] (8.5, 2) circle (0.1);
\draw (0.3, 4.3) -- (-0.3, 4.3) -- (-0.3, -0.3) -- (0.3, -0.3);
\draw (10.2, 4.3) -- (10.8, 4.3) -- (10.8, -0.3) -- (10.2, -0.3);
\end{scope}
},
initial population/.pic = {
% Initial population drawing
\draw (0, -0.3) node {$\mathbf{P} = $};
\draw (0.75, -1) pic [scale all=0.35] {population with number};
},
augmenting population ten percent/.pic = {
% Increasing population by ten percent
\draw[<-] (2, 1.5) -- ++(0, 1) node [pos=0.5, anchor=west, blue] {$\mathbf{P} + 10\% $};
\draw (0, 0.425) node {$\mathbf{P} = $};
\draw (0.75, -0.3) pic [scale all=0.35] {population expanded={blue}};
},
pics/gene mutation/.style args ={#1,#2}{
code={
% Mutate a gene with a mutation Mx
\begin{scope}
\draw (0, 0) rectangle ++(1, 1);
\draw (0, 1) rectangle ++(1, 1);
\draw[fill={#1}] (0, 2) rectangle ++(1, 1);
\draw (0, 3) rectangle ++(1, 1);
\draw (0, 4) rectangle ++(1, 1);
\node[anchor=center] at (0.5, 0.5) {$m_{123}$};
\node[anchor=center] at (0.5, 1.5) {$\ldots$};
\node[anchor=center] at (0.5, 2.5) {{#2}};
\node[anchor=center] at (0.5, 3.5) {$\ldots$};
\node[anchor=center] at (0.5, 4.5) {$m_1$};
\end{scope};
}
},
mutate a gene/.pic = {
\draw[->] (-1, 3.725) -- ++(0, -1.25) -- ++(0.75, 0) node [pos=0.25, scale=0.75, anchor=north, yshift=-2] {cloning};
\draw (0, 1.575) pic [scale all=0.35] {gene mutation={yellow,$m_k$}};
\draw[->] (0.75, 2.5) -- ++(1, 0) node [yshift=-2, scale=0.75, pos=0.5, anchor=north] {$\textbf{Mx}(m_k)$};
\draw[fill=green] (2, 2.325) rectangle ++(0.35, 0.35);
\node[anchor=center, scale=0.35] at (2.175, 2.495) {$m_{k}'$};
\draw[->] (2.75, 2.5) -- ++(1, 0) node[pos=0.5, yshift=-2, scale=0.75, anchor=north] {mutation};
\draw (4, 1.575) pic [scale all=0.35] {gene mutation={green, $m_k'$}};
\draw[->] (4.175, 3.5) -- ++(0, 1.2) -- ++(-3.5, 0) node[pos=0.5, scale=0.75, anchor=north] {insertion};
},
pics/cluster population/.style args = {#1}{
code = {
\draw (0, 0) pic [scale all=0.35] {population};
\draw (0.85, 2) node {{#1}};
}
},
clusters populations/.pic = {
\draw (0, 0) pic {cluster population={$\mathbf{P}_{G(s) = 0}$}};
\draw[dashed] (2.225, -0.5) -- ++(0, 2.5) node [pos=0, anchor=north] {$ < 123$};
\draw (2.5, 0) pic {cluster population={$\mathbf{P}_{G(s) = 1}$}};
\draw[dashed] (4.725, -0.5) -- ++(0, 2.5) node [pos=0, anchor=north] {$ < 123$};
\draw (5, 0) pic {cluster population={$\mathbf{P}_{G(s) = 2}$}};
\draw (7.225, -0.5) -- ++(0, 2.5) node [pos=0, anchor=north] {$\geq 123$};
\draw (7.5, 0) pic[red] {cluster population={$\mathbf{P}_{G(s) = 3}$}};
\draw[red] (9.725, -0.5) -- ++(0, 2.5) node [pos=0, anchor=north] {$> 123$};
\draw (-0.25, -1) -- (-0.25, -1.3) -- (7.225, -1.3) -- (7.225, -1);
},
sorting cost/.pic = {
\draw (0, 0) pic[scale all=0.35] {population sorted};
\draw (0, -0.5) node [anchor=center, scale=0.75] {$\min\,C(s)$};
\draw (3.8, -0.5) node [anchor=center, scale=0.75] {$\max\,C(s)$};
}
}
\begin{tikzpicture}
\draw (0, 0) pic {initial population};
\draw (0, -4) pic {augmenting population ten percent};
\draw (3.5, -8.25) pic {mutate a gene};
\draw[<-] (2, -8) -- ++(0, 1) node [pos=0.5, anchor=west, blue] {$\mathbf{P} + 50\% $};
\draw (0, -10.5) pic {clusters populations};
\draw[<-] (2, -12.80) -- ++(0, 1) node [pos=0.5, anchor=west, blue] {Gap-based selection};
\draw (0, -14.5) pic {sorting cost};
\draw[->] (2, -15.3) -- ++(0, -1) node [pos=0.5, anchor=west, blue] {Cost-based selection}
-- ++(-3, 0) -- (-1, -0.25) -- ++(0.5, 0);
%\draw (0, -17) pic {initial population};
% Indication lateral
\draw (10, 1) -- ++(0.5, 0) -- node [rotate=90, pos=0.5, anchor=north] {(1) Random augmentation} ++(0, -3.5) -- ++(-0.5, 0);
\draw (10, -2.7) -- ++(0.5, 0) -- node [rotate=90, pos=0.5, anchor=north] {(2) Cloning and Mutate} ++(0, -5.25) -- ++(-0.5, 0);
\draw (10, -8.1) -- ++(0.5, 0) -- node [rotate=90, pos=0.5, anchor=north] {(3) Gap Sorting/Selection} ++(0, -4.5) -- ++(-0.5, 0);
\draw (10, -12.8) -- ++(0.5, 0) -- node [rotate=90, pos=0.5, anchor=north] {(4) Cost Sorting/Selection} ++(0, -3.5) -- ++(-0.5, 0);
\end{tikzpicture}
\end{document}
|
|
% (S) -> (M) -> (V) -> (shuffle) -> (P) -> (R) - (F)
% S for Start F for Final
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{%
calc,
fit,
shapes,
backgrounds
}
% the next macro is useful to create a table
\newcommand\tabins[3]{%
\tikz[baseline=(Tab.base)]
\node [rectangle split,
rectangle split parts=3,
draw,
align=right,
inner sep=.5em,
rectangle split horizontal] (Tab)
{\hbox to 4ex{#1}
\nodepart{two} {\hbox to 8ex{\hfill #2\$}}
\nodepart{three}{\hbox to 3ex{#3}}};
}
\begin{document}
\parindent=0pt
\begin{tikzpicture}[%
%every node/.style={transform shape},% now it's not necessary but good for a poster
x=1.25cm,y=2cm,
font=\footnotesize,
% every group of nodes have a style except for main, the style is named by a letter
main/.style={draw,fill=yellow,inner sep=.5em},
R/.style={draw,fill=purple!40!blue!30,inner sep=.5em},
M/.style={draw,fill=green!80!yellow,inner sep=.5em},
S/.style={anchor=east},
V/.style={anchor=west},
P/.style={anchor=center},
F/.style={anchor=west}
]
% main node the reference Shuffle
\node[main] (shuffle) {Group};
%group R reducer
\node[R] at ($(shuffle)+(8,1)$) (R1+) {Reduce};
\node[R] at ($(shuffle)+(8, 0)$) (R0) {Reduce};
\node[R] at ($(shuffle)+(8,-1)$) (R1-) {Reduce};
% group M Mapper
\node[M] at ($(shuffle)+(-6,+2.5)$) (M3+) {Map};
\node[M] at ($(shuffle)+(-6,+ 1.5)$) (M2+) {Map};
\node[M] at ($(shuffle)+(-6,+ .5)$) (M1+) {Map};
\node[M] at ($(shuffle)+(-6,- .5)$) (M1-) {Map};
\node[M] at ($(shuffle)+(-6,- 1.5)$) (M2-) {Map};
\node[M] at ($(shuffle)+(-6,-2.5)$) (M3-) {Map};
% group S Start the first nodes
\node[S] at ($(M3+)+(-1.5,0)$) (S3+) {\Big($k_1$,\tabins{4711}{59.90}{NY}\Big)};
\node[S] at ($(M2+)+(-1.5,0)$) (S2+) {\Big($k_2$,\tabins{4713}{142.99}{CA}\Big)};
\node[S] at ($(M1+)+(-1.5,0)$) (S1+) {\Big($k_3$,\tabins{4714}{72.00}{NY}\Big)};
\node[S] at ($(M1-)+(-1.5,0)$) (S1-) {\Big($k_4$,\tabins{4715}{108.75}{NY}\Big)};
\node[S] at ($(M2-)+(-1.5,0)$) (S2-) {\Big($k_5$,\tabins{4718}{19.89}{WA}\Big)};
\node[S] at ($(M3-)+(-1.5,0)$) (S3-) {\Big($k_6$,\tabins{4719}{36.60}{CA}\Big)};
% group V why not
\node[V] at ($(M3+)+(1.5,0)$) (V3+) {\Big(NY,59.90\$\Big)};
\node[V] at ($(M2+)+(1.5,0)$) (V2+) {\Big(CA,142.99\$\Big)};
\node[V] at ($(M1+)+(1.5,0)$) (V1+) {\Big(NY,72.00\$\Big)};
\node[V] at ($(M1-)+(1.5,0)$) (V1-) {\Big(NY,108.75\$\Big)};
\node[V] at ($(M2-)+(1.5,0)$) (V2-) {\Big(WA,19.89\$\Big)};
\node[V] at ($(M3-)+(1.5,0)$) (V3-) {\Big(CA,36.60\$\Big)};
\node[P] at ($(R1+)+(-4,0)$) (P1+) {\Big(CA,\big[142.99\$,36.60\$\big]\Big)};
\node[P] at ($(R0) +(-4,0)$) (P0) {\Big(NY,\big[59.90\$,72.00\$,108.75\big]\Big)};
\node[P] at ($(R1-)+(-4,0)$) (P1-) {\Big(WA,\big[19.89\$\big]\Big)};
\node[F] (F1+) at ($(R1+)+(1.5,0)$) {(CA,89.80\$)};
\node[F] (F0) at ($(R0) +(1.5,0)$) {(NY,80.22\$)};
\node[F] (F1-) at ($(R1-)+(1.5,0)$) {(WA,72.00\$)};
% wrappers
\begin{scope}[on background layer]
\node[fill=lightgray!50,inner sep = 4mm,fit=(shuffle),label=above:Shuffle] {};
\end{scope}
\begin{scope}[on background layer]
\node[fill=lightgray!50,inner sep = 4mm,fit=(R1+)(R1-),label=above:Reducer] {};
\end{scope}
\begin{scope}[on background layer]
\node[fill=lightgray!50,inner sep = 4mm,fit=(M3+)(M3-),label=above:Mapper] {};
\end{scope}
%edges
\foreach \indice in {3+,2+,1+,1-,2-,3-} \draw[->] (S\indice.east) -- (M\indice.west);
\foreach \indice in {3+,2+,1+,1-,2-,3-} \draw[->] (M\indice.east) -- (V\indice.west);
\foreach \indice in {3+,2+,1+,1-,2-,3-} \draw[->] (V\indice.east) to [out=0,in=180] (shuffle.west);
\foreach \indice in {1+,0,1-} \draw[->] (shuffle.east) to [out=0,in=180] (P\indice.west);
\foreach \indice in {1+,0,1-} \draw[->] (P\indice.east) -- (R\indice.west);
\foreach \indice in {1+,0,1-} \draw[->] (R\indice.east) -- (F\indice.west);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{tikz-3dplot}
\pgfplotsset{compat=1.14}
\tikzset{>=latex}
\begin{document}
% !TEX root = ../main.tex
\tdplotsetmaincoords{60}{100}
\begin{tikzpicture}[scale=1.5,tdplot_main_coords]
% DEFINITIONS
% figOmegaRotation : Value for the Omega angle
\pgfmathsetmacro{\figOmega}{33}
% figIRotation : value for inclination of the orbital plane
\pgfmathsetmacro{\figIRotation}{30}
% \figAEll : minimum value for ellipse
\pgfmathsetmacro{\figAEll}{2.5}
% \figBEll : minimum value for ellipse
\pgfmathsetmacro{\figBEll}{3}
% figYOrigin : focus of the ellipse with 2.5 and 3
\pgfmathsetmacro{\figYOrigin}{sqrt(\figBEll^2 - \figAEll^2)}
% sqrt(b^2 - a^2)
% COMMANDS
% \positionOnEl{\storing}{\quadrant}{\x}
% Saves into \storing the position \y on the ellipse
% specified by \figAEll and \figBEll. \quadrant should help
% in defining the quadrant (must be +1 or -1)
\newcommand{\positionXOnEl}[3]{%
\pgfmathsetmacro{#1}%
{\figYOrigin+#2*%
\figBEll*((1-#3^2/\figAEll^2)^2)^(0.25)}}
\newcommand{\positionYOnEl}[3]{%
\pgfmathsetmacro{#1}%
{#2*((\figBEll^2-\figYOrigin^2+2*\figYOrigin*#3-#3^2)^2)^(0.25)*(\figAEll/\figBEll)}}
\positionYOnEl{\ellPositY}{-1}{\figBEll}
\positionYOnEl{\ellPositYY}{1}{0}
\pgfmathsetmacro{\xstartV}{cos(atan(\figBEll/\ellPositY))*0.5}
\pgfmathsetmacro{\ystartV}{sin(atan(\figBEll/\ellPositY))*0.5}
% Origin Position for the drawing
\coordinate (O) at (0, 0, 0);
% REFERENCE FRAME
% x axis
\draw[tdplot_main_coords, very thin]
(-4.5, 0, 0) -- (-0.5, 0, 0);
% y axis
\draw[tdplot_main_coords, very thin]
(0, -2.1, 0) -- (0, -0.5, 0);
\draw[tdplot_main_coords, ->, very thin]
(0, 0.5, 0) -- (0, 5, 0)
node [anchor=west] {$y$};
% EQUATORIAL PLANE
\draw[tdplot_main_coords, very thin,gray]
(4, 4.7, 0) -- (4, -2, 0) --
node[anchor=south, rotate=54] {\footnotesize equatorial plane}
(-4,-2, 0) -- (-4, 4.7, 0) -- (4, 4.7, 0);
% Equatorial plane Ellipses
\draw[tdplot_main_coords, very thin, dashed, gray!50]
(0, \figYOrigin, 0) ellipse ({\figAEll} and {\figBEll});
% Rotazione sulla linea dei nodi
\tdplotsetrotatedcoords{0}{0}{\figOmega}
% Ellipses in equatorial plane
\draw[tdplot_rotated_coords, fill, color=gray!40, opacity=0.1]
(0, \figYOrigin, 0) ellipse ({\figAEll} and {\figBEll});
\draw[tdplot_rotated_coords, very thin, dashed]
(0, \figYOrigin, 0) ellipse ({\figAEll} and {\figBEll});
% reference on rotated ellipse
\draw[tdplot_rotated_coords, very thin]
(0, -2.1, 0) -- (0, -0.5, 0);
\draw[tdplot_rotated_coords, ->, very thin]
(0, 0.5, 0) -- (0, 5, 0)
node [anchor=west] {$y'$};
\shade[tdplot_rotated_coords, ball color = green!40, opacity = 0.8]
(0, 0, 0) circle (0.5cm);
% Rotation on ascension
\tdplotsetrotatedcoords{90+\figOmega}{-\figIRotation}{-90}
% Orbit ellipse
\draw[tdplot_rotated_coords, fill, color=gray!40, opacity=0.3]
(0, \figYOrigin, 0) ellipse ({\figAEll} and {\figBEll});
\draw[tdplot_rotated_coords, very thin]
(0, \figYOrigin, 0) ellipse ({\figAEll} and {\figBEll});
% Part of trajectory
\draw[tdplot_rotated_coords, very thick]
(\ellPositYY, 0, 0)
arc (-33.5:154:{\figAEll} and {\figBEll});
% Line of Nodes
\draw[tdplot_rotated_coords]
(0.5, 0, 0) -- (4, 0, 0)
node [anchor=north west,fill=white] {\footnotesize line of nodes};
% Line of apsis
\draw[tdplot_rotated_coords, ->, very thin]
(0, 0.5, 0) -- (0, 5, 0)
node[anchor=south west] {\footnotesize line of apsis};
% V vector (solved through ellipse equation)
\draw[tdplot_rotated_coords,->,thick]
(-\xstartV, -\ystartV, 0) -- (\ellPositY, \figBEll, 0);
\shade[tdplot_rotated_coords,ball color = green]
(\ellPositY, \figBEll, 0) circle (0.05cm)
node[anchor=south east, color=green!40!black!50] {\footnotesize debris};
% Planet
% Equatorial circle in
\draw[tdplot_rotated_coords, very thin]
(0, 0, 0) circle (0.5);
\draw[tdplot_main_coords, very thin, gray]
(0, 0, 0) circle (0.5);
% x axis in original reference frame
% redesegn for z-buffer
\draw[tdplot_main_coords, ->, very thin]
(0.75, 0, 0) -- (4.5, 0, 0)
node [anchor=north] {$x$};
% z axis
\draw[tdplot_main_coords, ->, very thin]
(0, 0, 0.5) -- (0, 0, 2)
node[anchor=south] {$z$};
% OMEGA
\tdplotdrawarc[tdplot_main_coords, color=red, ->]
{(0,0,0)}{2.5}{0}{\figOmega}{anchor=north}{$\Omega$}
% omega
\tdplotdrawarc[tdplot_rotated_coords, color=red, ->]
{(0,0,0)}{1.8}{0}{90}{anchor=west}{$\omega$}
\tdplotdrawarc[tdplot_rotated_coords, color=red, ->]
{(0,0,0)}{1.8}{90}{126.8}{anchor=south}{$v$}
% n vector
\draw[tdplot_rotated_coords, ->, color=red, pos=0.8]
(0.5, 0, 0) -- node [anchor=north east, pos=0.6] {$n$} (\ellPositYY, 0, 0);
\draw[tdplot_rotated_coords, ->, color=red]
(0, 0.5, 0) -- node [anchor=south east, pos=0.85] {$e$}
(0, 3 + \figYOrigin, 0);
% piano per i
\shade[tdplot_rotated_coords,ball color = blue]
(0, \figYOrigin + \figBEll, 0) circle (0.05cm)
node[anchor=west, color=blue] {\footnotesize apoapsis};
\shade[tdplot_rotated_coords,ball color = red] (\ellPositYY, 0, 0) circle
(0.05cm) node[anchor=west, color=red] {\footnotesize ascending node};
\draw[tdplot_rotated_coords] (0,0,0) circle (0.5);
\tdplotsetrotatedcoords{\figOmega}{90}{0}
% i angle
\tdplotdrawarc[tdplot_rotated_coords, color=red, ->]
{(0, 0, 0)}{\figYOrigin+\figBEll}{90}{118}{anchor=west}{$i$}
% Orbital Plane Label
\node[tdplot_main_coords,rotate=33.5,anchor=east,color=gray]
at (-4.8,-0.3,0) {\footnotesize orbital plane};
% Planet
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz,border=10pt]{standalone}
%%%<
\usepackage{verbatim}
%%%>
\begin{comment}
:Title: Poincare Diagram, Classification of Phase Portraits
:Features:
:Tags: Arcs;Foreach;Markings;Diagrams;Plots;Mathematics
:Author: Gernot Salzer
:Slug: poincare
The solutions of a system of linear differential equations can be
classified according to the trace and the determinant of the
coefficient matrix. This diagram show schematically the different
types of solutions.
Originally published on TeX.SX, tex.stackexchange.com/a/347401, 6 Jan 2017
Based on a manual drawing by Douglas R. Hundley,
http://people.whitman.edu/~hundledr/courses/M244/Poincare.pdf
You may use the code without any restrictions; no rights reserved.
\end{comment}
\usetikzlibrary{decorations.markings}
\tikzset
{every pin/.style = {pin edge = {<-}}, % pins are arrows from label to point
> = stealth, % arrow tips look like stealth bombers
flow/.style = % everything marked as "flow" will be decorated with an arrow
{decoration = {markings, mark=at position #1 with {\arrow{>}}},
postaction = {decorate}
},
flow/.default = 0.5, % default position of the arrow is in the middle
main/.style = {line width=1pt} % thick lines for main graph
}
% \newtemplate[Scaling, default 0.18]{\NameOfTemplate}{Caption}{Code}
%
% Typesets Code and stores it in the box \NameOfTemplate.
% This way we avoid nested tikzpictures when inserting the templates into the
% main picture, since nesting is not guaranteed to work.
\newcommand\newtemplate[4][0.18]%
{\newsavebox#2%
\savebox#2%
{\begin{tabular}{@{}c@{}}
\begin{tikzpicture}[scale=#1]
#4
\end{tikzpicture}\\[-1ex]
\templatecaption{#3}\\[-1ex]
\end{tabular}%
}%
}
\newcommand\template[1]{\usebox{#1}} % use the Code stored in box #1
\newcommand\templatecaption[1]{{\sffamily\scriptsize#1}} % typeset caption
\newcommand\Tr{\mathop{\mathrm{Tr}}}
\newtemplate\sink{sink}%
{\foreach \sx in {+,-} % for right/left half do:
{\draw[flow] (\sx4,0) -- (0,0); % draw half of horizontal axis
\draw[flow] (0,\sx4) -- (0,0); % draw half of vertical axis
\foreach \sy in {+,-} % for upper/lower quadrant do:
\foreach \a/\b in {2/1,3/0.44} % draw two half-parabolas
\draw[flow,domain=\sx\a:0] plot (\x, {\sy\b*\x*\x});
}
}
\newtemplate\source{source}%
{\foreach \sx in {+,-} % for right/left half do:
{\draw[flow] (0,0) -- (\sx4,0); % draw half of horizontal axis
\draw[flow] (0,0) -- (0,\sx4); % draw half of vertical axis
\foreach \sy in {+,-} % for upper/lower quadrant do:
\foreach \a/\b in {2/1,3/0.44} % draw two half-parabolas
\draw[flow,domain=0:\sx\a] plot (\x, {\sy\b*\x*\x});
}
}
\newtemplate\stablefp{line of stable fixed points}%
{\draw (-4,0) -- (4,0); % draw horizontal axis
\foreach \sy in {+,-} % for upper/lower half do:
{\draw[flow] (0,\sy4) -- (0,0); % draw half of vertical axis
\foreach \x in {-3,-2,-1,1,2,3} % draw six vertical half-lines
\draw[flow] (\x,\sy3) -- (\x,0);
}
}
\newtemplate\unstablefp{line of unstable fixed points}%
{\draw (-4,0) -- (4,0); % draw horizontal axis
\foreach \sy in {+,-} % for upper/lower half do:
{\draw[flow] (0,0) -- (0,\sy4); % draw half of vertical axis
\foreach \x in {-3,-2,-1,1,2,3} % draw six vertical half-lines
\draw[flow] (\x,0) -- (\x,\sy3);
}
}
\newtemplate\spiralsink{spiral sink}%
{\draw (-4,0) -- (4,0); % draw horizontal axis
\draw (0,-4) -- (0,4); % draw vertical axis
\draw [samples=100,smooth,domain=27:7] % draw spiral
plot ({\x r}:{0.005*\x*\x}); % Using "flow" here gives "Dimension
\def\x{26} % too large", so we draw a tiny
\draw[->] ({\x r}:{0.005*\x*\x}) -- +(0.01,-0.01);% tangent for the arrow.
}
\newtemplate\spiralsource{spiral source}%
{\draw (-4,0) -- (4,0); % draw horizontal axis
\draw (0,-4) -- (0,4); % draw vertical axis
\draw [samples=100,smooth,domain=10:28] % draw spiral
plot ({-\x r}:{0.005*\x*\x}); % Using "flow" here gives "Dimension
\def\x{27.5} % too large", so we draw a tiny
\draw[<-] ({-\x r}:{0.005*\x*\x}) -- +(0.01,-0.008);% tangent for the arrow.
}
\newtemplate[0.15]\centre{center}% British spelling since \center is in use
{\draw (-4,0) -- (4,0); % draw horizontal axis
\draw (0,-4) -- (0,4); % draw vertical axis
\foreach \r in {1,2,3} % draw three circles
\draw[flow=0.63] (\r,0) arc (0:-360:\r cm);
}
\newtemplate\saddle{saddle}%
{\foreach \sx in {+,-} % for right/left half do:
{\draw[flow] (\sx4,0) -- (0,0); % draw half of horizontal axis
\draw[flow] (0,0) -- (0,\sx4); % draw half of vertical axis
\foreach \sy in {+,-} % for upper/lower quadrant do:
\foreach \a/\b/\c/\d in {2.8/0.3/0.7/0.6, 3.9/0.4/1.3/1.1}
\draw[flow] (\sx\a,\sy\b) % draw two bent lines
.. controls (\sx\c,\sy\d) and (\sx\d,\sy\c)
.. (\sx\b,\sy\a);
}
}
\newtemplate\degensink{degenerate sink}%
{\draw (0,-4) -- (0,4); % draw vertical axis
\foreach \s in {+,-} % for upper/lower half do:
{\draw[flow] (\s4,0) -- (0,0); % draw half of horizontal axis
\foreach \a/\b/\c/\d in {3.5/4/1.5/1, 2.5/2/1/0.8}
\draw[flow] (\s-3.5,\s\a) % draw two bent lines
.. controls (\s\b,\s\c) and (\s\b,\s\d)
.. (0,0);
}
}
\newtemplate\degensource{degenerate source}%
{\draw (0,-4) -- (0,4); % draw vertical axis
\foreach \s in {+,-} % for upper/lower half do:
{\draw[flow] (0,0) -- (\s4,0); % draw half of horizontal axis
\foreach \a/\b/\c/\d in {3.5/4/1.5/1, 2.5/2/1/0.8}
\draw[flow] (0,0) % draw two bent lines
.. controls (\s\b,\s\d) and (\s\b,\s\c)
.. (\s-3.5,\s\a);
}
}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
% MAIN DIAGRAM
\draw [main,->] (0,-0.3) -- (0,4.7) % vertical axis
node [label={[above]$\scriptstyle\det A$}] {}
node [label={[above,yshift=0.8cm]%
{\sffamily\large Poincar\'e Diagram: Classification of Phase
Portraits in the $(\det A,\Tr A)$-plane}}] {};
\draw [main,->] (-5,0) -- (5,0) % horizontal axis
node [label={[right,yshift=-0.5ex]$\scriptstyle\Tr A$}] {};
\draw [main, domain=-4:4] plot (\x, {0.25*\x*\x}); % main graph
\node at (-4,4) [pin={[above]$\scriptstyle\Delta=0$}] {};
\node at ( 4,4) [pin={[above,align=left]%
{$\scriptstyle\Delta=0:\;\det A=\frac{1}{4}(\Tr A)^2$}}] {};
% TEMPLATES describing areas
\node at ( 0 ,-1.4) {\template\saddle};
\node at (-4 , 1 ) {\template\sink};
\node at ( 4 , 1 ) {\template\source};
\node at (-1.8, 3.7) {\template\spiralsink};
\node at ( 1.8, 3.7) {\template\spiralsource};
% TEMPLATES labeling lines and points
\node at ( 0 , 1.2) [pin={[draw,right,xshift=0.3cm]%
\template\centre}] {};
\node at (-3 , 0 ) [pin={[draw,below,yshift=-1cm]%
\template\stablefp}] {};
\node at ( 3 , 0 ) [pin={[draw,below,yshift=-1cm]%
\template\unstablefp}] {};
\node at (-3.5,{0.25*3.5*3.5}) [pin={[draw,left,xshift=-1.15cm,yshift=-0.3cm]%
\template\degensink}] {};
\node at ( 3.5,{0.25*3.5*3.5}) [pin={[draw,right,xshift=0.9cm,yshift=-0.3cm]%
\template\degensource}] {};
\node at ( 0 , 0 ) [pin={[draw,above left,align=center,xshift=-0.3cm]%
\templatecaption{uniform}\\[-1ex]\templatecaption{motion}}] {};
\end{tikzpicture}
\end{document}
|
|
\documentclass[border=5pt]{standalone}
\usepackage{xcolor}
\usepackage{ulem}
\definecolor{ocre}{HTML}{800000}
\definecolor{sky}{HTML}{C6D9F1}
\definecolor{skybox}{HTML}{5F86B3}
\usepackage{tikz}
\usepackage{pgfmath}
\usetikzlibrary{decorations.text, arrows.meta,calc,shadows.blur,shadings}
\renewcommand*\familydefault{\sfdefault} % Set font to serif family
% arctext from Andrew code with modifications:
%Variables: 1: ID, 2:Style 3:box height 4: Radious 5:start-angl 6:end-angl 7:text {format along path}
\def\arctext[#1][#2][#3](#4)(#5)(#6)#7{
\draw[#2] (#5:#4cm+#3) coordinate (above #1) arc (#5:#6:#4cm+#3)
-- (#6:#4) coordinate (right #1) -- (#6:#4cm-#3) coordinate (below right #1) arc (#6:#5:#4cm-#3) coordinate (below #1)
-- (#5:#4) coordinate (left #1) -- cycle;
\def\a#1{#4cm+#3}
\def\b#1{#4cm-#3}
\path[
decoration={
raise = -0.5ex, % Controls relavite text height position.
text along path,
text = {#7},
text align = center,
},
decorate
]
(#5:#4) arc (#5:#6:#4);
}
% arcarrow, this is mine, for beerware purpose...
% Function: Draw an arrow from arctex coordinate specific nodes to another
% Arrow start at the start of arctext box and could be shifted to change the position
% to avoid go over another box.
% Var: 1:Start coordinate 2:End coordinate 3:angle to shift from acrtext box
\def\arcarrow(#1)(#2)[#3]{
\draw[very thick,->,>=latex,black!60]
let \p1 = (#1), \p2 = (#2), % To access cartesian coordinates x, and y.
\n1 = {veclen(\x1,\y1)}, % Distance from the origin
\n2 = {veclen(\x2,\y2)}, % Distance from the origin
\n3 = {atan2(\y1,\x1)} % Angle where acrtext starts.
in (\n3-#3: \n1) -- (\n3-#3: \n2); % Draw the arrow.
}
\begin{document}
\begin{tikzpicture}[
% Environment Cfg
font=\sf \scriptsize,
% Styles
myarrow/.style={
very thick,
-latex,
black!60,
},
Center/.style ={
circle,
fill=ocre,
text=white,
align=center,
font =\footnotesize\bf,
inner sep=1pt,
},
RedArc/.style ={
color=black,
thick,
fill=ocre,
blur shadow,
},
SkyArc/.style ={
color=skybox,
thick,
fill=sky,
blur shadow,
},
]
% Drawing the center for AI
\node[Center](AI) at (0,0) { Artificial \\ Intelligence \\(AI)\\ Agent};
\coordinate (AROUND) at (0:1.2);
% Drawing the Text Arcs
% Format: \Arctext[ID][box-style][box-height](radious)(start-angl)(end-angl){|text-styles| Text}
% Machine Learning
\arctext[ML][RedArc][8pt](2.75)(140)(75){|\footnotesize\bf\color{white}| Machine Learning};
\arctext[REIN][SkyArc][5pt](3.50)(140)(75){|\scriptsize\color{black}| Reinforcement Learning};
\arctext[KNOW][SkyArc][5pt](4.00)(110)(75){|\scriptsize| Knowledge L.};
\arctext[SUPL][SkyArc][5pt](4.00)(140)(112){|\scriptsize| Supervised L.};
\arctext[PROB][SkyArc][5pt](4.50)(140)(109){|\scriptsize\color{black}| Probabilistic Models};
\arctext[PROB][SkyArc][5pt](4.50)(107)(75){|\scriptsize\color{black}| Unsupervised L.};
% Problem Solving
\arctext[SOLV][RedArc][8pt](2.75)(70)(23){|\footnotesize\bf\color{white}| Problem Solving};
\arctext[SRCH][SkyArc][5pt](3.50)(70)(23){|\scriptsize\color{black}| Search };
\arctext[HEUR][SkyArc][5pt](4.00)(70)(50){|\scriptsize| Heuristics};
\arctext[ADVS][SkyArc][5pt](4.00)(47)(23){|\scriptsize| Adversarial S.};
\arctext[CONST][SkyArc][5pt](4.50)(70)(23){|\scriptsize\color{black}| Constraint Analysis };
% Natural Language Processing
\arctext[NLP][RedArc][8pt](2.75)(20)(-17){|\footnotesize\bf\color{white}| NLP};
\arctext[TRAN][SkyArc][5pt](3.50)(20)(-20){|\scriptsize\color{black}| Machine translation};
\arctext[SPER][SkyArc][5pt](4.00)(20)(-20){|\scriptsize| Speech Recognition};
\arctext[INFX][SkyArc][5pt](4.50)(20)(-20){|\scriptsize\color{black}| Information Extraction};
% Decision Making
\arctext[DEC][RedArc][8pt](2.75)(293)(340){|\footnotesize\bf\color{white}| Decision Making};
\arctext[LOG][SkyArc][5pt](3.50)(293)(335){|\scriptsize\color{black}| Logic};
\arctext[KNOW][SkyArc][5pt](4.00)(293)(335){|\scriptsize| Knowledge Engineering};
\arctext[PLAN][SkyArc][5pt](4.50)(293)(335){|\scriptsize| Real World Planning};
% Reasoning
\arctext[REAS][RedArc][8pt](2.75)(247)(291){|\footnotesize\bf\color{white} | Reasoning};
\arctext[PROB][SkyArc][5pt](3.50)(247)(291){|\scriptsize\color{black}| Probabilistic R.};
\arctext[REAT][SkyArc][5pt](4.00)(247)(271){|\scriptsize| Bayesian Nets};
\arctext[REAT][SkyArc][5pt](4.00)(272)(291){|\scriptsize| R.over time};
\arctext[UNQU][SkyArc][5pt](4.50)(247)(291){|\scriptsize\color{black}| Uncertainty Quantification};
% Robotics
\arctext[ROB][RedArc][8pt](2.75)(210)(245){|\footnotesize\bf\color{white}| Robotics};
\arctext[RPER][SkyArc][5pt](3.50)(210)(245){|\scriptsize\color{black}| R. Perception};
\arctext[RACT][SkyArc][5pt](4.00)(210)(245){|\scriptsize| R. Actuation};
\arctext[MAPL][SkyArc][5pt](4.50)(210)(245){|\scriptsize\color{black}| Mapping, Localization};
% Object Recognition
\arctext[RECO][RedArc][8pt](2.75)(145)(206){|\footnotesize\bf\color{white}| Object Recognition};
\arctext[VIS][SkyArc][5pt](3.50)(145)(206){|\scriptsize\color{black}| Vision};
\arctext[IMGP][SkyArc][5pt](4.00)(145)(175){|\scriptsize\color{black}| Image Processing };
\arctext[IMGP][SkyArc][5pt](4.00)(176)(206){|\scriptsize\color{black}| 3D Reconstruction };
\arctext[MOTC][SkyArc][5pt](4.50)(145)(206){|\scriptsize\color{black}| Motion, shading, contour analysis};
% %ADITIONAL EXTERNAL ARC
% \arctext[NEW][
% color=white,
% shade,
% upper left=gray,
% upper right=black!50,
% lower left=gray,
% lower right=gray!50,
% rounded corners = 8pt
% ][8pt](5.2)(180)(0){|\footnotesize\bf\color{white}| "Artificial Intelligence: A Modern Approach" by Peter Norvig and Stuart Russell};
% Drawing the Arrows from contributing branch to AI
% Format: \arcarrow(above/below ID)(abobe/below ID)[shift]
\arcarrow(below ML)(AROUND)[30];
\arcarrow(below SOLV)(AROUND)[24];
\arcarrow(below NLP)(AROUND)[15];
\arcarrow(below DEC)(AROUND)[-25];
\arcarrow(below REAS)(AROUND)[-17];
\arcarrow(below ROB)(AROUND)[-19];
\arcarrow(below RECO)(AROUND)[-33];
% Same level Arrows. Not needed now
% \draw[myarrow] (left SSNX) -- (right DUAM);
% \draw[myarrow] (left ML) -- (left SRel);
% \draw[myarrow] (left SCap) -- (right ML);
% Legend
\draw[myarrow] (-5,-5) coordinate (legend) -- ++(.8,0) node[anchor=west] {(contribution)};
\draw [RedArc] (legend)++(0,-0.4) rectangle ++(.8,-.3)++(0,.2) node [anchor=west, text width=3em] {capabilities,\\disciplines};
\draw[SkyArc] (legend)++(0,-1) rectangle ++(.8,-.3)++(0,.2) node[anchor=west, color=black] {subfield};
% source, book and authors
\node [text width=6.45cm] at (1,-5.6) {Source: \textit {"Artificial Intelligence: A Modern Approach"} \\by Peter Norvig and Stuart Russell};
% copyright
\node[text width=3cm] at (3,-6.25) {\begin{tiny}Copyright \textcopyright Alfonso R. Reyes, 2020\end{tiny}};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
\usetikzlibrary{positioning, decorations.pathmorphing}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\begin{document}
\begin{tikzpicture}
% boxes
\path[rounded corners, fill=blue, fill opacity=0.2] (-0.4, 3.5) -- (-0.4, -3.5) -- (4, -3.5) -- (4, -0.2) -- (5, -0.2) -- (5, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path[rounded corners, fill=red, fill opacity=0.2] (-0.4, -3.5) -- (-0.4, 3.5) -- (4, 3.5) -- (4, -0.2) -- (5, -0.2) -- (5, -3.5) -- (-0.4, -3.5) -- (-0.4, 0);
\path[rounded corners, fill=white] (-0.4, 0) -- (-0.4, -3.5) -- (4, -3.5) -- (4, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path[rounded corners, fill=olivegreen, fill opacity=0.2] (-0.4, 0) -- (-0.4, -3.5) -- (4, -3.5) -- (4, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
\path [draw, dashed, very thick, rectangle, rounded corners] (-0.4, 0) -- (-0.4, -3.5) -- (5, -3.5) -- (5, 3.5) -- (-0.4, 3.5) -- (-0.4, 0);
% add input nodes
\node[circle, thick, fill=white, draw] (x1) {};
\node[circle, thick, draw, fill=white, below=1em of x1] (x2) {};
\node[circle, thick, fill=white, draw, below=1em of x2] (x3) {};
\node[circle, thick, fill=white, draw, below=1em of x3] (x4) {};
\node[circle, thick, fill=white, draw, below=1em of x4] (x5) {};
\node[circle, thick, fill=white, draw, above=1em of x1] (x6) {};
\node[circle, thick, fill=white, draw, above=1em of x6] (x7) {};
\node[circle, thick, fill=white, draw, above=1em of x7] (x8) {};
\node[circle, thick, fill=white, draw, above=1em of x8] (x9) {};
% add 2nd layer
\node[circle, thick, right=4em of x1, fill=white, draw] (xhh1) {};
\node[circle, thick, draw, fill=white, below=1em of xhh1] (xhh2) {};
\node[circle, thick, fill=white, draw, below=1em of xhh2] (xhh3) {};
\node[circle, thick, fill=white, draw, below=1em of xhh3] (xhh4) {};
\node[circle, thick, fill=white, draw, above=1em of xhh1] (xhh5) {};
\node[circle, thick, fill=white, draw, above=1em of xhh5] (xhh6) {};
\node[circle, thick, fill=white, draw, above=1em of xhh6] (xhh7) {};
% 3rd layer
\node[circle, thick, right=8em of x1, fill=white, draw] (xh1) {};
\node[circle, thick, draw, fill=white, below=1em of xh1] (xh2) {};
\node[circle, thick, fill=white, draw, below=1em of xh2] (xh3) {};
\node[circle, thick, fill=white, draw, below=1em of xh3] (xh4) {};
\node[circle, thick, fill=white, draw, above=1em of xh1] (xh5) {};
\node[circle, thick, fill=white, draw, above=1em of xh5] (xh6) {};
\node[circle, thick, fill=white, draw, above=1em of xh6] (xh7) {};
% output layer
\node[circle, very thick, fill=blue!30, draw, right=12em of x1, yshift=5em] (hm1) {};
\node[circle, very thick, draw, fill=blue!30, below=0.5em of hm1] (hm2) {};
\node[circle, very thick, draw, fill=blue!30, below=0.5em of hm2] (hm3) {};
\node[circle, very thick, draw, fill=blue!30, above=0.5em of hm1] (hm4) {};
\node[circle, very thick, draw, fill=blue!30, above=0.5em of hm4] (hm5) {};
\node[circle, very thick, fill=red!30, draw, right=12em of x1, yshift=-5em] (hs1) {};
% add labels for output layer
\node[right=1.5em of hm1, blue] (mu1) {$\pi_\theta(s, \alpha_3)$};
\node[right=1.5em of hm2, blue] (mu2) {$\pi_\theta(s, \alpha_4)$};
\node[right=1.5em of hm3, blue] (mu3) {$\pi_\theta(s, \alpha_5)$};
\node[right=1.5em of hm4, blue] (mu4) {$\pi_\theta(s, \alpha_2)$};
\node[right=1.5em of hm5, blue] (mu5) {$\pi_\theta(s, \alpha_1)$};
\node[right=1.5em of hs1, red] (s1) {$V_\psi(s)$};
% arrows between input layer and 2nd layer
\foreach \x in {1,...,9}
\foreach \y in {1,...,7}
\draw[-stealth, thick] (x\x) -- (xhh\y);
% arrows between 2nd layer and 3rd layer
\foreach \x in {1,...,7}
\foreach \y in {1,...,7}
\draw[-stealth, thick] (xhh\x) -- (xh\y);
% arrows between 3rd layer and upper output layer
\foreach \x in {1,...,7}
\foreach \y in {1,...,5}
\draw[-stealth, thick, blue] (xh\x) -- (hm\y);
% arrows between 3rd layer and lower output layer
\foreach \x in {1,...,7}
\draw[-stealth, thick, red] (xh\x) -- (hs1);
% decorated arrows for main output variable
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick, red] (hs1) -- (s1);
% decorated arrows between upper output nodes and labels
\foreach \x in {1,...,5}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate, thick, blue] (hm\x) -- (mu\x);
% label for the whole network
\node[left=0.75em of x1] (l1) {$s$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[10pt]{article}
\usepackage[paperwidth=210mm,%
paperheight=297mm,%
tmargin=7.5mm,%
rmargin=7.5mm,%
bmargin=7.5mm,%
lmargin=7.5mm,
vscale=1,%
hscale=1]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows, calc, decorations.markings, positioning}
\pagestyle{empty}
\makeatletter
% create a timeline environment
\newenvironment{timeline}[6]{%
% #1 is startyear
% #2 is tlendyear
% #3 is yearcolumnwidth
% #4 is rulecolumnwidth
% #5 is entrycolumnwidth
% #6 is timelineheight
\newcommand{\startyear}{#1}
\newcommand{\tlendyear}{#2}
\newcommand{\yearcolumnwidth}{#3}
\newcommand{\rulecolumnwidth}{#4}
\newcommand{\entrycolumnwidth}{#5}
\newcommand{\timelineheight}{#6}
\newcommand{\templength}{}
\newcommand{\entrycounter}{0}
% https://tex.stackexchange.com/questions/85528/checking-whether-or-not-a-node-has-been-previously-defined
% https://tex.stackexchange.com/questions/37709/how-can-i-know-if-a-node-is-already-defined
\long\def\ifnodedefined##1##2##3{%
\@ifundefined{pgf@sh@ns@##1}{##3}{##2}%
}
\newcommand{\ifnodeundefined}[2]{%
\ifnodedefined{##1}{}{##2}
}
\newcommand{\drawtimeline}{%
\draw[timelinerule] (\yearcolumnwidth+5pt, 0pt) -- (\yearcolumnwidth+5pt, -\timelineheight);
\draw (\yearcolumnwidth+0pt, -10pt) -- (\yearcolumnwidth+10pt, -10pt);
\draw (\yearcolumnwidth+0pt, -\timelineheight+15pt) -- (\yearcolumnwidth+10pt, -\timelineheight+15pt);
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(\startyear, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\node[year] (year-\startyear) at (\yearcolumnwidth, \templength) {\startyear};
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(\tlendyear, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\node[year] (year-\tlendyear) at (\yearcolumnwidth, \templength) {\tlendyear};
}
\newcommand{\entry}[2]{%
% #1 is the year
% #2 is the entry text
\pgfmathtruncatemacro{\lastentrycount}{\entrycounter}
\pgfmathtruncatemacro{\entrycounter}{\entrycounter + 1}
\ifdim \lastentrycount pt > 0 pt%
\node[entry] (entry-\entrycounter) [below of=entry-\lastentrycount] {##2};
\else%
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(\startyear, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\node[entry] (entry-\entrycounter) at (\yearcolumnwidth+\rulecolumnwidth+10pt, \templength) {##2};
\fi
\ifnodeundefined{year-##1}{%
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(##1, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\draw (\yearcolumnwidth+2.5pt, \templength) -- (\yearcolumnwidth+7.5pt, \templength);
\node[year] (year-##1) at (\yearcolumnwidth, \templength) {##1};
}
\draw ($(year-##1.east)+(2.5pt, 0pt)$) -- ($(year-##1.east)+(7.5pt, 0pt)$) -- ($(entry-\entrycounter.west)-(5pt,0)$) -- (entry-\entrycounter.west);
}
\newcommand{\plainentry}[2]{% plainentry won't print date in the timeline
% #1 is the year
% #2 is the entry text
\pgfmathtruncatemacro{\lastentrycount}{\entrycounter}
\pgfmathtruncatemacro{\entrycounter}{\entrycounter + 1}
\ifdim \lastentrycount pt > 0 pt%
\node[entry] (entry-\entrycounter) [below of=entry-\lastentrycount] {##2};
\else%
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(\startyear, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\node[entry] (entry-\entrycounter) at (\yearcolumnwidth+\rulecolumnwidth+10pt, \templength) {##2};
\fi
\ifnodeundefined{invisible-year-##1}{%
\pgfmathsetlengthmacro{\templength}{neg(add(multiply(subtract(##1, \startyear), divide(subtract(\timelineheight, 25), subtract(\tlendyear, \startyear))), 10))}
\draw (\yearcolumnwidth+2.5pt, \templength) -- (\yearcolumnwidth+7.5pt, \templength);
\node[year] (invisible-year-##1) at (\yearcolumnwidth, \templength) {};
}
\draw ($(invisible-year-##1.east)+(2.5pt, 0pt)$) -- ($(invisible-year-##1.east)+(7.5pt, 0pt)$) -- ($(entry-\entrycounter.west)-(5pt,0)$) -- (entry-\entrycounter.west);
}
\begin{tikzpicture}
\tikzstyle{entry} = [%
align=left,%
text width=\entrycolumnwidth,%
node distance=10mm,%
anchor=west]
\tikzstyle{year} = [anchor=east]
\tikzstyle{timelinerule} = [%
draw,%
decoration={markings, mark=at position 1 with {\arrow[scale=1.5]{latex'}}},%
postaction={decorate},%
shorten >=0.4pt]
\drawtimeline
}
{
\end{tikzpicture}
\let\startyear\@undefined
\let\tlendyear\@undefined
\let\yearcolumnwidth\@undefined
\let\rulecolumnwidth\@undefined
\let\entrycolumnwidth\@undefined
\let\timelineheight\@undefined
\let\entrycounter\@undefined
\let\ifnodedefined\@undefined
\let\ifnodeundefined\@undefined
\let\drawtimeline\@undefined
\let\entry\@undefined
} % end of timeline environment
\makeatother
\begin{document}
% first timeline
\begin{timeline}{1900}{1990}{2cm}{2.5cm}{5cm}{12cm}
\entry{1903}{Wilbur and Orville Wright fly the first powered airplane}
\entry{1914}{Assassination of Franz Ferdinand}
\plainentry{1917}{The October Revolution}
\entry{1928}{Discovery of Penicillin}
\plainentry{1929}{Stock Market Crash of 1929}
\entry{1941}{Attack on Pearl Harbor}
\plainentry{1944}{D-Day}
\entry{1945}{The Bombing of Hiroshima}
\plainentry{1947}{Creation of Israel as a Jewish State}
\entry{1963}{US president John F. Kennedy assassinated in Dallas}
\entry{1969}{The Moon Landing}
\plainentry{1989}{Fall of the Berlin Wall}
\end{timeline}
\bigskip
Text from: A Brief History of LaTeX http://www.xent.com/FoRK-archive/feb98/0307.html
\smallskip
% second timeline
\begin{timeline}{1974}{1985}{2cm}{7cm}{10cm}{0.45\textheight}
\entry{1974}{Donald Knuth stops submitting papers to the AMS because ``the finished
product was just too painful for me to look at''.}
\entry{1977}{Knuth begins his research on typography.}
\entry{1978}{Knuth delivers an AMS Gibbs Lecture entitled Mathematical Typography to the AMS membership at its annual meeting.}
\entry{1979}{Digital Equipment Corporation and the AMS jointly publish Knuth's TeX and METAFONT: New Directions in Typesetting.}
\entry{1980}{The first draft of Spivak's Joy of TeX is announced in TUGboat, vol. 1, no. 1.}
% multiple events on a year
\entry{1982}{Spivak announces AMS-TeX at the joint math meetings.}
\entry{1982}{Version 0 of Spivak's Joy of TeX is released.}
\entry{1982}{Knuth releases dvitype, a model DVI driver.}
\entry{1983}{Lamport writes a LaTeX manual, the earliest known LaTeX manual in existence.}
% multiple events on a year
\entry{1984}{Addison-Wesley publishes Knuth's The TeXbook, destined to become the definitive TeX reference.}
\entry{1984}{Lamport releases version 2.06a of the LaTeX macros.}
% multiple events on a year
\entry{1985}{The Computer Modern (CM) fonts replace the American Modern (AM) fonts in TeX.}
\entry{1985}{Patashnik releases BibTeX version 0.98 for LaTeX 2.08. [``BibTeX 1.0'', TUGboat, vol. 15, no. 3, pp. 269--274, Sept. 1994.}
\end{timeline}
\end{document}
|
|
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,shadows.blur,decorations.pathreplacing}
\usepackage{etoolbox}
\tikzset{%
brace/.style = { decorate, decoration={brace, amplitude=5pt} },
mbrace/.style = { decorate, decoration={brace, amplitude=5pt, mirror} },
label/.style = { black, midway, scale=0.5, align=center },
toplabel/.style = { label, above=.5em, anchor=south },
leftlabel/.style = { label,rotate=-90,left=.5em,anchor=north },
bottomlabel/.style = { label, below=.5em, anchor=north },
force/.style = { rotate=-90,scale=0.4 },
round/.style = { rounded corners=2mm },
legend/.style = { right,scale=0.4 },
nosep/.style = { inner sep=0pt },
generation/.style = { anchor=base },
dasher/.style = { orange, dashed } % color for graviton
}
% the style for each of the particles
% #1 fill color; #2 symbol; #3 name; #4 mass; #5 spin; #6 charge; #7 colors
%
\newcommand\particle[7][white]{%
\begin{tikzpicture}[x=1cm, y=1cm]
\path[fill=#1,blur shadow={shadow blur steps=5}] (0.1,0) -- (0.9,0)
arc (90:0:1mm) -- (1.0,-0.9) arc (0:-90:1mm) -- (0.1,-1.0)
arc (-90:-180:1mm) -- (0,-0.1) arc(180:90:1mm) -- cycle;
\ifstrempty{#7}{}{\path[fill=purple!50!white] % colors: band, purple
(0.6,0) --(0.7,0) -- (1.0,-0.3) -- (1.0,-0.4);}
\ifstrempty{#6}{}{\path[fill=green!50!black!50] (0.7,0) -- (0.9,0) % charge: corner, green
arc (90:0:1mm) -- (1.0,-0.3);}
\ifstrempty{#5}{}{\path[fill=orange!50!white] (1.0,-0.7) -- (1.0,-0.9) % spin: bottom corner, orange
arc (0:-90:1mm) -- (0.7,-1.0);}
\draw[\ifstrempty{#2}{dasher}{black}] (0.1,0) -- (0.9,0) % line
arc (90:0:1mm) -- (1.0,-0.9) arc (0:-90:1mm) -- (0.1,-1.0)
arc (-90:-180:1mm) -- (0,-0.1) arc(180:90:1mm) -- cycle;
\ifstrempty{#7}{}{\node at(0.825,-0.175) [rotate=-45,scale=0.2] {#7};} % colors
\ifstrempty{#6}{}{\node at(0.9,-0.1) [nosep,scale=0.17] {#6};} % charge
\ifstrempty{#5}{}{\node at(0.9,-0.9) [nosep,scale=0.2] {#5};} % spin
\ifstrempty{#4}{}{\node at(0.1,-0.1) [nosep,anchor=west,scale=0.25]{#4};} % mass
\ifstrempty{#3}{}{\node at(0.1,-0.85) [nosep,anchor=west,scale=0.3] {#3};} % name
\ifstrempty{#2}{}{\node at(0.1,-0.5) [nosep,anchor=west,scale=1.5] {#2};} % symbol
\end{tikzpicture}
}
\begin{document}
\begin{tikzpicture}[x=1.2cm, y=1.2cm]
% draw force blocks
\draw[round] (-0.5,0.5) rectangle (4.4,-1.5); % strong force
\draw[round] (-0.6,0.6) rectangle (5.0,-2.5); % electromagnetic force
\draw[round] (-0.7,0.7) rectangle (5.6,-3.5); % weak force
% draw all particles
\node at(0, 0) {\particle[gray!20!white]
{$u$} {up} {$2.3$ MeV}{1/2}{$2/3$}{R/G/B}};
\node at(0,-1) {\particle[gray!20!white]
{$d$} {down} {$4.8$ MeV}{1/2}{$-1/3$}{R/G/B}};
\node at(0,-2) {\particle[gray!20!white]
{$e$} {electron} {$511$ keV}{1/2}{$-1$}{}};
\node at(0,-3) {\particle[gray!20!white]
{$\nu_e$} {$e$ neutrino} {$<2$ eV}{1/2}{}{}};
\node at(1, 0) {\particle
{$c$} {charm} {$1.28$ GeV}{1/2}{$2/3$}{R/G/B}};
\node at(1,-1) {\particle
{$s$} {strange} {$95$ MeV}{1/2}{$-1/3$}{R/G/B}};
\node at(1,-2) {\particle
{$\mu$} {muon} {$105.7$ MeV}{1/2}{$-1$}{}};
\node at(1,-3) {\particle
{$\nu_\mu$} {$\mu$ neutrino} {$<190$ keV}{1/2}{}{}};
\node at(2, 0) {\particle
{$t$} {top} {$173.2$ GeV}{1/2}{$2/3$}{R/G/B}};
\node at(2,-1) {\particle
{$b$} {bottom} {$4.7$ GeV}{1/2}{$-1/3$}{R/G/B}};
\node at(2,-2) {\particle
{$\tau$} {tau} {$1.777$ GeV}{1/2}{$-1$}{}};
\node at(2,-3) {\particle
{$\nu_\tau$} {$\tau$ neutrino} {$<18.2$ MeV}{1/2}{}{}};
\node at(3,-3) {\particle[orange!20!white]
{$W^{\hspace{-.3ex}\scalebox{.5}{$\pm$}}$}
{} {$80.4$ GeV}{1}{$\pm1$}{}}; % W
\node at(4,-3) {\particle[orange!20!white]
{$Z$} {} {$91.2$ GeV}{1}{}{}}; % Z
\node at(3.5,-2) {\particle[green!50!black!20]
{$\gamma$} {photon} {}{1}{}{}}; % gamma-photon
\node at(3.5,-1) {\particle[purple!20!white]
{$g$} {gluon} {}{1}{}{color}}; % g-gluon
\node at(5,0) {\particle[gray!50!white]
{$H$} {Higgs} {$125.1$ GeV}{0}{}{}}; % H-Higgs
\node at(6.1,-3) {\particle[gray!5!white]
{} {graviton} {}{}{}{}}; % graviton
% add text labels for forces
\node at(4.25,-0.5) [force] {strong nuclear force (color)};
\node at(4.85,-1.5) [force] {electromagnetic force (charge)};
\node at(5.45,-2.4) [force] {weak nuclear force (weak isospin)};
\node at(6.75,-2.5) [force] {gravitational force (mass)};
% draw arrows and add labels for legends
\draw [<-] (2.50,0.30) -- (2.7,0.3) node [legend] {charge};
\draw [<-] (2.50,0.15) -- (2.7,0.15) node [legend] {colors};
\draw [<-] (2.05,0.25) -- (2.3,0) -- (2.7,0) node [legend] {mass};
\draw [<-] (2.50,-0.3) -- (2.7,-0.3) node [legend] {spin};
% draw vertical braces and labels
\draw [mbrace] (-0.8,0.5) -- (-0.8,-1.5)
node[leftlabel] {6 quarks\\(+6 anti-quarks)};
\draw [mbrace] (-0.8,-1.5) -- (-0.8,-3.5)
node[leftlabel] {6 leptons\\(+6 anti-leptons)};
% draw bottom braces and labels
\draw [mbrace] (-0.5,-3.6) -- (2.5,-3.6)
node[bottomlabel]
{12 fermions\\(+12 anti-fermions)\\increasing mass $\to$};
\draw [mbrace] (2.5,-3.6) -- (5.5,-3.6)
node[bottomlabel] {5 bosons\\(+1 opposite charge $W$)};
% draw top braces and add text labels
\draw [brace] (-0.5,.8) -- (0.5,.8) node[toplabel] {standard matter};
\draw [brace] (0.5,.8) -- (2.5,.8) node[toplabel] {unstable matter};
\draw [brace] (2.5,.8) -- (4.5,.8) node[toplabel] {force carriers};
\draw [brace] (4.5,.8) -- (5.5,.8) node[toplabel] {Goldstone\\bosons}; % two lines
\draw [brace] (5.5,.8) -- (7,.8) node[toplabel] {outside\\standard model}; % two lines
% add big numbers on top
\node at (0,1.2) [generation] {1\tiny st};
\node at (1,1.2) [generation] {2\tiny nd};
\node at (2,1.2) [generation] {3\tiny rd};
\node at (2.8,1.2) [generation] {\tiny generation};
\end{tikzpicture}
\end{document}
|
|
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\begin{comment}
:Title: Polarizing microscope
:Tags: 3D; Earth Sciences; Petrography; Physics
:Author: Cyril Langlois
This TikZ code sketches the light behavior during its travel in a polarizing
petrographic microscope when a birefringent crystal thin section is inserted
between the polarizing devices.
The goal was to correctly show the vectorial relationships between light
electric fields during its travel through the first polaroid, the mineral
section and the second polaroid.
\end{comment}
\begin{document}
\begin{tikzpicture}[x={(0.866cm,-0.5cm)}, y={(0.866cm,0.5cm)}, z={(0cm,1cm)}, scale=1.0,
%Option for nice arrows
>=stealth, %
inner sep=0pt, outer sep=2pt,%
axis/.style={thick,->},
wave/.style={thick,color=#1,smooth},
polaroid/.style={fill=black!60!white, opacity=0.3},
]
% Colors
\colorlet{darkgreen}{green!50!black}
\colorlet{lightgreen}{green!80!black}
\colorlet{darkred}{red!50!black}
\colorlet{lightred}{red!80!black}
% Frame
\coordinate (O) at (0, 0, 0);
\draw[axis] (O) -- +(14, 0, 0) node [right] {x};
\draw[axis] (O) -- +(0, 2.5, 0) node [right] {y};
\draw[axis] (O) -- +(0, 0, 2) node [above] {z};
\draw[thick,dashed] (-2,0,0) -- (O);
% monochromatic incident light with electric field
\draw[wave=blue, opacity=0.7, variable=\x, samples at={-2,-1.75,...,0}]
plot (\x, { cos(1.0*\x r)*sin(2.0*\x r)}, { sin(1.0*\x r)*sin(2.0*\x r)})
plot (\x, {-cos(1.0*\x r)*sin(2.0*\x r)}, {-sin(1.0*\x r)*sin(2.0*\x r)});
\foreach \x in{-2,-1.75,...,0}{
\draw[color=blue, opacity=0.7,->]
(\x,0,0) -- (\x, { cos(1.0*\x r)*sin(2.0*\x r)}, { sin(1.0*\x r)*sin(2.0*\x r)})
(\x,0,0) -- (\x, {-cos(1.0*\x r)*sin(2.0*\x r)}, {-sin(1.0*\x r)*sin(2.0*\x r)});
}
\filldraw[polaroid] (0,-2,-1.5) -- (0,-2,1.5) -- (0,2,1.5) -- (0,2,-1.5) -- (0,-2,-1.5)
node[below, sloped, near end]{Polaroid};%
%Direction of polarization
\draw[thick,<->] (0,-1.75,-1) -- (0,-0.75,-1);
% Electric field vectors
\draw[wave=blue, variable=\x,samples at={0,0.25,...,6}]
plot (\x,{sin(2*\x r)},0)node[anchor=north]{$\vec{E}$};
%Polarized light between polaroid and thin section
\foreach \x in{0, 0.25,...,6}
\draw[color=blue,->] (\x,0,0) -- (\x,{sin(2*\x r)},0);
\draw (3,1,1) node [text width=2.5cm, text centered]{Polarized light};
%Crystal thin section
\begin{scope}[thick]
\draw (6,-2,-1.5) -- (6,-2,1.5) node [above, sloped, midway]{Crystal section}
-- (6, 2, 1.5) -- (6, 2, -1.5) -- cycle % First face
(6, -2, -1.5) -- (6.2, -2,-1.5)
(6, 2, -1.5) -- (6.2, 2,-1.5)
(6, -2, 1.5) -- (6.2, -2, 1.5)
(6, 2, 1.5) -- (6.2, 2, 1.5)
(6.2,-2, -1.5) -- (6.2, -2, 1.5) -- (6.2, 2, 1.5)
-- (6.2, 2, -1.5) -- cycle; % Second face
%Optical indices
\draw[darkred, ->] (6.1, 0, 0) -- (6.1, 0.26, 0.966) node [right] {$n_{g}'$}; % index 1
\draw[darkred, dashed] (6.1, 0, 0) -- (6.1,-0.26, -0.966); % index 1
\draw[darkgreen, ->] (6.1, 0, 0) -- (6.1, 0.644,-0.173) node [right] {$n_{p}'$}; % index 2
\draw[darkgreen, dashed] (6.1, 0, 0) -- (6.1,-0.644, 0.173); % index 2
\end{scope}
%Rays leaving thin section
\draw[wave=darkred, variable=\x, samples at={6.2,6.45,...,12}]
plot (\x, {0.26*0.26*sin(2*(\x-0.5) r)}, {0.966*0.26*sin(2*(\x-0.5) r)}); %n'g-oriented ray
\draw[wave=darkgreen, variable=\x, samples at={6.2,6.45,...,12}]
plot (\x, {0.966*0.966*sin(2*(\x-0.1) r)},{-0.26*0.966*sin(2*(\x-0.1) r)}); %n'p-oriented ray
\draw (10,1,1) node [text width=2.5cm, text centered] {Polarized and dephased light};
\foreach \x in{6.2,6.45,...,12} {
\draw[color=darkgreen, ->] (\x, 0, 0) --
(\x, {0.966*0.966*sin(2*(\x-0.1) r)}, {-0.26*0.966*sin(2*(\x-0.1) r)});
\draw[color=darkred, ->] (\x, 0, 0) --
(\x, {0.26*0.26*sin(2*(\x-0.5) r)}, {0.966*0.26*sin(2*(\x-0.5) r)});
}
%Second polarization
\draw[polaroid] (12, -2, -1.5) -- (12, -2, 1.5) %Polarizing filter
node [above, sloped,midway] {Polaroid} -- (12, 2, 1.5) -- (12, 2, -1.5) -- cycle;
\draw[thick, <->] (12, -1.5,-0.5) -- (12, -1.5, 0.5); %Polarization direction
%Light leaving the second polaroid
\draw[wave=lightgreen,variable=\x, samples at={12, 12.25,..., 14}]
plot (\x,{0}, {0.966*0.966*0.26*sin(2*(\x-0.5) r)}); %n'g polarized ray
\draw[wave=lightred, variable=\x, samples at={12, 12.25,..., 14}]
plot (\x,{0}, {-0.26*0.966*sin(2*(\x-0.1) r)}); %n'p polarized ray
\node[align=justify, text width=14cm, anchor=north west, yshift=-2mm] at (current bounding box.south west)
{Light behavior in a petrographic microscope with light polarizing
device. Only one incident wavelength is shown (monochromatic light).
The magnetic field, perpendicular to the electric one, is not drawn.};
\end{tikzpicture}
\end{document}
|
|
% Author: Izaak Neutelings (May 2018)
% Inspiration: https://tex.stackexchange.com/questions/113900/draw-polarized-light
\documentclass[border=3pt,tikz]{article}
\usepackage[top=0.25in, bottom=0.25in]{geometry}
\usepackage{amsmath} % for \text
\usepackage{tikz}
\tikzset{>=latex} % for LaTeX arrow head
\usepackage{xcolor}
\colorlet{myblue}{black!40!blue}
\colorlet{myred}{black!40!red}
\begin{document}
% Electromagnetic wave - black
\begin{tikzpicture}[x=(-15:1.2), y=(90:1.0), z=(-150:1.0),
line cap=round, line join=round,
axis/.style={black, thick,->},
vector/.style={>=stealth,->}]
\large
\def\A{1.5}
\def\nNodes{5} % use even number
\def\nVectorsPerNode{8}
\def\N{\nNodes*40}
\def\xmax{\nNodes*pi/2*1.01}
\pgfmathsetmacro\nVectors{(\nVectorsPerNode+1)*\nNodes}
\def\vE{\mathbf{E}}
\def\vB{\mathbf{B}}
\def\vk{\mathbf{\hat{k}}}
% main axes
\draw[axis] (0,0,0) -- ++(\xmax*1.1,0,0) node[right] {$x$};
\draw[axis] (0,-\A*1.4,0) -- (0,\A*1.4,0) node[right] {$y$};
\draw[axis] (0,0,-\A*1.4) -- (0,0,\A*1.4) node[above left] {$z$};
% small axes
\def\xOffset{{(\nNodes-2)*pi/2}}
\def\yOffset{\A*1.2}
\def\zOffset{\A*1.2}
\draw[axis] (\xOffset,\yOffset,-\zOffset) -- ++(\A*0.6,0,0) node[right] {$\vk$};
\draw[axis] (\xOffset,\yOffset,-\zOffset) -- ++(0,\A*0.6,0) node[right] {$\vE$};
\draw[axis] (\xOffset,\yOffset,-\zOffset) -- ++(0,0,\A*0.6) node[above left] {$\vB$};
% equation
\node[above right] at (\xOffset,-0.5*\yOffset,4*\zOffset)
{$\begin{aligned}
\vE &= \mathbf{E_0}\sin(\vk\cdot\mathbf{x}-c_0t)\\
\vB &= \mathbf{B_0}\sin(\vk\cdot\mathbf{x}-c_0t)\\
\end{aligned}$};
\node[below right] at (\xOffset,-0.5*\yOffset,4*\zOffset)
{$\vE\cdot\vk = 0,\;\; \vB\cdot\vk = 0,\;\; \vB = \frac{1}{c_0}\vk\times\vE$};
% waves
\draw[very thick,variable=\t,domain=0:\nNodes*pi/2*1.01,samples=\N]
plot (\t,{\A*sin(\t*360/pi)},0);
\draw[very thick,variable=\t,domain=0:\nNodes*pi/2*1.01,samples=\N]
plot (\t,0,{\A*sin(\t*360/pi)});
% draw vectors
\foreach \k [evaluate={\t=\k*pi/2/(\nVectorsPerNode+1);
\angle=\k*90/(\nVectorsPerNode+1);
\c=(mod(\angle,90)!=0);}]
in {1,...,\nVectors}{
\if\c1
\draw[vector] (\t,0,0) -- ++(0,{\A*sin(2*\angle)},0);
\draw[vector] (\t,0,0) -- ++(0,0,{\A*sin(2*\angle)});
\fi
}
\end{tikzpicture}
% Electromagnetic wave - circular polarization
\begin{tikzpicture}[x=(-15:0.8), y=(90:1.0), z=(-150:1.0),
line cap=round, line join=round,
axis/.style={black, thick,->},
vector/.style={>=stealth,->}]
\large
\def\A{1.5}
\def\nNodes{8} % use even number
\def\nVectorsPerNode{8}
\def\N{\nNodes*40}
\def\xmax{\nNodes*pi/2*1.01}
\pgfmathsetmacro\nVectors{\nVectorsPerNode*\nNodes}
\def\vE{\mathbf{E}}
\def\vB{\mathbf{B}}
\def\vk{\mathbf{\hat{k}}}
% main axes
\draw[axis] (0,0,0) -- ++(\xmax*1.1,0,0) node[right] {$x$};
\draw[axis] (0,-\A*1.4,0) -- (0,\A*1.4,0) node[right] {$y$};
\draw[axis] (0,0,-\A*1.4) -- (0,0,\A*1.4) node[above left] {$z$};
% waves
\draw[very thick,variable=\t,domain=0:\nNodes*pi/2*1.01,samples=\N]
plot (\t,{\A*cos(\t*360/pi)},{\A*sin(\t*360/pi)});
% draw vectors
\foreach \k [evaluate={\t=\k*pi/2/\nVectorsPerNode;
\angle=\k*90/\nVectorsPerNode;}]
in {1,...,\nVectors}{
\draw[vector] (\t,0,0) -- ++(0,{\A*cos(2*\angle)},{\A*sin(2*\angle)});
}
\end{tikzpicture}
% Electromagnetic wave - colored
\begin{tikzpicture}[x=(-15:1.2), y=(90:1.0), z=(-150:1.0),
line cap=round, line join=round,
axis/.style={black, thick,->},
vector/.style={>=stealth,->}]
\large
\def\A{1.5}
\def\nNodes{5} % use even number
\def\nVectorsPerNode{8}
\def\N{\nNodes*40}
\def\xmax{\nNodes*pi/2*1.01}
\pgfmathsetmacro\nVectors{(\nVectorsPerNode+1)*\nNodes}
\def\vE{{\color{myblue}\mathbf{E}}}
\def\vB{{\color{myred}\mathbf{B}}}
\def\vk{\mathbf{\hat{k}}}
\def\drawENode{ % draw E node and vectors with some offset
\draw[myblue,very thick,variable=\t,domain=\iOffset*pi/2:(\iOffset+1)*pi/2*1.01,samples=40]
plot (\t,{\A*sin(\t*360/pi)},0);
\foreach \k [evaluate={\t=\k*pi/2/(\nVectorsPerNode+1);
\angle=\k*90/(\nVectorsPerNode+1);}]
in {1,...,\nVectorsPerNode}{
\draw[vector,myblue!50] (\iOffset*pi/2+\t,0,0) -- ++(0,{\A*sin(2*\angle+\iOffset*180)},0);
}
}
\def\drawBNode{ % draw B node and vectors with some offset
\draw[myred,very thick,variable=\t,domain=\iOffset*pi/2:(\iOffset+1)*pi/2*1.01,samples=40]
plot (\t,0,{\A*sin(\t*360/pi)});
\foreach \k [evaluate={\t=\k*pi/2/(\nVectorsPerNode+1);
\angle=\k*90/(\nVectorsPerNode+1);}]
in {1,...,\nVectorsPerNode}{
\draw[vector,myred!50] (\iOffset*pi/2+\t,0,0) -- ++(0,0,{\A*sin(2*\angle+\iOffset*180)});
}
}
% main axes
\draw[axis] (0,0,0) -- ++(\xmax*1.1,0,0) node[right] {$x$};
\draw[axis] (0,-\A*1.4,0) -- (0,\A*1.4,0) node[right] {$y$};
\draw[axis] (0,0,-\A*1.4) -- (0,0,\A*1.4) node[above left] {$z$};
% small axes
\def\xOffset{{(\nNodes-2)*pi/2}}
\def\yOffset{\A*1.2}
\def\zOffset{\A*1.2}
\draw[axis,black] (\xOffset,\yOffset,-\zOffset) -- ++(\A*0.6,0,0) node[right,align=center] {$\mathbf{\hat{k}}$}; %\\propagation
\draw[axis,myblue] (\xOffset,\yOffset,-\zOffset) -- ++(0,\A*0.6,0) node[right] {$\mathbf{E}$};
\draw[axis,myred] (\xOffset,\yOffset,-\zOffset) -- ++(0,0,\A*0.6) node[above left] {$\mathbf{B}$};
% equation
\node[above right] at (\xOffset,-0.5*\yOffset,4*\zOffset)
{$\begin{aligned}
\vE &= {\color{myblue}\mathbf{E_0}}\sin(\vk\cdot\mathbf{x}-c_0t)\\
\vB &= {\color{myred} \mathbf{B_0}}\sin(\vk\cdot\mathbf{x}-c_0t)\\
\end{aligned}$};
\node[below right] at (\xOffset,-0.5*\yOffset,4*\zOffset)
{$\vE\cdot\vk = 0,\;\; \vB\cdot\vk = 0,\;\; \vB = \frac{1}{c_0}\vk\times\vE$};
% draw (anti-)nodes
\foreach \iNode [evaluate={\iOffset=\iNode-1;}] in {1,...,\nNodes}{
\ifodd\iNode \drawBNode \drawENode % E overlaps B
\else \drawENode \drawBNode % B overlaps E
\fi
}
\end{tikzpicture}
\end{document}
|
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 2