image
imagewidth (px)
384
384
text
stringlengths
1.05k
7.68k
\documentclass[crop,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning} \definecolor{echoreg}{HTML}{2cb1e1} \definecolor{olivegreen}{rgb}{0,0.6,0} \definecolor{mymauve}{rgb}{0.58,0,0.82} \usepackage{etoolbox} \newtoggle{redraw} \newtoggle{redraw2} \tikzset{% pics/cube/.style args={#1/#2/#3/#4}{code={% \begin{scope}[line width=#4mm] \begin{scope} \clip (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle; \filldraw (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle; \end{scope} \iftoggle{redraw}{% }{% \begin{scope} \clip (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle; \filldraw (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle; \end{scope} } \iftoggle{redraw2}{% }{ \begin{scope} \clip (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle; \filldraw (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle; \end{scope} } \node[inner sep=0] (-A) at (-#1-#3*0.5, 0, -#3*0.5) {}; \node[inner sep=0] (-B) at (#1-#3*0.5, 0, -#3*0.5) {}; \coordinate (-V) at (#1, #2); \coordinate (-W) at (#1, -#2); \end{scope} }}} \begin{document} \begin{tikzpicture} \node[] (i2) {}; \pic[fill=green!50] (I2) {cube={1.8/1.8/0.4/1}}; \togglefalse{redraw} \togglefalse{redraw2} \node[right=16em of i2] (y) {}; \pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}}; \node[right=12em of y] (y1) {}; \pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}}; %transparent node to ease the arrow drawing \pic[right=12em of y1, draw=echoreg!0, fill=echoreg!0] (Y2) {cube={0.9/0.9/2/1}}; \node[right=12em of y1] (y3) {}; \pic[below right=1.1em and 13em of y1, fill=mymauve!30] (Y5) {cube={0.45/0.45/2/1}}; \pic[below right=1.1em and 10em of y1, fill=mymauve!30] (Y6) {cube={0.45/0.45/2/1}}; \pic[above right=1.1em and 13em of y1, fill=mymauve!30] (Y4) {cube={0.45/0.45/2/1}}; \pic[above right=1.1em and 10em of y1, fill=mymauve!30] (Y3) {cube={0.45/0.45/2/1}}; \draw [-stealth, ultra thick] (I2-B) -- node[above] {Conv.} (Y-A); \draw [-stealth, ultra thick] (Y-B) -- node[above] {Pool} (Y1-A); \draw [-stealth, ultra thick] (Y1-B) -- node[above=0.3em, inner sep=0.1em, xshift=-1em] {Conv.} (Y2-A); \color{black} \toggletrue{redraw} \toggletrue{redraw2} \pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}}; \pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}}; \node[] (i2) {\LARGE ${\bf input}$}; \node[above right=0.1em and 9em of y1] (z2) {\LARGE $\vec{o}_1$}; \node[below right=0em and 9em of y1] (z2) {\LARGE $\vec{o}_3$}; \node[above right=0.1em and 12em of y1] (z2) {\LARGE $\vec{o}_2$}; \node[below right=0em and 12em of y1] (z2) {\LARGE $\vec{o}_4$}; \end{tikzpicture} \end{document}
\documentclass[crop,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning} \definecolor{echoreg}{HTML}{2cb1e1} \definecolor{olivegreen}{rgb}{0,0.6,0} \definecolor{mymauve}{rgb}{0.58,0,0.82} \usepackage{etoolbox} \newtoggle{redraw} \newtoggle{redraw2} \tikzset{% pics/cube/.style args={#1/#2/#3/#4}{code={% \begin{scope}[line width=#4mm] \begin{scope} \clip (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle; \filldraw (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle; \end{scope} \iftoggle{redraw}{% }{% \begin{scope} \clip (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle; \filldraw (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle; \end{scope} } \iftoggle{redraw2}{% }{ \begin{scope} \clip (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle; \filldraw (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle; \end{scope} } \node[inner sep=0] (-A) at (-#1-#3*0.5, 0, -#3*0.5) {}; \node[inner sep=0] (-B) at (#1-#3*0.5, 0, -#3*0.5) {}; \coordinate (-V) at (#1, #2); \coordinate (-W) at (#1, -#2); \end{scope} }}} \begin{document} \begin{tikzpicture} \node (1) [draw, dashed, minimum height=15em, minimum width=62em, xshift=24em, 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=35em, xshift=63.5em, very thick, rectangle, rounded corners] {}; \node (la1) [below=0em of 2] {{\emph{decoder}}}; \node[] (i2) {}; \pic[fill=green!50] (I2) {cube={1.8/1.8/0.4/1}}; \togglefalse{redraw} \togglefalse{redraw2} \node[right=16em of i2] (y) {}; \pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}}; \node[right=12em of y] (y1) {}; \pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}}; \node[right=12em of y1] (y2) {}; \pic[right=12em of y1, fill=echoreg!50] (Y2) {cube={0.9/0.9/2/1}}; \node[right=10em of y2] (y3) {}; \pic[right=10em of y2, fill=red!50] (Y3) {cube={0.45/0.45/2/1}}; \node[right=9em of y3] (z1) {}; \pic[right=9em of y3, fill=mymauve!50] (Z1) {cube={0.9/0.9/1/1}}; \node[right=12em of z1] (z2) {}; \pic[right=12em of z1, fill=mymauve!50] (Z2) {cube={1.8/1.8/0.4/1}}; \draw [-stealth, ultra thick] (I2-B) -- node[above] {Conv.} node[below] {ReLU} (Y-A); \draw [-stealth, ultra thick] (Y-B) -- node[above] {Pool} (Y1-A); \draw [-stealth, ultra thick] (Y1-B) -- node[above=0.3em, inner sep=0.1em] {Conv.} node[below] {ReLU} (Y2-A); \draw [-stealth, ultra thick] (Y2-B) -- node[above] {Pool} (Y3-A); \draw [-stealth, ultra thick] (Y3-B) -- node[above] {Deconv.} node[below] {ReLU} (Z1-A); \draw [-stealth, ultra thick] (Z1-B) -- node[above] {Deconv.} node[below] {logistic} (Z2-A); \color{black} \toggletrue{redraw} \toggletrue{redraw2} \node[right=16em of i2] (y) {}; \pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}}; \pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}}; \pic[right=12em of y1, fill=echoreg!50] (Y2) {cube={0.9/0.9/2/1}}; \pic[right=9em of y3, fill=mymauve!50] (Z1) {cube={0.9/0.9/1/1}}; \togglefalse{redraw2} \pic[right=10em of y2, fill=red!50] (Y3) {cube={0.45/0.45/2/1}}; \toggletrue{redraw2} \node[] (i2) {\LARGE ${\bf X}$}; \node[right=9.25em of y2] (y3) {\LARGE ${\bf z}$}; \node[right=11em of z1] (z2) {\LARGE ${\bf X}'$}; \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,shapes} \definecolor{mygreen}{rgb}{0,0.6,0} \pgfdeclarelayer{background} \pgfsetlayers{background,main} \tikzstyle{vertex}=[circle,fill=black!25,minimum size=20pt,inner sep=0pt] \tikzstyle{selected vertex} = [vertex, fill=red!24] \tikzstyle{select vertex} = [vertex, fill=blue!24] \tikzstyle{selectx vertex} = [vertex, fill=green!24] \tikzstyle{edge} = [draw,thick,-] \tikzstyle{selected edge} = [draw,line width=5pt,-,red!50] \begin{document} \begin{tikzpicture}[scale=1.8, auto,swap] \foreach \pos/\name in {{(0,2)/a}, {(2,1)/b}, {(4,1)/c}, {(0,0)/d}, {(3,0)/e}, {(2,-1)/f}, {(4,-1)/g}} \node[vertex] (\name) at \pos {}; \foreach \source/ \dest /\weight in {b/a/7, c/b/8,d/a/5,d/b/9, e/b/7, e/c/5,e/d/15, f/d/6,f/e/8, g/e/9,g/f/11} \path[edge] (\source) -- (\dest); \foreach \vertex / \fr in {b/4} \path node[selected vertex] at (\vertex) {$\vec{h}_b$}; \foreach \vertex / \fr in {a/4, c/4, d/4, e/5} \path node[select vertex] at (\vertex) {$\vec{h}_{\vertex}$}; \begin{pgfonlayer}{background} \foreach \source / \dest in {b/c,d/b,a/b,b/e} \path[selected edge] (\source.center) -- (\dest.center); \end{pgfonlayer} \foreach \pos/\name in {{(6,2)/a1}, {(8,1)/b1}, {(10,1)/c1}, {(6,0)/d1}, {(9,0)/e1}, {(8,-1)/f1}, {(10,-1)/g1}} \node[vertex] (\name) at \pos {}; \foreach \source/ \dest /\weight in {b1/a1/7, c1/b1/8,d1/a1/5,d1/b1/9, e1/b1/7, e1/c1/5,e1/d1/15, f1/d1/6,f1/e1/8, g1/e1/9,g1/f1/11} \path[edge] (\source) -- (\dest); \foreach \vertex / \fr in {b1/4} \path node[selectx vertex] at (\vertex) {$\vec{h}'_b$}; \draw[-stealth, densely dotted, ultra thick, mygreen] (b) edge[bend left=20] (b1); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{shapes, arrows} \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{block2} = [rectangle, draw, fill=blue!20, text width=4em, text centered, rounded corners, minimum height=1em] \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm, minimum height=2em] \tikzstyle{line} = [draw, -latex'] \definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{echodrk}{HTML}{0099cc} \definecolor{drkorange}{HTML}{FF7c00} \begin{document} \begin{tikzpicture}[node distance=3cm, auto] \node [block, color=red, fill=white] (cpu) {CPU}; \node [cloud, color=red, fill=white, below of=cpu] (intr) {Interrupts}; \node [block, color=drkorange, fill=white, right of=cpu] (mmu) {Memory controller}; \node [block, color=echodrk, fill=white, right of=mmu] (memo) {Memory \begin{tikzpicture}\node [block2, color=echodrk, fill=white] (rom) {ROM};\node [block2, node distance=1.3em, below of=rom, color=echodrk, fill=white] (ram) {RAM};\end{tikzpicture}}; \node [block, color=black, fill=white, right of=memo] (cartr) {Cartridge reader}; \node [block, color=mygreen, fill=white, below of=memo] (gpu) {GPU}; \node [cloud, color=mygreen, fill=white, right of=gpu] (sprites) {Sprites}; \node [block, color=blue, fill=white, left of=gpu] (io) {Input}; \path [line,transform canvas={yshift=0.1em}] (cpu) -- (mmu); \path [line,transform canvas={yshift=-0.1em}] (mmu) -- (cpu); \path [line,transform canvas={yshift=0.1em}] (mmu) -- (memo); \path [line,transform canvas={yshift=-0.1em}] (memo) -- (mmu); \path [line] (io) -- (mmu); \path [line] (mmu) -- (gpu); \path [line] (memo) -- (gpu); \path [line, dashed] (intr) -- (cpu); \path [line, dashed] (io) -- (intr); \path [line, dashed] (gpu) edge [bend left] (intr); \path [line] (cartr) -- (memo); \path [line, dashed] (memo) -- (sprites); \path [line, dashed] (sprites) -- (gpu); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{snakes} \definecolor{mygreen}{HTML}{006400} \definecolor{mymauve}{rgb}{0.58,0,0.82} \definecolor{mygold}{HTML}{B8860B} \definecolor{mynavy}{HTML}{000080} \begin{document} \begin{tikzpicture} \node at (0,0) {\tt GTGCATCTGACTCCTGAGGAGTAG}; \node (dnk2) at (0,-0.5) {\tt CACGTAGACTGAGGACTCCTCATC}; \node at (-2.7, 0) {\tt \dots}; \node at (2.7, 0) {\tt \dots}; \node at (-2.7, -0.5) {\tt \dots}; \node at (2.7, -0.5) {\tt \dots}; \draw[red, opacity=0.4, very thick] (-3, 0) -- (3, 0); \draw[blue, opacity=0.4, very thick] (-3, -0.5) -- (3, -0.5); \node at (4, -0.25) {DNA}; \node (rnk) at (0,-2.5) {\tt \textcolor{blue}{GUG}\textcolor{mygreen}{CAU}\textcolor{orange}{CUG}\textcolor{mymauve}{ACU}\textcolor{mygold}{CCU}\textcolor{mynavy}{GAGGAG}\tikz[baseline]{\node[rectangle, fill=red,inner sep=0.3mm,anchor=base] (X) {\textcolor{white}{UAG}};}}; \draw[gray, opacity=0.4, very thick] (-3, -2.5) -- (3, -2.5); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-2.22, -2.2) -- (-1.7, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-1.65, -2.2) -- (-1.15, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-1.1, -2.2) -- (-0.6, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-0.55, -2.2) -- (-0.05, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (0, -2.2) -- (0.5, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (0.55, -2.2) -- (1.05, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (1.1, -2.2) -- (1.6, -2.2); \draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (1.65, -2.2) -- (2.2, -2.2); \node at (4, -2.5) {mRNA}; \draw[-stealth, thick] (dnk2) -- node[right] {\emph{transcription}} (rnk); \draw[-stealth, thick] (-1.96, -2.9) -- (-1.96, -4.3); \node at (-1.96, -4.5) {\tt \textcolor{blue}V}; \draw[-stealth, thick] (-1.4, -2.9) -- (-1.4, -4.3); \node at (-1.4, -4.5) {\tt \textcolor{mygreen}H}; \draw[-stealth, thick] (-0.85, -2.9) -- (-0.85, -4.3); \node at (-0.85, -4.5) {\tt \textcolor{orange}L}; \draw[-stealth, thick] (-0.3, -2.9) -- (-0.3, -4.3); \node at (-0.3, -4.5) {\tt \textcolor{mymauve}T}; \draw[-stealth, thick] (0.25, -2.9) -- (0.25, -4.3); \node at (0.25, -4.5) {\tt \textcolor{mygold}P}; \draw[-stealth, thick] (0.8, -2.9) -- (0.8, -4.3); \node at (0.8, -4.5) {\tt \textcolor{mynavy}E}; \draw[-stealth, thick] (1.35, -2.9) -- (1.35, -4.3); \node at (1.35, -4.5) {\tt \textcolor{mynavy}E}; \draw[-stealth, thick] (1.925, -2.9) -- node[right] {\emph{translation}} (1.925, -4.3); \node at (1.925, -4.5) {\tikz[baseline]{\node[rectangle, fill=red,inner sep=0.3mm,anchor=base] (X) {\textcolor{white}{\tt STOP}};}}; \draw[gray, opacity=0.4, very thick] (-3, -4.5) -- (3, -4.5); \node at (4, -4.5) {protein}; \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \tikzstyle{inputNode}=[draw,circle,minimum size=10pt,inner sep=0pt] \tikzstyle{stateTransition}=[-stealth, thick] \begin{document} \begin{tikzpicture} \node[draw,circle,minimum size=25pt,inner sep=0pt] (x) at (0,0) {$\Sigma$ $\sigma$}; \node[inputNode] (x0) at (-2, 1.5) {$\tiny +1$}; \node[inputNode] (x1) at (-2, 0.75) {$\tiny x_1$}; \node[inputNode] (x2) at (-2, 0) {$\tiny x_2$}; \node[inputNode] (x3) at (-2, -0.75) {$\tiny x_3$}; \node[inputNode] (xn) at (-2, -1.75) {$\tiny x_n$}; \draw[stateTransition] (x0) to[out=0,in=120] node [midway, sloped, above] {$w_0$} (x); \draw[stateTransition] (x1) to[out=0,in=150] node [midway, sloped, above] {$w_1$} (x); \draw[stateTransition] (x2) to[out=0,in=180] node [midway, sloped, above] {$w_2$} (x); \draw[stateTransition] (x3) to[out=0,in=210] node [midway, sloped, above] {$w_3$} (x); \draw[stateTransition] (xn) to[out=0,in=240] node [midway, sloped, above] {$w_n$} (x); \draw[stateTransition] (x) -- (4,0) node [midway,above] {$\sigma\left(w_0 + \sum\limits_{i=1}^{n}{w_ix_i}\right)$}; \draw[dashed] (0,-0.43) -- (0,0.43); \node (dots) at (-2, -1.15) {$\vdots$}; \node[inputNode, thick] (i1) at (6, 0.75) {}; \node[inputNode, thick] (i2) at (6, 0) {}; \node[inputNode, thick] (i3) at (6, -0.75) {}; \node[inputNode, thick] (h1) at (8, 1.5) {}; \node[inputNode, thick] (h2) at (8, 0.75) {}; \node[inputNode, thick] (h3) at (8, 0) {}; \node[inputNode, thick] (h4) at (8, -0.75) {}; \node[inputNode, thick] (h5) at (8, -1.5) {}; \node[inputNode, thick] (o1) at (10, 0.75) {}; \node[inputNode, thick] (o2) at (10, -0.75) {}; \draw[stateTransition] (5, 0.75) -- node[above] {$I_1$} (i1); \draw[stateTransition] (5, 0) -- node[above] {$I_2$} (i2); \draw[stateTransition] (5, -0.75) -- node[above] {$I_3$} (i3); \draw[stateTransition] (i1) -- (h1); \draw[stateTransition] (i1) -- (h2); \draw[stateTransition] (i1) -- (h3); \draw[stateTransition] (i1) -- (h4); \draw[stateTransition] (i1) -- (h5); \draw[stateTransition] (i2) -- (h1); \draw[stateTransition] (i2) -- (h2); \draw[stateTransition] (i2) -- (h3); \draw[stateTransition] (i2) -- (h4); \draw[stateTransition] (i2) -- (h5); \draw[stateTransition] (i3) -- (h1); \draw[stateTransition] (i3) -- (h2); \draw[stateTransition] (i3) -- (h3); \draw[stateTransition] (i3) -- (h4); \draw[stateTransition] (i3) -- (h5); \draw[stateTransition] (h1) -- (o1); \draw[stateTransition] (h1) -- (o2); \draw[stateTransition] (h2) -- (o1); \draw[stateTransition] (h2) -- (o2); \draw[stateTransition] (h3) -- (o1); \draw[stateTransition] (h3) -- (o2); \draw[stateTransition] (h4) -- (o1); \draw[stateTransition] (h4) -- (o2); \draw[stateTransition] (h5) -- (o1); \draw[stateTransition] (h5) -- (o2); \node[above=of i1, align=center] (l1) {Input \\ layer}; \node[right=2.3em of l1, align=center] (l2) {Hidden \\ layer}; \node[right=2.3em of l2, align=center] (l3) {Output \\ layer}; \draw[stateTransition] (o1) -- node[above] {$O_1$} (11, 0.75); \draw[stateTransition] (o2) -- node[above] {$O_2$} (11, -0.75); \path[dashed, double, ultra thick, gray] (x.north) edge[bend left=0] (h5.north); \path[dashed, double, ultra thick, gray] (x.south) edge[bend right=0] (h5.south); \end{tikzpicture} \end{document}
\documentclass[crop,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \definecolor{olivegreen}{rgb}{0,0.6,0} \definecolor{mymauve}{rgb}{0.58,0,0.82} \definecolor{camdrk}{RGB}{0,62,114} \begin{document} \begin{tikzpicture} \node[rectangle, draw, thick, olivegreen, minimum width=5em, minimum height=5em] (R) at (0, 0) {}; \node[rectangle, inner sep=0.1em, olivegreen,dashed, draw, thick] (C) at (-0.1, 0.1) {$\clubsuit$}; \node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, above right=0.1em and 0.3em of C] (D) {$\diamondsuit$}; \node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, below right=0.8em and -0.5em of D] (H) {$\heartsuit$}; \node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, below left=0.6em and 0.4em of C] (S) {$\spadesuit$}; \node[olivegreen,below=0em of R] (l1) {\emph{input}}; \node[camdrk, rectangle, draw, above right=-2.5em and 5em of R, minimum width=7em, thick] (Oc) {$\vec{o}_\clubsuit$}; \node[camdrk, rectangle, draw, above=0em of Oc, minimum width=7em, thick] (Od) {$\vec{o}_\diamondsuit$}; \node[camdrk, rectangle, draw, below=0em of Oc, minimum width=7em, thick] (Oh) {$\vec{o}_\heartsuit$}; \node[camdrk, rectangle, draw, below=0em of Oh, minimum width=7em, thick] (Os) {$\vec{o}_\spadesuit$}; \node[camdrk, left=0em of Oc] (lc) {$\clubsuit$}; \node[camdrk, left=0em of Od] (ld) {$\diamondsuit$}; \node[camdrk, left=0em of Oh] (lh) {$\heartsuit$}; \node[camdrk, left=0em of Os] (ls) {$\spadesuit$}; \node[camdrk, below=0em of Os] (lr) {\emph{objects}}; \draw[olivegreen,-stealth, thick, dashed] (C) -- (lc); \draw[olivegreen,-stealth, thick, dashed] (D) -- (ld); \draw[olivegreen,-stealth, thick, dashed] (H) -- (lh); \draw[olivegreen,-stealth, thick, dashed] (S) -- (ls); \node[draw, camdrk, thick, right=18em of R] (A) {\texttt{"two"}}; \node[camdrk, below=0em of A] {\emph{output}}; \draw[camdrk, densely dashed, very thick] (Od.north east) -- (A.north west); \draw[camdrk, densely dashed, very thick] (Os.south east) -- (A.south west); \fill [opacity=0.2, camdrk] (Od.north east) -- (A.north west) -- (A.south west) -- (Os.south east) -- cycle; % let's get funky \node[right=14.75em of R, inner sep=0em] (dum1) {}; \node[right=1.5em of Oc, inner sep=0em] (dum2) {}; \node[right=1.5em of Oh, inner sep=0em] (dum3) {}; \draw[camdrk, densely dotted, very thick] (Od.east) edge[bend left=60] (Oc.east); \draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Od.east) (dum2) (Oh.east)}; \draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Od.east) (dum1) (Os.east)}; \draw[camdrk, densely dotted, very thick] (Oc.east) edge[bend left=60] (Oh.east); \draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Oc.east) (dum3) (Os.east)}; \draw[camdrk, densely dotted, very thick] (Oh.east) edge[bend left=60] (Os.east); \node[mymauve,rectangle, thick, align=center, draw, below left=3em and -4em of Os, text width=13.5em] (Q) {\texttt{"How many outlined objects are above the spade?"}}; \node[mymauve,below=0em of Q] (ql) {\emph{query}}; \path[mymauve,-stealth, dashed, thick] (Q.east) edge[bend right] (6.2, -0.7); \node[camdrk] at (6.7, 0) (RN){\textbf{\emph{RN}}}; \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \tikzstyle{stateTransition}=[-stealth, thick] \begin{document} \begin{tikzpicture} \node[rectangle, draw, minimum width=0.5cm,minimum height=2.5cm] (X) at (-2, 0) {$\vec{x}$}; \node[rectangle, draw, right=1.5em of X, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (W1) {${\bf W_1}\times$}; \node[rectangle, draw, right=1.5em of W1, text depth=0em, minimum width=0.5cm,minimum height=2.5cm] (B1) {$+ \vec{b}_1$}; \node[rectangle, draw, right=1.5em of B1, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (RL) { \begin{tikzpicture} \draw[thick] (0,0) -- (0.5, 0); \draw[thick] (0.49,-0.004) -- (0.99, 0.496); \end{tikzpicture} }; \node[rectangle, draw, right=1.5em of RL, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (W) {${\bf W_2}\times$}; \node[rectangle, draw, right=1.5em of W, text depth=0em, minimum width=0.5cm,minimum height=1.5cm] (B) {$+ \vec{b}_2$}; \node[right=1.5em of B, inner sep=0em] (out) { \begin{tikzpicture} \node[rectangle, draw, rotate=90, minimum height=0.5cm, minimum width=1.5cm] (out) {softmax}; \end{tikzpicture} }; \node[right=1.5em of out] (outt) {}; \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=\x em]X.east) -- ([yshift=\x em]W1.west); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=-\x em]X.east) -- ([yshift=-\x em]W1.west); \draw[-stealth, thick] (X) -- (W1); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=\x em]W1.east) -- ([yshift=\x em]B1.west); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=-\x em]W1.east) -- ([yshift=-\x em]B1.west); \draw[-stealth, thick] (W1) -- (B1); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=\x em]B1.east) -- ([yshift=\x em]RL.west); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=-\x em]B1.east) -- ([yshift=-\x em]RL.west); \draw[-stealth, thick] (B1) -- (RL); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=\x em]RL.east) -- ([yshift=\x em]W.west); \foreach \x in {1,...,3} \draw[stateTransition] ([yshift=-\x em]RL.east) -- ([yshift=-\x em]W.west); \draw[-stealth, thick] (RL) -- (W); \foreach \x in {-1.5, -0.5, 0.5, 1.5} \draw[stateTransition] ([yshift=\x em]W.east) -- ([yshift=\x em]B.west); \foreach \x in {-1.5, -0.5, 0.5, 1.5} \draw[stateTransition] ([yshift=\x em]B.east) -- ([yshift=\x em]out.west); \foreach \x in {-1.5, -0.5, 0.5, 1.5} \draw[stateTransition] ([yshift=\x em]out.east) -- ([yshift=\x em]outt.west); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{decorations.pathmorphing, positioning} \definecolor{echoreg}{HTML}{2cb1e1} \definecolor{echodrk}{HTML}{0099cc} \tikzstyle{mybox} = [text=black, very thick, rectangle, rounded corners, inner sep=10pt, inner ysep=20pt] \tikzstyle{fancytitle} =[text=black] \newcommand{\yslant}{0.5} \newcommand{\xslant}{-0.6} \newcommand\overmat[3]{% \makebox[0pt][l]{$\smash{\color{#3}\overbrace{\phantom{% \begin{matrix}#2\end{matrix}}}^{\text{#1}}}$}#2} \newcommand\undermat[3]{% \makebox[0pt][l]{$\smash{\color{#3}\underbrace{\phantom{% \begin{matrix}#2\end{matrix}}}_{\text{#1}}}$}#2} \newcommand\partialphantom{\vphantom{\frac{\partial e_{P,M}}{\partial w_{1,1}}}} \begin{document} \begin{tikzpicture}[scale=0.58,every node/.style={minimum size=1cm},on grid] \node [mybox, scale=1.0] at (10.5, 2) (box){% \begin{minipage}{0.6\textwidth} \[ {\mathbf M} = {\left[ \begin{matrix} \left[\overmat{\textcolor{red}Layer 1}{ \begin{matrix} 1 & 0 & 0\\ 1 & 0 & 1\\ 1 & 0 & 0\\ \end{matrix}}{red}\right] & \left[\overmat{1 $\rightarrow$ 2}{ \begin{matrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0\\ \end{matrix}}{gray}\right]\\ \left[\undermat{2 $\rightarrow$ 1}{ \begin{matrix} 0 & 0 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0\\ \end{matrix}}{gray}\right] & \left[\undermat{\textcolor{echodrk}Layer 2}{ \begin{matrix} 0 & 1 & 1\\ 1 & 0 & 0\\ 1 & 0 & 0\\ \end{matrix}}{echodrk}\right]\\ \end{matrix}\right]}\] \end{minipage} }; \node[fancytitle, scale=0.8] at (box.north) {\bf Tensor form:}; % Layer 2 \begin{scope}[ yshift=-120, every node/.append style={yslant=\yslant,xslant=\xslant}, yslant=\yslant,xslant=\xslant ] \draw[black, dashed, thin] (0,0) rectangle (7,7); \draw[fill=echoreg] (5,2) node(111){} circle (.1) (2,2) circle (.1) (3.5,5) circle (.1); \draw[-latex, thin, color=echodrk] (3.55,4.85) to (4.85,2.05); \draw[-latex, thin, color=echodrk] (4.95,2.15) to (3.65,4.95); \draw[-latex, thin, color=echodrk] (2.15,1.92) to (4.85,1.92); \draw[-latex, thin, color=echodrk] (4.85,2.05) to (2.15,2.05); \fill[black] (0.5,6.5) node[right, scale=.7] {Layer 2} (5.1,1.9) node[right,scale=.7]{\bf A} (1.9,1.9) node[left,scale=.7]{\bf B} (3.5,5.1) node[above,scale=.7]{\bf C}; \end{scope} % Interlayer crossconnections \draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (3.8, 4) to (3.8, -0.32); \draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (.8,2.4) to (.8,-1.8); \draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (.8, -1.8) to (3.81, 4); % Layer 1 \begin{scope}[ yshift=0, every node/.append style={yslant=\yslant,xslant=\xslant}, yslant=\yslant,xslant=\xslant ] \fill[white,fill opacity=.75] (0,0) rectangle (7,7); \draw[black, dashed, thin] (0,0) rectangle (7,7); \draw [fill=red] (5,2) node(111){} circle (.1) (2,2) circle (.1) (3.5,5) circle (.1); \draw[-latex, thin, color=red] (3.6,4.9) to (4.9,2.1); \draw[-latex, thin, color=red] (2.15,2) to (4.85,2); \draw[-latex, thin, color=red] (2.1,2.1) to (3.4,4.9); \draw[-latex, thin, color=red] (5.1,2.15) to[bend left=90] (6.3, 2) to[bend left=70] (5.1, 1.85); \fill[black] (0.5,6.5) node[right, scale=.7] {Layer 1} (5.1,1.9) node[right,scale=.7]{\bf A} (1.9,1.9) node[left,scale=.7]{\bf B} (3.5,5.1) node[above,scale=.7]{\bf C}; \end{scope} \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning, shapes} \begin{document} \begin{tikzpicture} \node (1) [draw, minimum width=15em, minimum height=2em, very thick, rounded rectangle] {}; \node (l1) [left=0em of 1] {$\vec{x}$}; \node (2) [above=3.9em of 1, draw, fill=lightgray, minimum width=9em,very thick, minimum height=2em, rounded rectangle] {}; \node (l2) [left=0em of 2] {$\vec{h}_1$}; \node (3) [above=3.9em of 2, draw, fill=lightgray, minimum width=9em,very thick, minimum height=2em, rounded rectangle] {}; \node (l3) [left=0em of 3] {$\vec{h}_2$}; \node[circle, draw, thick] (A1) {}; \node[circle, draw, thick, right=0.5em of A1] (A2) {}; \node[circle, draw, thick, right=0.5em of A2] (A3) {}; \node[circle, draw, thick, right=0.5em of A3] (A4) {}; \node[circle, draw, thick, right=0.5em of A4] (A5) {}; \node[circle, draw, thick, left=0.5em of A1] (A6) {}; \node[circle, draw, thick, left=0.5em of A6] (A7) {}; \node[circle, draw, thick, left=0.5em of A7] (A8) {}; \node[circle, draw, thick, left=0.5em of A8] (A9) {}; \node[circle, draw, fill=white, thick, above=5em of A1] (B1) {}; \node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {}; \node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {}; \node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {}; \node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {}; \node[circle, draw, fill=white, thick, above=5em of A1] (B1) {}; \node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {}; \node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {}; \node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {}; \node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {}; \node[circle, draw, fill=white, thick, above=5em of A1] (B1) {}; \node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {}; \node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {}; \node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {}; \node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {}; \node[circle, draw, fill=white, thick, above=5em of B1] (C1) {}; \node[circle, draw, fill=white, thick, right=0.5em of C1] (C2) {}; \node[circle, draw, fill=white, thick, right=0.5em of C2] (C3) {}; \node[circle, draw, fill=white, thick, left=0.5em of C1] (C4) {}; \node[circle, draw, fill=white, thick, left=0.5em of C4] (C5) {}; \foreach \x in {1,...,9} \foreach \y in {1,...,5} \draw[-stealth, thick] (A\x) -- (B\y); \foreach \x in {1,...,5} \foreach \y in {1,...,5} \draw[stealth-stealth, thick] (B\x) -- (C\y); \draw[-stealth, thick] (A5) -- node[right] {${\bf W}_1$} (B3); \draw[stealth-stealth, thick] (B3) -- node[right] {${\bf W}_2$} (C3); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{amsmath} \usepackage{amssymb} \usetikzlibrary{positioning, decorations.pathmorphing, shapes} \begin{document} \begin{tikzpicture} \node[rounded rectangle, draw, thick, align=center] (A1) {Agent 1\\$(\theta_1', \psi_1')$}; \node[rounded rectangle, draw, thick, right= of A1, align=center] (A2) {Agent 2\\$(\theta_2', \psi_2')$}; \node[rounded rectangle, draw, thick, right= of A2, align=center] (A3) {Agent 3\\$(\theta_3', \psi_3')$}; \node[right=0.4em of A3, align=center] (mid) {\dots}; \node[rounded rectangle, draw, thick, right= of A3, align=center] (AN) {Agent $n$\\$(\theta_n', \psi_n')$}; \node[rounded rectangle, draw, thick, yshift=8em, xshift=11.9em, align=center] (G) {Global state\\$(\theta, \psi)$}; \node[rounded rectangle, draw, thick, below= of A1, align=center] (E1) {Env. 1\\$(\mathcal{T}, \mathcal{R})$}; \node[rounded rectangle, draw, thick, below= of A2, align=center] (E2) {Env. 2\\$(\mathcal{T}, \mathcal{R})$}; \node[rounded rectangle, draw, thick, below= of A3, align=center] (E3) {Env. 3\\$(\mathcal{T}, \mathcal{R})$}; \node[rounded rectangle, draw, thick, below= of AN, align=center] (EN) {Env. $n$\\$(\mathcal{T}, \mathcal{R})$}; \draw[-stealth, very thick] (G) -- node[above=0.5em] {copy} (A1); \foreach \x in {2,3,N} \draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] ([xshift=-0.5em]A\x.south) -- node[left] {$a_t$} ([xshift=-0.5em]E\x.north); \foreach \x in {2,3,N} \draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] ([xshift=0.5em]E\x.north) -- node[right] {$r_t, s_{t+1}$} ([xshift=0.5em]A\x.south); \draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] (E1.north) -- node[right] {$s_0$} (A1.south); \node[rectangle split, minimum height=0.7cm, rectangle split horizontal, rectangle split parts=8, draw, anchor=center, left=2em of G, rectangle split part fill={white,white,white,white,white,white,white,gray}] (q1) {}; \node[above=0.1em of q1] (N) {Queue}; \draw[-stealth, very thick] (A1) -- node[left] {$(\Delta\theta, \Delta\psi)$} (q1); \draw[-stealth, very thick] (q1) -- node[above, xshift=-1em] {$+$} ([xshift=2.3em,yshift=-0.5em]G.west); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{automata, positioning} \begin{document} \begin{tikzpicture}[-stealth,very thick,node distance = 4cm,auto] \node[state] (x) {$x$}; \node[state] (y) [above right of=x] {$y$}; \node[state] (z) [below right of=y] {$z$}; \node[rectangle, minimum size=2em,draw] (a) [above left =of y] {$a$}; \node[rectangle,minimum size=2em, draw] (b) [above = of y] {$b$}; \node[rectangle, minimum size=2em,draw] (c) [above right =of y] {$c$}; \draw[] (x) to node[above left] {$1$} (y); \draw[loop above] (y) to node {$0.5$} (y); \draw[bend left=20] (y) to node {$0.5$} (z); \draw[bend left=20] (z) to node[below left] {$0.7$} (y); \draw[] (z) to node {$0.3$} (x); \draw[dashed] (x) to node[left] {$0.9$} (a); \draw[dashed] (x) to node[left] {$0.1$} (b); \draw[bend right=30, dashed] (y) to node[right] {$0.6$} (b); \draw[dashed] (y) to node[below right] {$0.4$} (c); \draw[dashed] (z) to node[right] {$1$} (c); \node[rectangle, draw, scale=0.2, minimum size=20em,above = 2cm of a] (ga){\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, draw, scale=0.2, minimum size=20em,above = 2cm of b] (gb){\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, draw, scale=0.2, minimum size=20em,above = 2cm of c] (gc){\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[dotted, bend left] (a) to node[left] {$\mu_a$} (ga); \draw[dotted, bend right] (a) to node[right] {$\sigma_a$} (ga); \draw[dotted, bend left] (b) to node[left] {$\mu_b$} (gb); \draw[dotted, bend right] (b) to node[right] {$\sigma_b$} (gb); \draw[dotted, bend left] (c) to node[left] {$\mu_c$} (gc); \draw[dotted, bend right] (c) to node[right] {$\sigma_c$} (gc); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node (X1) {$\vec{e}_{1}$}; \node[rectangle, right= 0.5em of X1] (x_dots_1) {$\dots$}; \node[right=0.5em of x_dots_1] (Xj) {$\vec{e}_{j}$}; \node[rectangle, right= 1em of Xj] (x_dots_2) {$\dots$}; \node[right=1em of x_dots_2] (Xn) {$\vec{e}_{n}$}; \node[rectangle, draw, ultra thick, above=of X1] (attn1) {\large $a_\phi$}; \node[rectangle, draw, ultra thick, above=of Xj] (attnj) {\large $a_\phi$}; \node[rectangle, draw, ultra thick, above=of Xn] (attnn) {\large $a_\phi$}; \draw[-stealth, thick] (X1) -- (attn1); \draw[-stealth, thick] (Xj) -- (attn1); \draw[-stealth, thick] (Xj) -- (attnj); \draw[-stealth, thick] ([xshift=3em]Xj) -- (attnj); \draw[-stealth, thick] (Xj) -- (attnn); \draw[-stealth, thick] (Xn) -- (attnn); \node[above= of attn1, opacity=0.2] (alpha1j) {$\alpha_{1,j}$}; \node[above= of attnj, opacity=1] (alphajj) {$\alpha_{j,j}$}; \node[above= of attnn, opacity=0.6] (alphanj) {$\alpha_{n,j}$}; \node[circle, draw, above=of alpha1j] (times1) {$\times$}; \node[circle, draw, above=of alphajj] (timesj) {$\times$}; \node[circle, draw, above=of alphanj] (timesn) {$\times$}; \node[rectangle, draw, above=of timesj] (sum) {$\Sigma$}; \node[above=1em of sum] (x_tprim) {$\vec{e}_j'$}; \draw[-stealth, line width=1.5mm, white] (attn1) -- (alpha1j); \draw[-stealth, thick, opacity=0.2] (attn1) -- (alpha1j); \draw[-stealth, line width=1.5mm, white] (attnj) -- (alphajj); \draw[-stealth, thick, opacity=1] (attnj) -- (alphajj); \draw[-stealth, line width=1.5mm, white] (attnn) -- (alphanj); \draw[-stealth, thick, opacity=0.6] (attnn) -- (alphanj); \draw[-stealth, white, line width=1.5mm] (X1) edge[bend right=30] (times1); \draw[-stealth, thick] (X1) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times1); \draw[-stealth, white, line width=1.5mm] (Xj) edge[bend right=30] (timesj); \draw[-stealth, thick] (Xj) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (timesj); \draw[-stealth, thick] (Xn) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (timesn); \draw[-, line width=1.5mm, white] (times1) -- (sum); \draw[-stealth, thick] (times1) -- (sum); \draw[-, line width=1.5mm, white] (timesj) -- (sum); \draw[-stealth, thick] (timesj) -- (sum); \draw[-stealth, thick] (timesn) -- (sum); \draw[-stealth, thick] (times1) -- (sum); \draw[-stealth, line width=1.5mm, white] (alpha1j) -- (times1); \draw[-stealth, thick, opacity=0.2] (alpha1j) -- (times1); \draw[-stealth, line width=1.5mm, white] (alphajj) -- (timesj); \draw[-stealth, thick, opacity=1] (alphajj) -- (timesj); \draw[-stealth, line width=1.5mm, white] (alphanj) -- (timesn); \draw[-stealth, thick, opacity=0.6] (alphanj) -- (timesn); \draw[-stealth, thick] (sum) -- (x_tprim); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,decorations.pathmorphing} \begin{document} \begin{tikzpicture} \node[circle, thick, draw] (0) {$\vec{x}_i$}; \node[circle, thick, draw, above right=0.1em and 3em of 0] (1) {}; \node[circle, thick, draw, above right=0.8em and 0.5em of 0] (2) {}; \node[circle, thick, draw, left=of 0] (3) {}; \node[circle, thick, draw, below left=0.8em and 1.5em of 0] (4) {}; \draw[-, thick] (0) -- (1); \draw[-, thick] (0) -- (2); \draw[-, thick] (0) -- (3); \draw[-, thick] (4) -- (3); \node[circle, thick, draw, below=3em of 0] (01) {$\vec{\widetilde{x}}_j$}; \node[circle, thick, draw, above right=0.1em and 2em of 01] (02) {}; \node[circle, thick, draw, below left=0.2em and 3em of 01] (03) {}; \node[circle, thick, draw, below right=0.8em and 0.5em of 01] (04) {}; \node[circle, thick, draw, below right=0.8em and 3.3em of 01] (05) {}; \node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em] (RR) {}; \node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em, below=0.05em of RR] (RR2) {}; \node[above=0em of RR] (l1) {$({\bf X}, {\bf A})$}; \node[below=0em of RR2] (l2) {$({\bf \widetilde{X}}, {\bf \widetilde{A}})$}; \draw[-, thick] (01) -- (02); \draw[-, thick] (01) -- (03); \draw[-, thick] (01) -- (04); \draw[-, thick] (01) -- (05); \draw[-, thick] (04) -- (05); \node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em, right=12.5em of 0] (AA) {}; \node[circle, thick, draw, right=17em of 0] (0) {$\vec{h}_i$}; \node[circle, thick, draw, above right=0.1em and 3em of 0] (1) {}; \node[circle, thick, draw, above right= 0.8em and 0.5em of 0] (2) {}; \node[circle, thick, draw, left=of 0] (3) {}; \node[circle, thick, draw, below left=0.8em and 1.5em of 0] (4) {}; \draw[-, thick] (0) -- (1); \draw[-, thick] (0) -- (2); \draw[-, thick] (0) -- (3); \draw[-, thick] (4) -- (3); \node[circle, thick, draw, below=2.7em of 0] (01) {$\vec{\widetilde{h}}_j$}; \node[circle, thick, draw, above right=0.1em and 2emof 01] (02) {}; \node[circle, thick, draw, below left=0.2em and 3em of 01] (03) {}; \node[circle, thick, draw, below right=0.8em and 0.3em of 01] (04) {}; \node[circle, thick, draw, below right=0.8em and 3.1em of 01] (05) {}; \node[rectangle, draw, minimum width=11em, minimum height=5.5em, dashed, below=0.05em of AA] (AA2) {}; \node[above=0em of AA] (l1) {$({\bf H}, {\bf A})$}; \node[below=0em of AA2] (l2) {$({\bf \widetilde{H}}, {\bf \widetilde{A}})$}; \draw[-, thick] (01) -- (02); \draw[-, thick] (01) -- (03); \draw[-, thick] (01) -- (04); \draw[-, thick] (01) -- (05); \draw[-, thick] (04) -- (05); \draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (RR) -- node[above] {$\mathcal{E}$} (AA); \draw[very thick] (RR.west) edge[bend right=75, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,-stealth] node[left] (CC) {$\mathcal{C}$} (RR2.west); \draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (RR2) -- node[above] {$\mathcal{E}$} (AA2); \node[right=36em of CC, rectangle, draw, thick] (Re) {$\vec{s}$}; \draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (AA) -- node[above] {$\mathcal{R}$} (Re); \node[above=1.5em of Re] (D1) {$\mathcal{D}$}; \node[below=1.5em of Re] (D2) {$\mathcal{D}$}; \draw[-stealth, thick] (Re) -- (D1); \draw[-stealth, thick] (Re) -- (D2); \draw[-stealth, thick] (0) -- (D1); \draw[-stealth, thick] (01.-11) -- (D2); \node[right=of D1] (P) {$+$}; \node[right=of D2] (M) {$-$}; \draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (D1) -- (P); \draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (D2) -- (M); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning, matrix} \tikzset{ tablet/.style={ matrix of nodes, row sep=-\pgflinewidth, column sep=-\pgflinewidth, nodes={rectangle,draw=black,text width=1.25ex,align=center}, text height=1.25ex, nodes in empty cells }, texto/.style={font=\footnotesize\sffamily}, title/.style={font=\small\sffamily} } \definecolor{dgry}{HTML}{555555} \definecolor{lgry}{HTML}{aaaaaa} \begin{document} \begin{tikzpicture} \matrix[tablet] (mp) { {\tt 0} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 1} & {\tt 0}\\ \node (00){\tt 1}; & \node(01){\tt 0}; & \node(02){\tt 0}; & \node(03){\tt 0}; & \node(04){\tt 1}; & \node(05){\tt 0}; & \node(06){\tt 1}; & \node(07){\tt 1};\\ }; \matrix[tablet, below = of mp] (pt) { \node (10){\tt 2}; & \node(11){\tt 1}; & \node(12){\tt 0}; & \node(13){\tt 0}; & \node(14){\tt 3}; & \node(15){\tt 1}; & \node(16){\tt 3}; & \node(17){\tt 2};\\ }; \matrix[tablet, draw=black, inner sep=0ex, nodes={draw=white,inner sep=0.8ex}, below = of pt] (clr) { |[fill=dgry]| & |[fill=lgry]| & |[fill=white]| & |[fill=white]| & |[fill=black]| & |[fill=lgry]| & |[fill=black]| & |[fill=dgry]|\\ }; \node [align=center, right = 0.05cm of mp] (c1) {Byte 1 \\ Byte 2}; \node [align=center, right = 0.05cm of pt] (c2) {Colour indices}; \node [align=center, right = 0.05cm of clr] (c3) {Tile row}; \draw [-stealth, thick] (00) -- (10) ; \draw [-stealth, thick] (01) -- (11) ; \draw [-stealth, thick] (02) -- (12) ; \draw [-stealth, thick] (03) -- (13) ; \draw [-stealth, thick] (04) -- (14) ; \draw [-stealth, thick] (05) -- (15) ; \draw [-stealth, thick] (06) -- (16) ; \draw [-stealth, thick] (07) -- (17) ; \draw [-stealth, double, thick] (13.south east) -- node[right] {\emph{palette}} (clr); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \draw[ultra thick, lightgray, dashed] (5.5, 2) -- (5.5, -2); \node[circle,inner sep=0.3em,fill=red,very thick] (X) at (4.5, 0.5) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.7, 0.1) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.2, 0.1) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.1, -0.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.6, -0.33) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.4, -0.7) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.8, -0.9) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.9, -1.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.4, -1.2) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.9, -1.1) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.4, -1.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.45, -1.7) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.8, -1.5) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.2, -1.4) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.3, -1.0) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.6, -1.3) {}; \node[circle,inner sep=0.3em,fill=blue,very thick] (Y) at (6.5, 0.5) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.1, 0.8) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.7, 0.9) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.8, 1.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.4, 1.15) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5, 1.2) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.8, 1.5) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.3, 1.6) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.2, 1.2) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.8, 1.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.4, 1.3) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.4, 0.8) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.1, 1.1) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.75, 0.7) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.45, 0.1) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.35, 0.45) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (1.9, -0.04) {}; \node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (1.85, -0.5) {}; \draw[ultra thick, black, dashed](1.5,-1) cos (3,0) sin (4.5,1) cos (6,0) sin (7.5,-1) cos (9,0); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node[rectangle, draw, minimum width=2.2cm, minimum height=1cm] (FT) {\emph{new fts.}}; \node[rectangle, above =0em of FT, draw, minimum width=2.2cm] (IG) {\emph{input gate}}; \node[rectangle, above=0em of IG, draw, minimum width=2.2cm] (FG) {\emph{forget gate}}; \node[rectangle, below=0em of FT, draw, minimum width=2.2cm] (OG) {\emph{output gate}}; \node[left=of IG] (X) {$\vec{x}_t$}; \node[left=of FT] (Y) {$\vec{y}_{t-1}$}; \draw[-stealth, thick] (X.east) -- ([yshift=0.5em]FT.west); \draw[-stealth, thick] (X.east) -- ([yshift=0.25em]IG.west); \draw[-stealth, thick] (X.east) -- ([yshift=0.25em]FG.west); \draw[-stealth, thick] (X.east) -- ([yshift=0.25em]OG.west); \draw[-stealth, thick] (Y.east) -- ([yshift=-0.5em]FT.west); \draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]IG.west); \draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]FG.west); \draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]OG.west); \node[circle, draw, right=of FT] (t1) {$\times$}; \node[circle, draw, right=of t1] (pl) {$+$}; \node[rectangle, draw, right=of pl] (th) {$\sigma$}; \node[circle, draw, right=of th] (t2) {$\times$}; \node[right=of t2] (Y1) {$\vec{y}_t$}; \node[circle, draw, above=of pl] (t3) {$\times$}; \node[rectangle, thick, draw, above=of t3, minimum width=1.5cm, minimum height=1.5cm] (M) {$M$}; \draw[-stealth, thick] (FT) -- (t1); \draw[-stealth, thick] (t1) -- (pl); \draw[-stealth, thick] (pl) -- (th); \draw[-stealth, thick] (th) -- (t2); \draw[-stealth, thick] (t2) -- (Y1); \draw[-stealth, thick] (M) -- node[left] {$\vec{c}_{t-1}$} (t3); \draw[-stealth, thick] (t3) -- (pl); \path[-stealth, thick] (IG.east) edge[bend left] (t1); \draw[thick] (OG.east) -- ([xshift=10em]OG.east); \path[-stealth, thick] (OG.east) -- ([xshift=10em]OG.east) edge[bend right=15] (t2); \path[-stealth, thick] (FG.east) edge[bend left=10] (t3); \path[-stealth, thick] (pl.east) edge[bend right=60] node[right] {$\vec{c}_t$} (M.east); \draw[-stealth, very thick, dashed, gray] (-1.5, -1.5) rectangle (8.4, 4.8); \node[] (tttxt) at (-0.8, 4.5) {\large \bf LSTM}; \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} \node[rectangle, minimum width=5em, minimum height=5em, fill=lightgray!20] (X) {}; \node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=-1.5em, yshift=-1.5em] at (X) (AA) {}; \node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (X) (LA) {$\boldsymbol\pounds\boldsymbol\pounds$}; \node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (X) (K) {}; \node[rectangle, right=5em of X, minimum width=5em, minimum height=5em, fill=lightgray!20] (Y) {}; \node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=-1.5em, yshift=1.5em] at (Y) (BB) {}; \node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (Y) (LB) {$\boldsymbol\pounds\boldsymbol\pounds$}; \node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (Y) (W) {}; \node[rectangle, right=5em of Y, minimum width=5em, minimum height=5em, fill=lightgray!20] (Z) {}; \node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em] at (Z) (CC) {}; \node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (Z) (LC) {$\boldsymbol\pounds\boldsymbol\pounds$}; \node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (Z) (AS) {}; \node[below=0.5em of X] (l1) {$s_0$}; \node[below=0.5em of Y] (l2) {$s_1$}; \node[below=0.5em of Z] (l3) {$s_2$}; \node[above=4em of X] (P1) {$[0.12, {\bf 0.64}, 0.07, 0.17]$}; \node[above=4em of Y] (P2) {$[0.03, 0.24, {\bf 0.47}, 0.26]$}; \node[above=4em of Z] (P3) {$[{\bf 0.82}, 0.04, 0.08, 0.06]$}; \draw[-stealth, ultra thick] (X) -- node[left] {$\pi_\theta(s_0)$} (P1); \draw[-stealth, ultra thick] (Y) -- node[left] {$\pi_\theta(s_1)$} (P2); \draw[-stealth, ultra thick] (Z) -- node[left] {$\pi_\theta(s_2)$} (P3); \node[above=2em of P1] (A1) {up}; \node[above=2em of P2] (A2) {right}; \node[above=2em of P3] (A3) {pick up}; \draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=-1em]P1.north) -- (A1); \draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=1em]P2.north) -- (A2); \draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=-3em]P3.north) -- (A3); \node[above=2em of A1] (R1) {$r_0 = 0$}; \node[above=2em of A2] (R2) {$r_1 = 0$}; \node[above=2em of A3] (R3) {$r_2 = 2$}; \draw[-stealth, very thick] (A1) -- node[left] {$\mathcal{R}(s_0, \uparrow)$} (R1); \draw[-stealth, very thick] (A2) -- node[left] {$\mathcal{R}(s_1, \rightarrow)$} (R2); \draw[-stealth, very thick] (A3) -- node[left] {$\mathcal{R}(s_2, \star)$} (R3); \node[xshift=-2.5em, yshift=-0.5em] at (Y.west) {$\mathcal{T}(s_0, \uparrow)$} (R1); \node[xshift=-2.5em, yshift=-0.5em] at (Z.west) {$\mathcal{T}(s_1, \rightarrow)$} (R2); \draw [-stealth, very thick] plot [smooth, tension=1] coordinates { (A1.east) ([xshift=3.75em,yshift=-2em]A1.east) ([xshift=-2.5em,yshift=2em]Y.west) (Y.west)}; \draw [-stealth, very thick] plot [smooth, tension=1] coordinates { (A2.east) ([xshift=3.25em,yshift=-2em]A2.east) ([xshift=-2.5em,yshift=2em]Z.west) (Z.west)}; \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \definecolor{bluport}{HTML}{21ADFD} \definecolor{orgport}{HTML}{E37322} \definecolor{pplport}{HTML}{4F21E9} \definecolor{redport}{HTML}{701315} \begin{document} \begin{tikzpicture} \draw[thick, bluport] (0, 0) ellipse (2 and 1); \draw[ultra thick, bluport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (0, 0) ellipse (2 and 1); \node[text height=1em, text depth=1em] (1) at (0, 1.5) {\tt git init}; \node[text height=1em, text depth=1em, align=center, bluport] (1) at (0, -0.25) {\tt ./git \\ repository}; \draw[thick, orgport] (6, 0) ellipse (2 and 1); \draw[ultra thick, orgport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (6, 0) ellipse (2 and 1); \node[text height=1em, text depth=1em] (1) at (6, 1.5) {\tt git clone}; \node[text height=1em, text depth=1em, align=center, orgport] (1) at (6, -0.25) {\tt ./git \\ repository}; \draw[ultra thick, redport] (-1.75, -2) rectangle (1.75, -3.5); \node[text height=1em, text depth=1em, align=center, redport] (1) at (0, -3.25) {working directory \\ \& index of user 1}; \draw[ultra thick, pplport] (4.25, -2) rectangle (7.75, -3.5); \node[text height=1em, text depth=1em, align=center, pplport] (1) at (6, -3.25) {working directory \\ \& index of user 2}; \draw[very thick, stealth-stealth] (1.5, 0) -- node[above] {\tt git pull} node[below] {\tt git push} (4.5, 0); \draw[very thick, -stealth] (-0.2, -0.5) -- node[left] {\tt git pull} (-0.2, -2.4); \draw[very thick, -stealth] (0.2, -2.4) -- node[right] {\tt git commit} (0.2, -0.5); \draw[very thick, -stealth] (5.8, -0.5) -- node[left] {\tt git pull} (5.8, -2.4); \draw[very thick, -stealth] (6.2, -2.4) -- node[right] {\tt git commit} (6.2, -0.5); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \definecolor{echodrk}{HTML}{0099cc} \definecolor{olivegreen}{rgb}{0,0.6,0} \definecolor{camdrk}{RGB}{0,62,114} \begin{document} \begin{tikzpicture} \node[circle, gray, draw, very thick] (1) {$\vec{h}^\ell_1$}; \node[circle, echodrk, draw, below right=2em and 3em of 1, very thick] (2) {$\vec{h}^\ell_2$}; \node[circle, draw, echodrk, above right=3em and 4em of 1, very thick] (3) {$\vec{h}^\ell_3$}; \node[circle, draw, olivegreen, right=7em of 1, ultra thick] (4) {$\vec{h}^{\ell+1}_4$}; \node[circle, echodrk, draw, above right=3.5em and 4em of 4, very thick] (5) {$\vec{h}^\ell_5$}; \node[circle, echodrk, draw, below right=3em and 3em of 4, very thick] (6) {$\vec{h}^\ell_6$}; \draw[gray, very thick] (1) -- (2); \draw[gray, very thick] (2) -- (3); \draw[red, ultra thick, -stealth] (2) -- node[below, xshift=0.9em] (ll) {$\vec{h}_{2\rightarrow 4}^\ell$} (4); \draw[red, ultra thick, -stealth] (3) -- node[above,xshift=1em, inner sep=0em] (l1) {$\vec{h}_{3\rightarrow 4}^\ell$} (4); \draw[red,ultra thick, -stealth] (5) -- node[right, yshift=-0.5em] (lr) {$\vec{h}_{5\rightarrow 4}^\ell$} (4); \draw[red,ultra thick, -stealth] (6) -- node[right, xshift=0.1em] (lw) {$\vec{h}_{6\rightarrow 4}^\ell$} (4); \node[right=5.5em of 6, echodrk] (31) {$\vec{h}^\ell_3$}; \node[right=1em of 31, echodrk] (41) {$\vec{h}^\ell_4$}; \node[rectangle, draw, camdrk, very thick, above right=3em and -0.5em of 31] (F) {$f_e^\ell$}; \node[above=3em of F, red] (34) {$\vec{h}^\ell_{3\rightarrow 4}$}; \draw[very thick, camdrk, -stealth] (31) -- (F); \draw[very thick, camdrk, -stealth] (41) -- (F); \draw[very thick, camdrk, -stealth] (F) -- (34); \draw[very thick, -stealth, dashed, echodrk] (3) edge[bend left=30] (31); \draw[very thick, -stealth, dashed, echodrk] (4) edge[bend right=65] (41); \draw[very thick, -stealth, dashed, red] (34) edge[bend right=40] (l1); \node[right= of 4, camdrk, rectangle, draw, very thick] (G) {$f_v^\ell$}; \node[right=4 em of G, olivegreen] (l11) {$\vec{h}^{\ell+1}_4$}; \draw[-stealth, camdrk, very thick] (4) -- (G); \draw[-stealth, camdrk, very thick] (G) -- (l11); \draw[very thick, -stealth, dashed, olivegreen] (l11) edge[bend left=25] (4); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node[rectangle] (Y0) at (0, 0) {$\dots$}; \node[rectangle, draw, right=2em of Y0, minimum height=1cm, minimum width=1cm] (RNN) {LSTM$_\rightarrow$}; \node[rectangle, right=of RNN, draw, minimum height=1cm, minimum width=1cm] (RNN2) {LSTM$_\rightarrow$}; \node[rectangle, right=of RNN2, draw, minimum height=1cm, minimum width=1cm] (RNN3) {LSTM$_\rightarrow$}; \node[rectangle, right= of RNN3, draw, minimum height=1cm, minimum width=1cm] (RNN4) {LSTM$_\rightarrow$}; \node[rectangle, right=2em of RNN4] (RNN5) {$\dots$}; \node[rectangle, above=of RNN4, draw, minimum height=1cm, minimum width=1cm] (R25) {LSTM$_\leftarrow$}; \node[rectangle, left=of R25, minimum height=1cm, minimum width=1cm, draw] (R24) {LSTM$_\leftarrow$}; \node[rectangle, left=of R24, draw, minimum height=1cm, minimum width=1cm] (R23) {LSTM$_\leftarrow$}; \node[rectangle, left=of R23, draw, minimum height=1cm, minimum width=1cm] (R22) {LSTM$_\leftarrow$}; \node[rectangle, left=2em of R22] (R21) {$\dots$}; \node[right=2em of R25] (Y20) {$\dots$}; \node[below=of RNN] (X1) {$\vec{x}_2$}; \node[below=of RNN2] (X2) {$\vec{x}_3$}; \node[below=of RNN3] (X3) {$\vec{x}_4$}; \node[below=of RNN4] (X4) {$\vec{x}_5$}; \node[above=of R25] (Y5) {$\vec{h}_5$}; \node[above=of R24] (Y4) {$\vec{h}_4$}; \node[above=of R23] (Y3) {$\vec{h}_3$}; \node[above=of R22] (Y2) {$\vec{h}_2$}; \draw[-stealth, thick] (X1) -- (RNN); \draw[-stealth, thick] (X2) -- (RNN2); \draw[-stealth, thick] (X3) -- (RNN3); \draw[-stealth, thick] (X4) -- (RNN4); \draw[-stealth, thick, densely dotted] (Y0) -- (RNN); \draw[-stealth, thick] (RNN) -- node[above, pos=0.35] {$\vec{h}_2^\rightarrow$} (RNN2); \draw[-stealth, thick] (RNN2) -- node[above, pos=0.35] {$\vec{h}_3^\rightarrow$} (RNN3); \draw[-stealth, thick] (RNN3) -- node[above, pos=0.35] {$\vec{h}_4^\rightarrow$} (RNN4); \draw[-stealth, densely dotted, thick] (RNN4) -- (RNN5); \node[below=4em of Y0] (d) {\dots}; \node[below=4em of RNN5] (d) {\dots}; \path[-stealth, ultra thick, white] (X1) edge[bend left=45] (R22); \path[-stealth, thick] (X1) edge[bend left=45] (R22); \path[-stealth, ultra thick, white] (X2) edge[bend left=45] (R23); \path[-stealth, thick] (X2) edge[bend left=45] (R23); \path[-stealth, ultra thick, white] (X3) edge[bend left=45] (R24); \path[-stealth, thick] (X3) edge[bend left=45] (R24); \path[-stealth, ultra thick, white] (X4) edge[bend left=45] (R25); \path[-stealth, thick] (X4) edge[bend left=45] (R25); \draw[-stealth, densely dotted, thick] (Y20) -- (R25); \draw[-stealth, thick] (R22) -- (Y2); \draw[-stealth, thick] (R23) -- (Y3); \draw[-stealth, thick] (R24) -- (Y4); \draw[-stealth, thick] (R25) -- (Y5); \draw[stealth-, densely dotted, thick] (R21) -- (R22); \draw[stealth-, thick] (R22) -- node[above, pos=0.65] {$\vec{h}_3^\leftarrow$} (R23); \draw[stealth-, thick] (R23) -- node[above, pos=0.65] {$\vec{h}_4^\leftarrow$} (R24); \draw[stealth-, thick] (R24) -- node[above, pos=0.65] {$\vec{h}_5^\leftarrow$} (R25); \draw[-stealth, densely dotted, thick] (Y20) -- (R25); \path[-stealth, ultra thick, white] (RNN) edge[bend right=45] (Y2); \path[-stealth, thick] (RNN) edge[bend right=45] (Y2); \path[-stealth, ultra thick, white] (RNN2) edge[bend right=45] (Y3); \path[-stealth, thick] (RNN2) edge[bend right=45] (Y3); \path[-stealth, ultra thick, white] (RNN3) edge[bend right=45] (Y4); \path[-stealth, thick] (RNN3) edge[bend right=45] (Y4); \path[-stealth, ultra thick, white] (RNN4) edge[bend right=45] (Y5); \path[-stealth, thick] (RNN4) edge[bend right=45] (Y5); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance=4cm, auto] \node (00) {}; \node [right of=00] (l1) {Line 1}; \node [right of=l1] (01) {}; \draw[-stealth, very thick] (00) -- (l1) -- (01); \node [below =1cm of 00] (10) {}; \node [right of=10] (l2) {Line 2}; \node [right of=l2] (11) {}; \draw[-stealth, very thick] (10) -- (l2) -- (11); \node [below =1cm of 10] (20) {}; \node [right of=20] (l3) {Line 3}; \node [right of=l3] (21) {}; \draw[-stealth, very thick] (20) -- (l3) -- (21); \node [below =1cm of 20] (30) {}; \node [right of=30] (l4) {}; \node [right of=l4] (31) {}; \node [below =1cm of 30] (1430) {}; \node [right of=1430] (l143) {Line 143}; \node [right of=l143] (1431) {}; \draw[-stealth, very thick] (1430) -- (l143) -- (1431); \node [below =1cm of 1430] (1440) {}; \node [right of=1440] (l144) {Line 144}; \node [right of=l144] (1441) {}; \draw[-stealth, very thick] (1440) -- (l144) -- (1441); \node [below=0.1cm of l1] (h1) {\textcolor{blue}{HBlank}}; \draw [thick, blue] (01) [bend left] to (h1); \draw [-stealth, thick, blue] (h1) [bend right] to (10); \node [below=0.1cm of l2] (h2) {\textcolor{blue}{HBlank}}; \draw [thick, blue] (11) [bend left] to (h2); \draw [-stealth, thick, blue] (h2) [bend right] to (20); \node [below=0.1cm of l3] (h3) {\textcolor{blue}{HBlank}}; \draw [thick, blue] (21) [bend left] to (h3); \draw [-stealth, thick, blue, dashed] (h3) [bend right] to (30); \node [below=0.1cm of l4] (h4) {\textcolor{blue}{HBlank}}; \draw [thick, blue, dashed] (31) [bend left] to (h4); \draw [-stealth, thick, blue] (h4) [bend right] to (1430); \node [below=0.1cm of l143] (h5) {\textcolor{blue}{HBlank}}; \draw [thick, blue] (1431) [bend left] to (h5); \draw [-stealth, thick, blue] (h5) [bend right] to (1440); \path (1441) -- node[pos=0.47] (v) {\textcolor{red}{\bf VBlank}} (00); \draw [ultra thick, red] (1441) [bend right] to (v); \draw [-stealth, red, ultra thick] (v) [bend left] to (00); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{mymauve}{rgb}{0.58,0,0.82} \usetikzlibrary{arrows,shapes, decorations.pathmorphing,backgrounds,positioning} \begin{document} \begin{tikzpicture} \node[circle, draw, thick] (h1) {$\vec{h}_1$}; \node[circle, draw, thick, above left=of h1] (h4) {$\vec{h}_2$}; \node[circle, draw, thick, left=5em of h1] (h5) {$\vec{h}_3$}; \node[circle, draw, thick, below left=of h1] (h6) {$\vec{h}_4$}; \node[circle, draw, thick, below=5em of h1] (h7) {$\vec{h}_5$}; \node[circle, draw, thick, below right=of h1] (h8) {$\vec{h}_6$}; \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h8.120) -- node[sloped, above, black] {$\vec{\alpha}_{16}$} (h1.-30); \draw[-stealth, blue, thick] (h8.135) -- (h1.-45); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h8.150) -- (h1.-60); \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.30) to[looseness=7] node[sloped, above, black] {$\vec{\alpha}_{11}$}(h1.105); \draw[-stealth, blue, thick] (h1.45) to[looseness=9] (h1.90); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.60) to[looseness=20] (h1.75); \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h4.285) -- node[sloped, below, black] {$\vec{\alpha}_{12}$}(h1.150); \draw[-stealth, blue, thick] (h4.300) -- (h1.135); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h4.315) -- (h1.120); \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h5.-15) -- node[sloped, below, black] {$\vec{\alpha}_{13}$}(h1.195); \draw[-stealth, blue, thick] (h5.0) -- (h1.180); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h5.15) -- (h1.165); \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h6.15) -- node[sloped, below, black] {$\vec{\alpha}_{14}$}(h1.240); \draw[-stealth, blue, thick] (h6.30) -- (h1.225); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h6.45) -- (h1.210); \draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h7.75) -- node[sloped, below, black] {$\vec{\alpha}_{15}$}(h1.-75); \draw[-stealth, blue, thick] (h7.90) -- (h1.-90); \draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h7.105) -- (h1.-105); \node[circle, draw, thick, right=10em of h1, opacity=0.8] (hp) {$\vec{h}_1'$}; \coordinate[right=5em of h1] (A); \draw[-stealth, mymauve, opacity=0.5, ultra thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.20) -- (A) -- (hp); \draw[-stealth, mygreen, opacity=0.5, ultra thick,decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.-20) -- (A) -- (hp); \draw[-stealth, blue, opacity=0.5, ultra thick] (h1.0) -- (A) -- node[black, above, opacity=1.0] {concat/avg} (hp); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{tkz-graph} \begin{document} \begin{tikzpicture}[scale=0.8,every node/.style={scale=0.7},font=\tt] \SetUpEdge[lw = 1.5pt, color = black, labelcolor = white] \GraphInit[vstyle=Normal] \SetGraphUnit{2.5} \tikzset{VertexStyle/.append style={fill}} \Vertex{AT} \EA(AT){TG} \EA(TG){GG} \SO(GG){GC} \SO(GC){CG} \WE(CG){GT} \WE(GT){CA} \NO(CA){AA} \tikzset{EdgeStyle/.style={-stealth}} \Edge[label=ATG](AT)(TG) \Edge[label=TGG](TG)(GG) \Edge[label=GGC](GG)(GC) \Edge[label=GCG](GC)(CG) \Edge[label=CGT](CG)(GT) \Edge[label=GTG](GT)(TG) \Edge[label=TGC](TG)(GC) \Edge[label=GCA, style={pos=.3}](GC)(CA) \Edge[label=CAA](CA)(AA) \Edge[label=AAT](AA)(AT) \draw[thick, red, dashed] (AT) ++(160:13pt)coordinate(AT1) arc (-200:-340:13pt) coordinate(AT2); \draw[thick, red, dashed] (TG) ++(160:13pt)coordinate(TG1) arc (-200:-340:13pt) coordinate(TG2); \draw[thick, red, dashed] (GG) ++(160:13pt)coordinate(GG1) arc (-200:-400:13pt) coordinate(GG2); \draw[thick, red, dashed] (GC) ++(40:13pt)coordinate(GC1) arc (-320:-400:13pt) coordinate(GC2); \draw[thick, red, dashed] (CG) ++(40:13pt)coordinate(CG1) arc (-320:-520:13pt) coordinate(CG2); \draw[thick, red, dashed] (GT) ++(-20:13pt)coordinate(GT1) arc (-380:-580:13pt) coordinate(GT2); \draw[thick, red, dashed] (TG) ++(-140:13pt)coordinate(TG11) arc (-500:-440:13pt) coordinate(TG12); \draw[thick, red, dashed] (GC) ++(-550:13pt)coordinate(GC11) arc (-550:-540:13pt) coordinate(GC12); \draw[thick, red, dashed] (CA) ++(-660:13pt)coordinate(CA1) arc (-660:-590:13pt) coordinate(CA2); \draw[thick, red, dashed] (AA) ++(-490:13pt)coordinate(AA1) arc (-490:-590:13pt) coordinate(AA2); \draw[thick, red, dashed] (AT) ++(-490:13pt)coordinate(AT11) arc (-490:-590:13pt) coordinate(AT12); \draw[thick, red, dashed, rounded corners=3mm] (AT2) --(TG1); \draw[thick, red, dashed, rounded corners=3mm] (TG2) --(GG1); \draw[thick, red, dashed, rounded corners=3mm] (GG2) --(GC1); \draw[thick, red, dashed, rounded corners=3mm] (GC2) --(CG1); \draw[thick, red, dashed, rounded corners=3mm] (CG2) --(GT1); \draw[thick, red, dashed, rounded corners=3mm] (GT2) --(TG11); \draw[thick, red, dashed, rounded corners=3mm] (TG12) --(GC11); \draw[thick, red, dashed, rounded corners=3mm] (GC12) --(CA1); \draw[thick, red, dashed, rounded corners=3mm] (CA2) --(AA1); \draw[thick, red, dashed, rounded corners=3mm] (AA2) --(AT11); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning, decorations.pathmorphing} \definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{echodrk}{HTML}{0099cc} \begin{document} \begin{tikzpicture} \node[circle, draw, very thick, fill=echodrk] (11) {}; \node[below = 0.5em of 11] (11c) {$({\bf 0}, G_3)$}; \node[circle, draw, very thick, fill=echodrk, right=3em of 11] (22) {}; \node[below =0.5em of 22] (22c) {$({\bf 1}, G_3)$}; \node[circle, draw, very thick, fill=echodrk, right=3em of 22] (33) {}; \node[below =0.5em of 33] (33c) {$({\bf 2}, G_3)$}; \node[circle, draw, very thick, fill=echodrk, right=3em of 33] (44) {}; \node[below =0.5em of 44] (44c) {$({\bf 3}, G_3)$}; \node[circle, draw, very thick, fill=mygreen, above = 4.5em of 11] (111) {}; \node at ([shift={(0.53,-0.3)}]111.-45) {$({\bf 0}, G_2)$}; \node[circle, draw, very thick, fill=mygreen, right=3em of 111] (222) {}; \node at ([shift={(0.53,-0.3)}]222.-45) {$({\bf 1}, G_2)$}; \node[circle, draw, very thick, fill=mygreen, right=3em of 222] (333) {}; \node at ([shift={(0.53,-0.3)}]333.-45) {$({\bf 2}, G_2)$}; \node[circle, draw, very thick, fill=mygreen, right=3em of 333] (444) {}; \node at ([shift={(0.53,-0.3)}]444.-45) {$({\bf 3}, G_2)$}; \node[circle, draw, very thick, fill=red, above = 4.5em of 111] (1) {}; \node[above = 0.5em of 1] (1c) {$({\bf 0}, G_1)$}; \node[circle, draw, very thick, fill=red, right=3em of 1] (2) {}; \node[above =0.5em of 2] (2c) {$({\bf 1}, G_1)$}; \node[circle, draw, very thick, fill=red, right=3em of 2] (3) {}; \node[above =0.5em of 3] (3c) {$({\bf 2}, G_1)$}; \node[circle, draw, very thick, fill=red, right=3em of 3] (4) {}; \node[above =0.5em of 4] (3c) {$({\bf 3}, G_1)$}; \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (11) to (111); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (22) to (222); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (33) to (333); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (44) to (444); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (1) to (111); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (2) to (222); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (3) to (333); \draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (4) to (444); \draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (1) to (11); \draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (2) to (22); \draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (3) to (33); \draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (4) to (44); \draw[-, ultra thick, color=echodrk] (11) to (22); \draw[-, ultra thick, bend right=17, color=echodrk] (11) to (33); \draw[-, ultra thick, color=echodrk] (33) to (44); \draw[-, ultra thick, color=mygreen] (111) to (222); \draw[-, ultra thick, color=mygreen] (222) to (333); \draw[-, ultra thick, bend left=17, color=red] (1) to (3); \draw[-, ultra thick, bend left=17, color=red] (1) to (4); \draw[-, ultra thick, bend right=17, color=red] (2) to (4); \draw[-, ultra thick, color=red] (2) to (3); \draw[-, ultra thick, color=red] (3) to (4); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{bm} \usetikzlibrary{positioning, matrix} \tikzset{ tablet/.style={ matrix of nodes, row sep=-\pgflinewidth, column sep=-\pgflinewidth, nodes={rectangle,draw=black,text width=1.25ex,align=center}, text height=1.25ex, text depth=0ex, nodes in empty cells }, texto/.style={font=\footnotesize\sffamily}, title/.style={font=\small\sffamily} } \begin{document} \begin{tikzpicture}[node distance=3cm, auto] \node [rectangle, draw, minimum width=5em, minimum height=7em] (joyp) {\tt JOYP}; \matrix[tablet, draw=none, nodes={draw=none, inner sep = 0.16em}, inner sep=0.1em, left = -0.35cm of joyp] (pt) { \node (17){\scriptsize\tt 7}; \\ \node(16){\scriptsize\tt 6}; \\ \node(15){\scriptsize\tt 5}; \\ \node(14){\scriptsize\tt 4}; \\ \node(13){\scriptsize\tt 3}; \\ \node(12){\scriptsize\tt 2}; \\ \node(11){\scriptsize\tt 1}; \\ \node(10){\scriptsize\tt 0};\\ }; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 10] (a) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 11] (b) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 12] (select) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 13] (start) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of a] (right) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of b] (left) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of select] (up) {}; \node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of start] (down) {}; \node [left = 0.5cm of right] (ra) {}; \node [left = 0.5cm of left] (lb) {}; \node [left = 0.5cm of up] (usel) {}; \node [left = 0.5cm of down] (dst) {}; \node [below = 0.15cm of a] (aa) {}; \node [below = 0.15cm of right] (rr) {}; \draw (ra) -- (right) -- (a) -- (10); \draw (lb) -- (left) -- (b) -- (11); \draw (usel) -- (up) -- (select) -- (12); \draw (dst) -- (down) -- (start) -- (13); \draw (aa) -- (a) -- node[right] {\tiny\bf A} (b) -- node[right] {\tiny\bf B} (select) -- node[right] {\tiny\bf SELECT} (start) |- node[pos=0.2, right] {\tiny\bf START} (14); \draw (rr) -- (right) -- node[right] {\tiny $\bm{\rightarrow}$} (left) -- node[right]{\tiny $\bm{\leftarrow}$} (up) -- node[right]{\tiny $\bm{\uparrow}$} (down) |- node[pos=0.1, right]{\tiny $\bm{\downarrow}$} (15); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{calc,decorations.pathmorphing,positioning} \begin{document} \begin{tikzpicture} \node[very thick, densely dashed, draw=black,rectangle, minimum height=3.5em, minimum width=1.5em, xshift=15em, yshift=-1em, fill=lightgray] (rekt1) {}; \node[very thick, densely dashed, draw=black,rectangle, minimum height=3.5em, minimum width=1.5em, xshift=15em, yshift=-6.1em, fill=lightgray] (rekt2) {}; \draw[ultra thick] (rekt1) -- (rekt2); \node[] (c) at ($(rekt1)!0.5!(rekt2)$) {}; \node[circle, draw, thick] (f11) {}; \node[circle, draw, thick, below=0em of f11] (f12) {}; \node[circle, draw, thick, below=0em of f12] (f13) {}; \node[circle, draw, thick, below=2em of f13] (f21) {}; \node[circle, draw, thick, below=0em of f21] (f22) {}; \node[circle, draw, thick, below=0em of f22] (f23) {}; \node[left=1em of f12] (il1) {$\vec{f}_i$}; \node[left=1em of f22] (il2) {$\vec{f}_j$}; \node[rectangle, draw, thick] (Q) at ($(il1)!0.5!(il2)$) {?}; \draw[ultra thick] (il1) -- (Q); \draw[ultra thick] (il2) -- (Q); \draw[dashed, ultra thick] (Q) -- (c); \node[circle, draw, thick, right=4em of f11] (h11) {}; \node[circle, draw, thick, right=4em of f12] (h12) {}; \node[circle, draw, thick, right=4em of f13] (h13) {}; \node[circle, draw, thick, right=4em of f21] (h21) {}; \node[circle, draw, thick, right=4em of f22] (h22) {}; \node[circle, draw, thick, right=4em of f23] (h23) {}; \node[circle, draw, thick, right=4em of h11] (k11) {}; \node[circle, draw, thick, right=4em of h12] (k12) {}; \node[circle, draw, thick, right=4em of h13] (k13) {}; \node[circle, draw, thick, right=4em of h21] (k21) {}; \node[circle, draw, thick, right=4em of h22] (k22) {}; \node[circle, draw, thick, right=4em of h23] (k23) {}; \node[circle, draw, thick, right=4em of k11] (l11) {}; \node[circle, draw, thick, right=4em of k12] (l12) {}; \node[circle, draw, thick, right=4em of k13] (l13) {}; \node[circle, draw, thick, right=4em of k21] (l21) {}; \node[circle, draw, thick, right=4em of k22] (l22) {}; \node[circle, draw, thick, right=4em of k23] (l23) {}; \node[circle, draw, thick, right=4em of l12] (o1) {}; \node[circle, draw, thick, right=4em of l22] (o2) {}; \node[right=1em of o1] (ll1) {$y_i$}; \node[right=1em of o2] (ll2) {$y_j$}; \foreach \l in {1,2} \foreach \x in {1,2,3} \foreach \y in {1,2,3} \draw[-stealth, thick] (f\l\x) -- (h\l\y); \foreach \l in {1,2} \foreach \x in {1,2,3} \foreach \y in {1,2,3} \draw[-stealth, thick] (h\l\x) -- (k\l\y); \foreach \l in {1,2} \foreach \x in {1,2,3} \foreach \y in {1,2,3} \draw[-stealth, thick] (k\l\x) -- (l\l\y); \foreach \l in {1,2} \foreach \x in {1,2,3} \draw[-stealth, thick] (l\l\x) -- (o\l); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{matrix, positioning} \begin{document} \begin{tikzpicture} \matrix (mtr) [matrix of nodes,row sep=-\pgflinewidth, nodes={draw}] { 0 & 1 & 1 & |[fill=red!30]| 1 & |[fill=red!30]| 0 & |[fill=red!30]| 0 & 0\\ 0 & 0 & 1 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & |[fill=red!30]| 0 & 0\\ 0 & 0 & 0 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & 0\\ 0 & 0 & 0 & 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0 & 0\\ 1 & 1 & 0 & 0 & 0 & 0 & 0\\ }; \draw[very thick, red] (mtr-1-4.north west) rectangle (mtr-3-6.south east); \node [below= of mtr-5-4.south] (lm) {$\bf I$}; \node[right = 0.2em of mtr] (str) {$*$}; \matrix (K) [right=0.2em of str,matrix of nodes,row sep=-\pgflinewidth, nodes={draw, fill=blue!30}] { 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ }; \node [below = of K-3-2.south] (lk) {$\bf K$}; \node [right = 0.2em of K] (eq) {$=$}; \matrix (ret) [right=0.2em of eq,matrix of nodes,row sep=-\pgflinewidth, nodes={draw}] { 1 & 4 & 3 & |[fill=green!30]| 4 & 1\\ 1 & 2 & 4 & 3 & 3\\ 1 & 2 & 3 & 4 & 1\\ 1 & 3 & 3 & 1 & 1\\ 3 & 3 & 1 & 1 & 0\\ }; \node [below = of ret-4-3.south] (lim) {${\bf I} * {\bf K}$}; \draw[very thick, green] (ret-1-4.north west) rectangle (ret-1-4.south east); \draw[densely dotted, blue, thick] (mtr-1-4.north west) -- (K-1-1.north west); \draw[densely dotted, blue, thick] (mtr-3-4.south west) -- (K-3-1.south west); \draw[densely dotted, blue, thick] (mtr-1-6.north east) -- (K-1-3.north east); \draw[densely dotted, blue, thick] (mtr-3-6.south east) -- (K-3-3.south east); \draw[densely dotted, green, thick] (ret-1-4.north west) -- (K-1-1.north west); \draw[densely dotted, green, thick] (ret-1-4.south west) -- (K-3-1.south west); \draw[densely dotted, green, thick] (ret-1-4.north east) -- (K-1-3.north east); \draw[densely dotted, green, thick] (ret-1-4.south east) -- (K-3-3.south east); \matrix (K) [right=0.2em of str,matrix of nodes,row sep=-\pgflinewidth, nodes={draw, fill=blue!10}] { 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ }; \draw[very thick, blue] (K-1-1.north west) rectangle (K-3-3.south east); \node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-4.south east) (xx) {\scalebox{.5}{$\times 1$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-5.south east) (xx) {\scalebox{.5}{$\times 0$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-6.south east) (xx) {\scalebox{.5}{$\times 1$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-4.south east) (xx) {\scalebox{.5}{$\times 0$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-5.south east) (xx) {\scalebox{.5}{$\times 1$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-6.south east) (xx) {\scalebox{.5}{$\times 0$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-4.south east) (xx) {\scalebox{.5}{$\times 1$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-5.south east) (xx) {\scalebox{.5}{$\times 0$}}; \node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-6.south east) (xx) {\scalebox{.5}{$\times 1$}}; \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \definecolor{bluport}{HTML}{21ADFD} \definecolor{orgport}{HTML}{E37322} \definecolor{pplport}{HTML}{4F21E9} \definecolor{redport}{HTML}{701315} \begin{document} \begin{tikzpicture} \fill[pplport!15] (0, 0) ellipse (0.25 and 3); \fill[redport!15] (2.75, -3) rectangle (3.25, 3); \fill[bluport!15] (6, 0) ellipse (0.25 and 3); \fill[orgport!15] (9, 0) ellipse (0.25 and 3); \draw[thick, pplport] (0, 0) ellipse (0.25 and 3); \draw[ultra thick, pplport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (0, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, pplport] (1) at (0, -3.5) {\emph{stash}}; \draw[ultra thick, redport] (2.75, -3) rectangle (3.25, 3); \node[text height=1em, text depth=1em, redport] (2) at (3, -3.5) {\emph{working directory}}; \draw[thick, orgport] (9, 0) ellipse (0.25 and 3); \draw[ultra thick, orgport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (9, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, orgport] (4) at (9, -3.5) {\emph{repository}}; \draw[-stealth, very thick] (6, 2) -- node[above] {\tt\footnotesize git commit} (9, 2); \draw[-stealth, very thick] (9, 1) -- node[above] {\tt\footnotesize git checkout} (6, 1); \draw[-stealth, very thick] (9, 0) -- node[above] {\tt\footnotesize git reset} (6, 0); \draw[very thick] (6, -2) -- node[above] {\tt\scriptsize git diff -{}-staged} (9, -2); \draw[very thick] (3, -2.5) -- node[above, pos=0.75] {\tt\scriptsize git diff HEAD} (9, -2.5); \draw[-stealth, very thick] (9, -0.5) -- node[above, pos=0.25] {\tt\footnotesize git rebase} (3, -0.5); \draw[-stealth, very thick] (9, -1) -- node[above, pos=0.25] {\tt\footnotesize git merge} (3, -1); % draw the blue portal here for the portal effect \draw[thick, bluport] (6, 0) ellipse (0.25 and 3); \draw[ultra thick, bluport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (6, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, bluport] (3) at (6, -3.5) {\emph{index}}; % Redraw some lines for piercing effect through blu port \draw[-stealth, very thick] (6, -0.5) -- (3, -0.5); \draw[-stealth, very thick] (6, -1) -- (3, -1); \draw[very thick] (3, -2.5) -- (6, -2.5); \draw[-stealth, very thick] (3, 2.5) -- node[above] {\tt\footnotesize git add/rm} (6, 2.5); \draw[-stealth, very thick] (3, 1.5) -- node[above] {\tt\footnotesize git stash save} (0, 1.5); \draw[-stealth, very thick] (6, 1) -- node[above] {\tt\footnotesize git checkout} (3, 1); \draw[-stealth, very thick] (0, 0.5) -- node[above] {\tt\footnotesize git stash pop} (3, 0.5); \draw[-stealth, very thick] (0, -0.5) -- node[above] {\tt\footnotesize git stash apply} (3, -0.5); \draw[very thick] (3, -1.5) -- node[above] {\tt\footnotesize git diff} (6, -1.5); \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[cross/.style={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); }}] \node[rectangle, align=center] (fm) at (-2, 0) {\begin{tikzpicture}[samples=1000, domain=0:5] \begin{axis}[ hide axis, width=4cm, height=2cm, xtick=\empty, ytick=\empty, xlabel=\empty, ylabel=\empty, xmin=0, xmax=5, ymin=-2.1, ymax=2.1, trig format = rad ] \addplot expression [no markers, smooth, thick, black] {2*sin(2*pi*3*x - 8*cos(2*pi*0.25*x))}; \end{axis} \end{tikzpicture}\\ $FM(t)$}; \node[rectangle, align=center] (cos) at (1, -3) {\tikz \draw[x=1.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) sin (2.5, 0.5) cos (3, 0) sin (3.5, -0.5) cos (4, 0) sin (4.5, 0.5) cos (5, 0) sin (5.5, -0.5) cos (6, 0);\\ $\cos(2\pi f t)$}; \node[circle, draw, cross, thick] (mul1) at (1, -0.7) {}; \node[circle, draw, cross, thick] (mul2) at (2, 1.3) {}; \node[rectangle, draw, thick] (rot) at (2, 0.3) {$-90^\circ$}; \node[rectangle] (it) at (3, -1) {$I(t)$}; \node[rectangle] (qt) at (3, 1.6) {$Q(t)$}; \node[rectangle, draw, thick, align=center] (lp1) at (4.75, -0.7) {\tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) (0.6, -0.5) -- (1.4, 0.5);\\ \tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0);}; \node[rectangle, draw, thick, align=center] (lp2) at (4.75, 1.3) {\tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) (0.6, -0.5) -- (1.4, 0.5);\\ \tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0);}; \node[rectangle, draw, thick] (samp1) at (7.25, -0.7) {sample}; \node[rectangle, draw, thick] (samp2) at (7.25, 1.3) {sample}; \node[rectangle] (in) at (8.5, -1) {$I_n$}; \node[rectangle] (qn) at (8.5, 1.6) {$Q_n$}; \draw[thick, -stealth] (-0.65, 0.3) -- (0, 0.3) |- (mul1); \draw[thick, -stealth] (0, 0.3) |- (mul2); \draw[thick, -stealth] (cos) -- (mul1); \draw[thick, -stealth] (1, -1.85) -| (rot); \draw[thick, -stealth] (rot) -- (mul2); \draw[thick] (mul1) -- (1.9, -0.7); \draw[thick] (1.89, -0.7) sin (2, -0.6) cos (2.11, -0.7); \draw[thick, -stealth] (2.1, -0.7) -- (lp1); \draw[thick, -stealth] (mul2) -- (lp2); \draw[thick, -stealth] (lp1) -- (samp1); \draw[thick, -stealth] (lp2) -- (samp2); \draw[thick] (samp1) -| (9, 0.3); \draw[thick] (samp2) -| (9, 0.3); \draw[thick, -stealth] (9, 0.3) -- node[below] {$(I_n, Q_n)$} (11, 0.3); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \pgfdeclarelayer{background} \pgfsetlayers{background, main} \begin{document} \begin{tikzpicture} \node[ball color=white, circle] (H1) at (-3.17, 1.39, -0.92) {H}; \node[ball color=white, circle] (H2) at (-3.31, 1.23, 0.84) {H}; \node[ball color=white, circle] (H3) at (-4.08, 0.05, -0.21) {H}; \node[ball color=white, circle] (H4) at (-1.95, -0.69, -0.92) {H}; \node[ball color=white, circle] (H5) at (-0.86, 1.39, 0.84) {H}; \node[ball color=white, circle] (H6) at (-0.69, 1.26, -0.91) {H}; \node[ball color=white, circle] (H7) at (0.46, -0.59, 1.23) {H}; \node[ball color=white, circle] (H8) at (1.39, -1.82, -0.57) {H}; \node[ball color=white, circle] (H9) at (-0.23, -1.96, -0.46) {H}; \node[ball color=white, circle] (H10) at (3.57, 0.59, -0.06) {H}; \node[ball color=black!75, circle, white, scale=1.3] (C1) at (-3.19, 0.68, -0.09) {C}; \node[ball color=black!75, circle, white, scale=1.3] (C2) at (-0.78, 0.67, 0.01) {C}; \node[ball color=black!75, circle, white, scale=1.3] (C3) at (0.47, -0.18, 0.21) {C}; \node[ball color=black!75, circle, white, scale=1.3] (C4) at (1.73, 0.67, 0.09) {C}; \node[ball color=blue!75, circle, scale=1.3] (N1) at (-2.00, -0.15, -0.05) {N}; \node[ball color=blue!75, circle, scale=1.3] (N2) at (0.51, -1.32, -0.73) {N}; \node[ball color=red!75, circle, scale=1.3] (O1) at (1.80, 1.88, 0.13) {O}; \node[ball color=red!75, circle, scale=1.3] (O2) at (2.86, -0.07, 0.00) {O}; \begin{pgfonlayer}{background} \draw[gray, line width=1mm] (H1) -- (C1) -- (N1) -- (C2) -- (C3) -- (C4) -- (O1) (H2) -- (C1) (H3) -- (C1) (N1) -- (H4) (C2) -- (H5) (C2) -- (H6) (C3) -- (H7) (C3) -- (N2) -- (H8) (N2) -- (H9) (C4) -- (O2) -- (H10); \end{pgfonlayer} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[shorten >=2pt, thick, ->] \node (X1) {$\vec e_1$}; \node[rectangle, below=3ex of X1] (x_dots_1) {$\dots$}; \node[below=3ex of x_dots_1] (Xj) {$\vec e_j$}; \node[rectangle, below=3ex of Xj] (x_dots_2) {$\dots$}; \node[below=3ex of x_dots_2] (Xn) {$\vec e_n$}; \node[rectangle, draw, very thick, right=of X1] (attn_1) {$a_\phi$}; \node[rectangle, draw, very thick, right=of Xj] (attn_j) {$a_\phi$}; \node[rectangle, draw, very thick, right=of Xn] (attn_n) {$a_\phi$}; \draw (X1) edge (attn_1) (Xj) edge (attn_1); \draw (Xj) edge (attn_j) ([xshift=3em]Xj) edge (attn_j); \draw (Xj) edge (attn_n) (Xn) edge (attn_n); \node[right=of attn_1, opacity=0.2] (alpha_1j) {$\alpha_{1j}$}; \node[right=of attn_j, opacity=1] (alpha_jj) {$\alpha_{jj}$}; \node[right=of attn_n, opacity=0.6] (alpha_nj) {$\alpha_{nj}$}; \node[circle, draw, right=of alpha_1j] (times_1) {$\times$}; \node[circle, draw, right=of alpha_jj] (times_j) {$\times$}; \node[circle, draw, right=of alpha_nj] (times_n) {$\times$}; \node[rectangle, draw, right=of times_j] (sum) {$\Sigma$}; \node[right=1em of sum] (x_tprim) {$\vec e_j'$}; \draw[opacity=0.2] (attn_1) -- (alpha_1j); \draw[opacity=1] (attn_j) -- (alpha_jj); \draw[opacity=0.6] (attn_n) -- (alpha_nj); \draw (X1) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_1); \draw (Xj) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_j); \draw (Xn) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_n); \draw (times_1) edge (sum) (times_j) edge (sum) (times_n) edge (sum); \draw[opacity=0.2] (alpha_1j) -- (times_1); \draw[opacity=1] (alpha_jj) -- (times_j); \draw[opacity=0.6] (alpha_nj) -- (times_n); \draw (sum) -- (x_tprim); \end{tikzpicture} \end{document}
\documentclass[svgnames,tikz]{standalone} \def\unit{5} \begin{document} \begin{tikzpicture}[thick] % Coordinates of initial, end and midpoints of transition to complexity \coordinate (qea) at (-1/5*\unit,-5/12*\unit); % quantum effective action \coordinate (ma1) at (2/5*\unit,1/2*\unit); % microscopic action 1 \coordinate (ma2) at (3/5*\unit,1/3*\unit); % microscopic action 2 \coordinate (ma3) at (\unit,1/2*\unit); % microscopic action 3 \coordinate (r1) at (1/6*\unit,1/4*\unit); % regulator 1 \coordinate (r2) at (2/5*\unit,1/10*\unit); % regulator 2 \coordinate (r3) at (1/2*\unit,-1/5*\unit); % regulator 3 % Coordinate system \draw[->] (0,0) -- (0,2/3*\unit) node[below right] (l1) {$\lambda_1$}; \draw[->] (0,0) -- (-1/2*\unit,-1/2*\unit) node[below right] (l2) {$\lambda_2$}; \draw[->] (0,0) -- (1/7*\unit,-2/3*\unit) node[above left] (l3) {$\lambda_3$}; \draw[->] (0,0) -- (5/6*\unit,-1/2*\unit) node[below left] (l4) {$\lambda_4$}; \draw[->] (0,0) -- (\unit,0); \draw[line width=2,line cap=round,dash pattern=on 0pt off 5\pgflinewidth] (3/4*\unit,-3/10*\unit) edge[bend right=20] (5/6*\unit,-1/10*\unit); % Flow trajectories \draw[dashed] (ma1) edge[->,in=50,out=210] (r1) (r1) node[below right] {$R_1$} to[out=240,in=40] (qea); \draw[dashed] (ma2) edge[->,in=60,out=220] (r2) (r2) node[right] {$R_2$} to[out=250,in=20] (qea); \draw[dashed] (ma3) edge[->,in=40,out=240] (r3) (r3) node[below right] {$R_3$} to[out=220,in=0] (qea); % Initial and end points \fill[DarkRed] (qea) circle (0.1) node[below] {$\Gamma_{k=0} = \Gamma$}; \fill[DarkBlue] (ma1) circle (0.1) node[above] {$\Gamma_{k=\Lambda_1} = S_1$}; \fill[DarkBlue] (ma2) circle (0.1) node[above] {$\Gamma_{k=\Lambda_2} = S_2$}; \fill[DarkBlue] (ma3) circle (0.1) node[above] {$\Gamma_{k=\Lambda_3} = S_3$}; \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{130} \begin{tikzpicture}[tdplot_main_coords, scale=5] %% Definition of the different styles \tikzstyle{init} = [black] % initial base \tikzstyle{prec} = [blue] % 1st intermediate base \tikzstyle{nuta} = [red] % 2nd initial base \tikzstyle{rotp} = [green] % final base \tikzstyle{base} = [thick, -stealth] % Base layout \tikzstyle{angle} = [thick, -latex] % Draw arcs for angles \tikzstyle{circle} = [thin, dashed] % Drawing circles %% Geometric parameters \def\epsi{15} % Precession angle drawn \def\etheta{15} % Nutation angle drawn \def\ephi{15} % Own rotation angle drawn \def\rang{0.7} % Radius used to draw angles %% Trace % Initial mark \coordinate (O) at (0,0,0); \draw[base, init] (O) -- (1,0,0) node[anchor=north east] {$\overrightarrow{x}$}; \draw[base, init] (O) -- (0,1,0) node[anchor=north west] {$\overrightarrow{y}$}; \draw[base, init] (O) -- (0,0, 1) node[anchor=south] {$\overrightarrow{z}$}; % Precession \tdplotsetrotatedcoords{\epsi}{0}{0} \draw[tdplot_rotated_coords, angle, prec] (O) --(1,0,0) node[anchor=north east] {$\overrightarrow{u}$}; \draw[tdplot_rotated_coords, angle, prec] (O) --(0,1,0) node[anchor=west] {$\overrightarrow{v}$}; \tdplotdrawarc[tdplot_rotated_coords, circle, prec] {(0,0,0) }{1}{0}{360}{}{} \tdplotdrawarc[tdplot_rotated_coords, angle, prec] {(0,0,0)} {\rang}{90-\epsi}{90}{anchor=north east, prec}{$\psi$} \tdplotdrawarc[tdplot_rotated_coords, angle, prec] {(0,0,0)} {\rang}{-\epsi}{0}{anchor=north east, prec}{$\psi$} % Nutation \tdplotsetrotatedcoords{\epsi}{\etheta}{0} \draw[tdplot_rotated_coords, base, nuta] (O) --(1,0,0) node[anchor=north east] {$\overrightarrow{w}$}; \draw[tdplot_rotated_coords, base, nuta] (O) --(0,0, 1) node[anchor=south east] {$\overrightarrow{z}_1$}; \tdplotsetrotatedthetaplanecoords{0} \tdplotdrawarc[tdplot_rotated_coords, circle, nuta] {(0,0,0) }{1}{0}{360}{}{} \tdplotdrawarc[tdplot_rotated_coords, angle, nuta] {(0,0,0)} {\rang}{90-\etheta}{90}{anchor=south west, nuta}{$\theta$} \tdplotdrawarc[tdplot_rotated_coords, angle, nuta] {(0,0,0)} {\rang}{-\etheta}{0}{anchor=south, nuta}{$\theta$} % Proper Rotation \tdplotsetrotatedcoords{\epsi}{\etheta}{\ephi} \draw[tdplot_rotated_coords, base, rotp] (O) --(1,0,0) node[anchor=north] {$\overrightarrow{x}_1$}; \draw[tdplot_rotated_coords, base, rotp] (O) --(0,1,0) node[anchor=west] {$\overrightarrow{y}_1$}; \tdplotdrawarc[tdplot_rotated_coords, circle, rotp] {(0,0,0) }{1}{0}{360}{}{} \tdplotdrawarc[tdplot_rotated_coords, angle, rotp] {(0,0,0)} {\rang}{90-\ephi}{90}{anchor=west, rotp}{$\varphi$} \tdplotdrawarc[tdplot_rotated_coords, angle, rotp] {(0,0,0)} {\rang}{-\ephi}{0}{anchor=north, rotp}{$\varphi$} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{calc,positioning} \begin{document} \begin{tikzpicture}[ thick, text centered, box/.style={draw, thin, minimum width=1cm}, func/.style={circle, text=white}, ] % x nodes \node[box, fill=blue!20] (x1) {$x_1$}; \node[box, fill=blue!20, right of=x1] (x2) {$x_2$}; \node[right of=x2] (xdots1) {\dots}; \node[box, fill=blue!20, right of=xdots1] (xd) {$x_d$}; \node[box, fill=green!60!black, text opacity=1, opacity=0.4, right=2 of xd] (xdp1) {$x_{d+1}$}; \node[right of=xdp1] (xdots2) {\dots}; \node[box, fill=green!60!black, text opacity=1, opacity=0.4, right of=xdots2] (xD) {$x_D$}; % z nodes \node[box, fill=blue!20, below=3 of x1] (z1) {$z_1$}; \node[box, fill=blue!20, right of=z1] (z2) {$z_2$}; \node[right of=z2] (zdots1) {\dots}; \node[box, fill=blue!20, right of=zdots1] (zd) {$z_d$}; \node[box, fill=orange!40, right=2 of zd] (zdp1) {$z_{d+1}$}; \node[right of=zdp1] (zdots2) {\dots}; \node[box, fill=orange!40, right of=zdots2] (zD) {$z_D$}; % z to x lines \draw[->] (z1) -- (x1); \draw[->] (z2) -- (x2); \draw[->] (zd) -- (xd); \draw[->] (zdp1) -- (xdp1); \draw[->] (zD) -- (xD); % scale and translate functions \node[func, font=\large, fill=teal, above left=0.1] (t) at ($(zd)!0.5!(xdp1)$) {$t$}; \fill[teal, opacity=0.5] (z1.north west) -- (t.center) -- (zd.north east) -- (z1.north west); \node[func, font=\large, fill=orange, below right=0.1] (s) at ($(zd)!0.5!(xdp1)$) {$s$}; \fill[orange, opacity=0.5] (z1.north west) -- (s.center) -- (zd.north east) -- (z1.north west); % feeding in s and t \node[func, inner sep=0, fill=orange] (odot1) at ($(zdp1)!0.5!(xdp1)$) {$\odot$}; \node[func, inner sep=0, fill=teal] (oplus1) at ($(zdp1)!0.75!(xdp1)$) {$\oplus$}; \draw[orange, ->] (s) to[bend left=5] (odot1); \draw[teal, ->] (t) to[bend left=5] (oplus1); \node[func, inner sep=0, fill=orange] (odot2) at ($(zD)!0.5!(xD)$) {$\odot$}; \node[func, inner sep=0, fill=teal] (oplus2) at ($(zD)!0.75!(xD)$) {$\oplus$}; \draw[orange, ->] (s) to[bend right=5] (odot2); \draw[teal, ->] (t) to[bend right=5] (oplus2); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{matrix, positioning} \begin{document} \begin{tikzpicture}[ 2d-arr/.style={matrix of nodes, row sep=-\pgflinewidth, column sep=-\pgflinewidth, nodes={draw}} ] \matrix (mtr) [2d-arr] { 0 & 1 & 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 0 & |[fill=orange!30]| 0 & 0\\ 0 & 0 & 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 0 & 0\\ 0 & 0 & 0 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & 0\\ 0 & 0 & 0 & 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0 & 0\\ 1 & 1 & 0 & 0 & 0 & 0 & 0\\ }; \node[below=of mtr-5-4] {$\mathbf I$}; \node[right=0.2em of mtr] (str) {$*$}; \matrix (K) [2d-arr, right=0.2em of str, nodes={draw, fill=teal!30}] { 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \\ }; \node[below=of K-3-2] {$\mathbf K$}; \node[right=0.2em of K] (eq) {$=$}; \matrix (ret) [2d-arr, right=0.2em of eq] { 1 & 4 & 3 & |[fill=blue!80!black!30]| 4 & 1\\ 1 & 2 & 4 & 3 & 3\\ 1 & 2 & 3 & 4 & 1\\ 1 & 3 & 3 & 1 & 1\\ 3 & 3 & 1 & 1 & 0\\ }; \node[below=of ret-4-3] {$\mathbf{I * K}$}; \draw[dashed, teal] (mtr-1-6.north east) -- (K-1-1.north west); \draw[dashed, teal] (mtr-3-6.south east) -- (K-3-1.south west); \draw[dashed, blue!80!black] (K-1-3.north east) -- (ret-1-4.north west); \draw[dashed, blue!80!black] (K-3-3.south east) -- (ret-1-4.south west); \foreach \i in {1,2,3} { \foreach \j in {4,5,6} { \node[font=\tiny, scale=0.6, shift={(-1.2ex,-2ex)}] at (mtr-\i-\j) {$\times \pgfmathparse{int(mod(\i+\j,2))}\pgfmathresult$}; } } \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{calc,positioning} \begin{document} \begin{tikzpicture}[ thick, text centered, box/.style={draw, thin, minimum width=1cm}, func/.style={circle, text=white}, input/.style={draw=red, very thick}, ] % x nodes \node[box, input, fill=blue!20] (x1) {$x_1$}; \node[box, input, fill=blue!20, right of=x1] (x2) {$x_2$}; \node[right of=x2] (xdots1) {\dots}; \node[box, input, fill=blue!20, right of=xdots1] (xd) {$x_d$}; \node[box, fill=green!60!black, text opacity=1, opacity=0.4, right=2 of xd] (xdp1) {$x_{d+1}$}; \node[right of=xdp1] (xdots2) {\dots}; \node[box, fill=green!60!black, text opacity=1, opacity=0.4, right of=xdots2] (xD) {$x_D$}; % z nodes \node[box, fill=blue!20, below=3 of x1] (z1) {$z_1$}; \node[box, fill=blue!20, right of=z1] (z2) {$z_2$}; \node[right of=z2] (zdots1) {\dots}; \node[box, fill=blue!20, right of=zdots1] (zd) {$z_d$}; \node[box, input, fill=orange!40, right=2 of zd] (zdp1) {$z_{d+1}$}; \node[right of=zdp1] (zdots2) {\dots}; \node[box, fill=orange!40, right of=zdots2] (zD) {$z_D$}; % z to x lines \draw[->] (zdp1) -- (xdp1); % scale and translate functions \node[func, font=\large, fill=teal, above right=0.1] (t) at ($(zd)!0.5!(xdp1)$) {$t$}; \fill[teal, opacity=0.5] (x1.south west) -- (t.center) -- (xd.south east) -- (x1.south west); \node[func, font=\large, fill=orange, below left=0.1] (s) at ($(zd)!0.5!(xdp1)$) {$s$}; \fill[orange, opacity=0.5] (x1.south west) -- (s.center) -- (xd.south east) -- (x1.south west); % feeding in s and t \node[func, inner sep=0, fill=orange] (odot1) at ($(zdp1)!0.4!(xdp1)$) {$\odot$}; \node[func, inner sep=0, fill=teal] (oplus1) at ($(zdp1)!0.7!(xdp1)$) {$\oplus$}; \draw[orange, ->] (s) to[bend right=5] (odot1); \draw[teal, ->] (t) to[bend right=5] (oplus1); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{positioning, arrows.meta, calc} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,fill=black!25,minimum size=20,inner sep=0}, label/.style={font=\large\bfseries, minimum size=3em}, arrow/.style={>={LaTeX[width=5mm,length=5mm]}, ->, line width=1ex, gray, shorten <=1em, shorten >=1em}, ] \begin{scope}[local bounding box=struct] \node[ball color=black!75, circle, white, scale=1.3] (C1) at (0, 0) {C}; \node[ball color=black!75, circle, white, scale=1.3] (C2) at (0, -1.5) {C}; \node[ball color=blue!75, circle, scale=1.3] (N1) at (-0.5, 1.5) {N}; \node[ball color=red!75, circle, scale=1.3] (O1) at (1.8, 0.5) {O}; \node[ball color=white, circle] (H1) at (1.5, -2.5) {H}; \node[ball color=white, circle] (H2) at (0, -3) {H}; \node[ball color=white, circle] (H3) at (-1.5, -2.5) {H}; \node[ball color=white, circle] (H4) at (-2, 0.75) {H}; \node[ball color=white, circle] (H5) at (1, 2) {H}; \draw[gray, line width=1mm] (H1) -- (C2) -- (C1) -- (N1) (C1) -- (O1) (H2) -- (C2) (H3) -- (C2) (N1) -- (H4) (N1) -- (H5); \end{scope} % \draw[rounded corners=1em, thick] (current bounding box.south west)++(-1,-1) rectangle (current bounding box.north east); \node[label] at (0,-4.5) (structure) {Molecular Structure\vphantom{p}}; \node[label, right=4.5cm of structure] (descriptor) {Descriptor}; \node[label, right=6cm of descriptor] (model) {Model}; \node[label, right=4.5cm of model] (property) {Property}; \node[scale=7, above=1.8cm of property] (alpha) {$\alpha$}; \begin{scope}[shift={($(struct.east)+(2.5,0)$)}, scale=0.6, local bounding box=desc] \foreach \y [count=\n] in { {74,25,39,20,3,3,3,3,3}, {25,53,31,17,7,7,2,3,2}, {39,31,37,24,3,3,3,3,3}, {20,17,24,37,2,2,6,5,5}, {3,7,3,2,0,1,0,0,0}, {3,7,3,2,1,0,0,0,0}, {3,2,3,6,0,0,0,1,1}, {3,3,3,5,0,0,1,0,1}, {3,2,3,5,0,0,1,1,0}, } { \foreach \x [count=\m] in \y { \node[fill=yellow!\x!purple, minimum size=6mm, text=white] at (\m,5-\n) {\x}; } } \end{scope} \begin{scope}[shift={($(desc.east)+(3,2.5)$)}, local bounding box=mod] \def\layersep{2.5} % Input layer \foreach \y in {1,2,3} \node[neuron, fill=teal!60] (i\y) at (0,-\y-0.5) {$i\y$}; % Hidden layer \foreach \y in {1,...,4} \path node[neuron, fill=blue!50] (h\y) at (\layersep,-\y) {$h\y$}; % Output node \node[neuron, fill=orange!60] (o) at (2*\layersep,-2.5) {$o$}; % Connect every node in the input layer with every node in the hidden layer. \foreach \source in {1,2,3} \foreach \dest in {1,...,4} \path (i\source) edge (h\dest); % Connect every node in the hidden layer with the output layer \foreach \source in {1,...,4} \path (h\source) edge (o); \end{scope} \draw[arrow] (struct.east) -- ++(2.5,0); \draw[arrow] (desc.east) -- ++(2.5,0); \draw[arrow] (mod.east) -- ++(2.5,0); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{xstring} \usetikzlibrary{calc,positioning} \newcommand\drawNodes[2]{ % #1 (str): namespace % #2 (list[list[str]]): list of labels to print in the node of each neuron \foreach \neurons [count=\lyrIdx] in #2 { \StrCount{\neurons}{,}[\layerLen] % use xstring package to save each layer size into \layerLen macro \foreach \n [count=\nIdx] in \neurons \node[neuron] (#1-\lyrIdx-\nIdx) at (\layerLen/2-\nIdx, 1.5*\lyrIdx) {\n}; } } \newcommand\denselyConnectNodes[2]{ % #1 (str): namespace % #2 (list[int]): number of nodes in each layer \foreach \n [count=\lyrIdx, remember=\lyrIdx as \previdx, remember=\n as \prevn] in #2 { \foreach \y in {1,...,\n} { \ifnum \lyrIdx > 1 \foreach \x in {1,...,\prevn} \draw[->] (#1-\previdx-\x) -- (#1-\lyrIdx-\y); \fi } } } \newcommand\connectSomeNodes[2]{ % #1 (str): namespace % #2 (list[list[list[int]]]): for each node in each layer, list all connected nodes in the next layer \foreach \layer [count=\lyrIdx, evaluate=\lyrIdx as \nextLyr using int(\lyrIdx+1)] in #2 \foreach \neuron [count=\nIdx] in \layer \foreach \edge in \neuron \draw[->] (#1-\lyrIdx-\nIdx) -- (#1-\nextLyr-\edge); } \begin{document} \begin{tikzpicture}[ shorten >=1pt, shorten <=1pt, neuron/.style={circle, draw, minimum size=4ex, thick}, legend/.style={font=\large\bfseries}, ] % Fully-connected neural net \drawNodes{fcnn}{{{,,}, {,,,}, {,,,}, {,,}}} \denselyConnectNodes{fcnn}{{3, 4, 4, 3}} \path (fcnn-1-1) -- (fcnn-2-1) node[midway, right=1ex] (W1) {$W_1$}; \path (fcnn-2-1) -- (fcnn-3-1) node[midway, right=1ex] (W2) {$W_2$}; \path (fcnn-3-1) -- (fcnn-4-1) node[midway, right=1ex] (V) {$V$}; % MADE net \begin{scope}[xshift=9cm] \drawNodes{made}{{{3,1,2}, {2,1,2,2}, {1,2,2,1}, {3,1,2}}} \connectSomeNodes{made}{{ {{}, {1,2,3,4}, {1,3,4}}, {{2,3}, {1,2,3,4}, {2,3}, {2,3}}, {{1,3}, {1}, {1}, {1,3}}, }} \end{scope} % Input + output labels \foreach \idx in {1,2,3} { \node[below=0 of fcnn-1-\idx] {$x_\idx$}; \node[above=0 of fcnn-4-\idx] {$\hat x_\idx$}; \node[below=0 of made-1-\idx] {$x_\idx$}; } % MADE output labels \node[xshift=2.5ex, above=0 of made-4-1] {$p(x_3|x_2)$}; \node[above=0 of made-4-2] {$p(x_2)$}; \node[xshift=-4ex, above=0 of made-4-3] {$p(x_1|x_2,x_3)$}; % Bottom legend \node[legend, below=of fcnn-1-2] (encoder) {autoencoder}; \node[legend, below=of made-1-2] (made) {MADE}; \node[legend, right=2.5cm of encoder] (masks) {masks}; \node[legend, yshift=-1pt] (masks) at ($(encoder)!0.55!(masks)$) {\texttimes}; \node[legend, yshift=-1pt] (masks) at ($(masks)!0.65!(made)$) {$\longrightarrow$}; % Mask matrices \begin{scope}[shift={(3cm,5cm)}, scale=0.4] \draw (0,0) grid (4,3); \node at (-1.8,1.5) {$M_V =$}; \fill[black] (0,1) rectangle ++(4,1); \fill[black] (1,0) rectangle ++(2,1); \begin{scope}[yshift=-5cm] \draw (0,0) grid (4,4); \node at (-1.8,2) {$M_{W_2} =$}; \fill[black] (0,0) rectangle ++(1,1); \fill[black] (0,3) rectangle ++(1,1); \fill[black] (2,0) rectangle ++(2,1); \fill[black] (2,3) rectangle ++(2,1); \end{scope} \begin{scope}[yshift=-10cm] \draw (0,0) grid (3,4); \node at (-1.8,2) {$M_{W_1} =$}; \fill[black] (0,0) rectangle ++(1,4); \fill[black] (2,2) rectangle ++(1,1); \end{scope} \end{scope} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{positioning} \def\layersep{2} \def\nodesep{1.5} \begin{document} \begin{tikzpicture}[ node/.style={circle, draw, thick}, ] \foreach \y in {1,...,5}{ \node[node] (i\y) at (0,\nodesep*\y) {}; \node[node, right=\layersep of i\y] (h1\y) {}; \node[node, right=\layersep of h1\y] (h2\y) {}; } \node[node, right=\layersep of h22] (o1) {}; \node[node, right=\layersep of h24] (o2) {}; \foreach \source in {1,...,5} \foreach \dest in {1,...,5}{ \path[-stealth, thick] (i\source) edge (h1\dest); \path[-stealth, thick] (h1\source) edge (h2\dest); } \foreach \source in {1,...,5} \foreach \dest in {1,2} \draw[-stealth, thick] (h2\source) -- (o\dest); \draw[-stealth, thick] (7.5,3*\nodesep) -- node[above,font=\Large\bfseries] {dropout} (9.5, 3*\nodesep); % Boundary \foreach \y in {1,...,5} \node[node, right=15em of h2\y] (di\y) {}; \node[red,font=\huge] at (di1) {$\times$}; \node[red,font=\huge] at (di3) {$\times$}; \foreach \y in {1,...,5} \node[node, right=\layersep of di\y] (dh1\y) {}; \node[red,font=\huge] at (dh11) {$\times$}; \node[red,font=\huge] at (dh13) {$\times$}; \node[red,font=\huge] at (dh14) {$\times$}; \foreach \y in {1,...,5} \node[node, right=\layersep of dh1\y] (dh2\y) {}; \node[red,font=\huge] at (dh22) {$\times$}; \node[red,font=\huge] at (dh24) {$\times$}; \node[node, right=\layersep of dh22] (do1) {}; \node[node, right=\layersep of dh24] (do2) {}; \foreach \source in {2,4,5} \foreach \dest in {2,5} \draw[-stealth, thick] (di\source) -- (dh1\dest); \foreach \source in {2,5} \foreach \dest in {1,3,5} \draw[-stealth, thick] (dh1\source) -- (dh2\dest); \foreach \source in {1,3,5} \foreach \dest in {1,2} \draw[-stealth, thick] (dh2\source) -- (do\dest); \end{tikzpicture} \end{document}
\documentclass[tikz,svgnames]{standalone} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[ very thick, q0/.style={->,DarkBlue,semithick,yshift=5pt,shorten >=5pt,shorten <=5pt}, cross/.style={ path picture={ \draw[black,thick] (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east); } } ] % Loop \def\radius{1.5} \draw (0,0) circle (\radius); \node[above] (1) at (0,\radius) {$m_1^2$, $\gamma_1^2$}; \node[below] (2) at (0,-\radius) {$m_2^2$, $\gamma_2^2$}; \draw[q0] (140:0.75*\radius) arc (140:40:0.75*\radius) node[midway,below] {$q_0$}; \draw[fill=white,cross,thick] (0,-\radius) circle (4pt); % External lines \filldraw (-2*\radius,0) -- (-\radius,0) circle (2pt) node[below left] {$g$} (\radius,0) circle (2pt) node[below right] {$g$} -- (2*\radius,0); \draw[q0] (-2*\radius,0) -- (-\radius,0) node[midway,above] {$q_0$}; \draw[q0] (\radius,0) -- (2*\radius,0) node[midway,above] {$q_0$}; \node[xshift=4cm,scale=1.5] at (0,0) {$+$}; \begin{scope}[xshift=8cm] % Loop \def\radius{1.5} \draw (0,0) circle (\radius); \node[above=3pt] (1) at (0,\radius) {$m_1^2$, $\gamma_1^2$}; \node[below] (2) at (0,-\radius) {$m_2^2$, $\gamma_2^2$}; \draw[q0,yshift=-10pt] (220:0.75*\radius) arc (220:320:0.75*\radius) node[midway,above] {$q_0$}; \draw[fill=white,cross,thick] (0,\radius) circle (4pt); % External lines \filldraw (-2*\radius,0) -- (-\radius,0) circle (2pt) node[below left] {$g$} (\radius,0) circle (2pt) node[below right] {$g$} -- (2*\radius,0); \draw[q0] (-2*\radius,0) -- (-\radius,0) node[midway,above] {$q_0$}; \draw[q0] (\radius,0) -- (2*\radius,0) node[midway,above] {$q_0$}; \end{scope} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{intersections,decorations.markings} \begin{document} \begin{tikzpicture} \node [style={circle,minimum width=4cm,fill=gray!20},draw=black,name path=A,decoration={markings,mark=at position 0.175 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (0,0) (A) {}; \node [style={circle,minimum width=1.2cm},name path=C] at (A.north east) (B) {}; \filldraw (A) circle (2pt) node [above right] {0} (B) circle (2pt) node [right]{$w$}; \node [above] at (A.north) (annotation) {$z$-contour}; \draw [thick] (annotation.west) edge[out=180,in=120,->] ++(-0.4,-0.6); \node [style={circle,minimum width=4cm,fill=gray!20},draw=black,name path=C,decoration={markings,mark=at position 0.175 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (6cm,0) (C) {}; \node [style={circle,minimum width=1.2cm},name path=D] at (C.north east) (D) {}; \filldraw (C) circle (2pt) node [above right] {0} (D) circle (2pt) node [right]{$w$}; \node [above] at (C.north) (annotation) {$z$-contour}; \draw [thick] (annotation.west) edge[out=180,in=120,->] ++(-0.4,-0.6); \node [style={circle,minimum width=4cm,fill=gray!20},name path=E] at (12cm,0) (E) {}; \node [style={circle,minimum width=1.2cm,fill=gray!20},name path=F,decoration={markings,mark=at position 0.15 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (E.north east) (F) {}; \filldraw (E) circle (2pt) node [above right] {0} (F) circle (2pt) node [right]{$w$}; % intersection points between circles E and F \path [name intersections={of = E and F}]; \coordinate (EF1) at (intersection-1); \coordinate (EF2) at (intersection-2); % calculate angles from center of E/F to intersection points \pgfmathanglebetweenpoints{\pgfpointanchor{E}{center}}{\pgfpointanchor{EF1}{center}} \let\EEFone\pgfmathresult \pgfmathanglebetweenpoints{\pgfpointanchor{E}{center}}{\pgfpointanchor{EF2}{center}} \let\EEFtwo\pgfmathresult \pgfmathanglebetweenpoints{\pgfpointanchor{F}{center}}{\pgfpointanchor{EF1}{center}} \let\FEFone\pgfmathresult \pgfmathanglebetweenpoints{\pgfpointanchor{F}{center}}{\pgfpointanchor{EF2}{center}} \let\FEFtwo\pgfmathresult % draw outline \draw[thick] (EF2) arc[start angle=\FEFtwo-360, end angle=\FEFone,radius=0.6cm] -- (EF1) arc[start angle=\EEFone-360, end angle=\EEFtwo,radius=2cm]; \node [style={circle,minimum width=4cm,fill=gray!20},name path=G] at (18cm,0) (G) {}; \node [style={circle,minimum width=1.2cm,fill=white},name path=H] at (G.north east) (H) {}; \filldraw (G) circle (2pt) node [above right] {0} (H) circle (2pt) node [right]{$w$}; % intersection points between circles G and H \path [name intersections={of = G and H}]; \coordinate (GH1) at (intersection-1); \coordinate (GH2) at (intersection-2); % draw outline \draw[thick,decoration={markings, mark=at position 0.075 with {\arrow[ultra thick]{>}}},postaction={decorate}] (GH2) arc[start angle=\FEFtwo-360, end angle=\FEFone-360,radius=0.6cm] -- (GH1) arc[start angle=\EEFone-360, end angle=\EEFtwo,radius=2cm]; \node [style={circle,minimum width=4cm}] at (22cm,0) (E) {}; \node [style={circle,minimum width=1.2cm,draw=black,fill=gray!20},decoration={markings,mark=at position 0.15 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (E.north east) (F) {}; \filldraw (E) circle (2pt) node [above right] {0} (F) circle (2pt) node [right]{$w$}; {\huge \draw (3cm,0) node {$-$} (9cm,0) node {$\to$} (15cm,0) node {$-$} (21cm,0) node {$=$}; } \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{calc} \def\layersep{3cm} \newcommand\nn[1]{ % Input layer \foreach \y in {1,...,2} \node[neuron, fill=green!40] (i\y-#1) at (0,\y+1) {$i\y$}; % Hidden layer \foreach \y in {1,...,4} \path node[neuron, fill=blue!40] (h\y-#1) at (\layersep,\y) {$h\y$}; % Output node \node[neuron, fill=red!40] (o-#1) at (2*\layersep,2.5) {$o$}; % Connect every node in the input layer with every node in the hidden layer. \foreach \source in {1,...,2} \foreach \dest in {1,...,4} \path (i\source-#1) edge (h\dest-#1); % Connect every node in the hidden layer with the output layer \foreach \source in {1,...,4} \path (h\source-#1) edge (o-#1); } \begin{document} \begin{tikzpicture}[ scale=1.2, shorten >=1pt,->,draw=black!70, node distance=\layersep, neuron/.style={circle,fill=black!25,minimum size=20,inner sep=0}, edge/.style 2 args={pos={(mod(#1+#2,2)+1)*0.33}, font=\tiny}, distro/.style 2 args={ edge={#1}{#2}, node contents={}, minimum size=0.6cm, path picture={\draw[double=orange,white,thick,double distance=1pt,shorten >=0pt] plot[variable=\t,domain=-1:1,samples=51] ({\t},{0.2*exp(-100*(\t-0.05*(#1-1))^2 - 3*\t*#2))});} }, weight/.style 2 args={ edge={#1}{#2}, node contents={\pgfmathparse{0.35*#1-#2*0.15}\pgfmathprintnumber[fixed]{\pgfmathresult}}, fill=white, inner sep=2pt } ] \nn{regular} \begin{scope}[xshift=8cm] \nn{bayes} \end{scope} % Draw weights for all regular edges. \foreach \i in {1,...,2} \foreach \j in {1,...,4} \path (i\i-regular) -- (h\j-regular) node[weight={\i}{\j}]; \foreach \i in {1,...,4} \path (h\i-regular) -- (o-regular) node[weight={\i}{1}]; % Draw distros for all Bayesian edges. \foreach \i in {1,...,2} \foreach \j in {1,...,4} \path (i\i-bayes) -- (h\j-bayes) node[distro={\i}{\j}]; \foreach \i in {1,...,4} \path (h\i-bayes) -- (o-bayes) node[distro={\i}{1}]; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage{circuitikz} \usetikzlibrary{3d,positioning,decorations.markings} \tikzset{ decoration={% markings,% mark=at position 0.05 with {\arrow[black]{stealth};},% mark=at position 0.4 with {\arrow[black]{stealth};},% mark=at position 0.6 with {\arrow[black]{stealth};},% mark=at position 0.95 with {\arrow[black]{stealth};}}, gradient/.style ={bottom color=blue!50, top color=red}, pics/.cd, p charge/.style={code={ \node [fill=orange, shape=circle, inner sep=0pt] (pc) {+}; \draw[thick,->] (pc)--++(0,-0.5); }}, n charge/.style={code={ \node [fill=cyan, shape=circle, inner sep=1pt, scale=1.2] (nc) {-}; \draw[thick,->] (nc)--++(0,-0.5); }}, } \newcommand\heatsink{ \draw[fill=blue] (0,0,0) rectangle ++(6,1.5,0)node[midway,color=white]{heat sink}; \draw[fill=blue] (6,0,0) -- ++(0,1.5,0) -- ++(0,0,-3) -- ++(0,-1.5,0) -- cycle; \draw[fill=blue] (0,1.5,0) -- ++(6,0,0) -- ++(0,0,-3) -- ++(-6,0,0) -- cycle; \draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,10,0); \draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(5,0,0); } \begin{document} \begin{circuitikz}[scale=0.4,font=\sffamily,>=stealth] \begin{scope} % heat sink 1 \heatsink \draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,0,2.6); \fill[gradient,opacity=0.7] (5.5,1.5,-0.2) -- ++(0,10,0) -- ++(0,0,-2.6) -- ++(0,-10,0) -- cycle; \fill[gradient,opacity=0.7] (0.5,1.5,-0.2) rectangle ++(5,10,0)node[midway,draw,circle,white] (N) {N}; \pic[below left=8mm and 3mm] at (N) {n charge}; \pic[below right=7mm and 6mm] at (N) {n charge}; \pic[above left=1cm and 3mm] at (N) {n charge}; \pic[above right=1cm and 5mm] at (N) {n charge}; \end{scope} \begin{scope}[xshift=15cm] % heat sink 2 \heatsink \draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,0,2.6); \fill[gradient,opacity=0.7] (5.5,1.5,-0.2) -- ++(0,10,0) -- ++(0,0,-2.6) -- ++(0,-10,0) -- cycle; \fill[gradient,opacity=0.7] (0.5,1.5,-0.2) rectangle ++(5,10,0)node[midway,draw,circle,white] (P) {P}; \pic[below left=8mm and 3mm] at (P) {p charge}; \pic[below right=7mm and 6mm] at (P) {p charge}; \pic[above left=1cm and 3mm] at (P) {p charge}; \pic[above right=1cm and 5mm] at (P) {p charge}; \end{scope} % heat source \draw[fill=red] (0,11.5,0) rectangle ++(21,1.5,0) node[midway,white] (J) {$J\longrightarrow$}; \draw[fill=red] (21,11.5,0) -- ++(0,1.5,0) -- ++(0,0,-3) -- ++(0,-1.5,0) -- cycle; \draw[fill=red] (0,13,0) -- ++(21,0,0) node[color=white,above right=0 and -5mm,pos=0.5]{heat source} -- ++(0,0,-3) -- ++(-21,0,0) -- cycle; % electric field \node[below=1cm,scale=1.3,align=center] at (11,11.5) {electric\\field}; \draw[thick,-stealth] (6.8,10,-1.5) node[below right=1mm]{+} -- ++(0,-7,0)node[above right=1mm,scale=1.2]{--}; \draw[thick,-stealth] (14.1,3,-1.5) node[above left=1mm]{+} -- ++(0,7,0)node[below left=1mm,scale=1.2]{--}; % resistor \draw[postaction={decorate}] (21,0.75,-1.5) -- ++ (3,0,0) -- ++(0,-3,0) to[R] ++ (-27,0,0) |- (0,0.75,0); \end{circuitikz} \end{document}
\documentclass[tikz,svgnames]{standalone} \usepackage{amsmath,amssymb} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[ thick, font = \scriptsize, circ/.style ={circle, fill = gray, draw = gray, inner sep = 1pt} ] \def\yaxis{2} \draw [<->] (-2, 0) -- (2, 0) node (from)[anchor = west]{$x$}; \draw [<->] (0, -\yaxis) -- (0, \yaxis) node [anchor = south]{$y$}; \draw [->] (from) (2.75,0) --++(0:1.5) node [anchor = south, midway]{$\begin{aligned} z & = S(w) \\ & =\textstyle \frac{w + i}{i w + 1} \end{aligned}$}; \node (CI) at (0, 0) [circ, fill = gray, opacity = 0.1, minimum size = \yaxis cm]{}; \begin{scope}[decoration={ markings, mark=at position 0.25 with {\arrow{>}}, mark=at position 0.75 with {\arrow{>}}} ] \draw[DarkBlue,postaction={decorate}] (0,-1) arc (-90:90:1); \draw[DarkRed,postaction={decorate}] (0,-1) arc (270:90:1); \end{scope} \node [pin={[pin distance=30,inner sep=1pt]20:$w_0 = 0$}] {}; \node at (CI.east) [anchor = north] {$w_1 = 1$}; \node at (CI.south) [anchor = west] {$w_2 = -i$}; \node at (CI.west) [anchor = north] {$w_3 = -1$}; \node at (CI.north) [anchor = south west] {$w_4 = i$}; \node at (CI.110) [anchor = north east, below = 2pt]{$\mathbb{D}^2$}; \foreach \x in {west, center, east, south, north}{ \node [circ] at (CI.\x) {}; }; \begin{scope}[xshift = 7cm] \draw [<->] (-\yaxis, 0) -- (\yaxis, 0) node [anchor = west,text = black]{$u$}; \draw [<->] (0, -\yaxis) -- (0, \yaxis) node [anchor = south] {$v$}; \begin{scope}[decoration={ markings, mark=at position 0.3 with {\arrow{>}}, mark=at position 0.8 with {\arrow{>}}} ] \draw[DarkRed,postaction={decorate}] (0,0) -- (-2,0); \draw[DarkBlue,postaction={decorate}] (0,0) -- (2,0); \end{scope} \node at (0,1) [anchor = west]{$z_0 = i$}; \node at (1,0) [anchor = north]{$z_1 = 1$}; \node [pin={[pin distance=15,inner sep=0pt]130:$z_2 = 0$}] {}; \node at (-1,0) [anchor = north]{$z_3 = -1$}; \node at (0,2) [anchor = west]{$z_4 = +i \infty$}; \node at (0, 1) [circ]{}; \foreach \x in {-1, 0, 1}{ \node at (\x, 0) [circ]{}; } \fill [fill = gray, opacity = 0.1] (-2, 0) rectangle (2, 2); \node at (-2, 2) [anchor = north west]{$\mathbb{H}$}; \end{scope} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{tqft,calc} \begin{document} \begin{tikzpicture}[ every tqft/.append style={ transform shape, rotate=90, tqft/circle x radius=7pt, tqft/boundary separation=1cm, tqft/view from=incoming } ] % cobordism at upper left \pic[ tqft/cylinder to prior, name=a, every incoming lower boundary component/.style={draw}, every outgoing lower boundary component/.style={draw}, cobordism edge/.style={draw}, ]; \pic[ tqft/cup, cobordism edge/.style={draw}, at=(a-outgoing boundary), ]; % annotation of cobordism at upper left \coordinate (temp1) at ($(a-incoming boundary.west)!0.3!(a-outgoing boundary.west) +(0,0.08)$); \coordinate (temp2) at ($(a-incoming boundary.west)!0.7!(a-outgoing boundary.west) +(0,-0.08)$); \draw[dashed] (temp1) node[below] {$\tau_1$} to[bend right=40] ++(0,0.5) (temp2) node[below] {$\tau_2$} to[bend left=40] ++(0,0.5); \draw[->] ($(a-incoming boundary.west) - (0.2,0)$) node[below] {$\sigma$} to[bend left=40] ++(0,0.5); \draw (a-outgoing boundary) ++(0.85,0) node {$+$}; \draw[->] ($(a-incoming boundary.east)+(0.1,0.1)$) to[bend left=13] +(0.9,-0.2); \node[above] at ($(a-incoming boundary.east)+(0.55,0.1)$) {$\tau$}; % cobordism at upper right consisting of two 'pants' and a cup \pic[ tqft/pair of pants, name=b, every incoming lower boundary component/.style={draw}, cobordism edge/.style={draw}, at={($(a-outgoing boundary)+(1.5,0)$)}, ]; \pic[ tqft/reverse pair of pants, name=c, every outgoing lower boundary component/.style={draw}, cobordism edge/.style={draw}, at=(b-outgoing boundary 1), ]; \pic[ tqft/cup, cobordism edge/.style={draw}, at=(c-outgoing boundary), ]; % annotation of cobordism at upper right \draw[->] ($(b-incoming boundary.west) - (0.2,0)$) node[below] {$\sigma$} to[bend left=40] ++(0,0.5); \coordinate (temp1) at ($(b-between outgoing 1 and 2)!0.2!(c-between incoming 1 and 2) +(0,0.72)$); \coordinate (temp2) at ($(b-between outgoing 1 and 2)!0.8!(c-between incoming 1 and 2) +(0,0.72)$); \draw[dashed] (temp1) node[above] {$\tau_1$} to[bend left=40] +(0,-0.51) ++(0,-0.93) to[bend left=40] ++(0,-0.42) (temp2) node[above] {$\tau_2$} to[bend right=40] +(0,-0.51) ++(0,-0.93) to[bend right=40] ++(0,-0.42); \draw[->] ($(b-incoming boundary.east)+(0.1,0.1)$) to[bend right=13] +(0.9,0.25); \node[above] at ($(b-incoming boundary.east)+(0.5,0.2)$) {$\tau$}; % drawing ring \pic[ tqft , name=d, incoming boundary components=0, outgoing boundary components=2, cobordism edge/.style={draw}, anchor=between outgoing 1 and 2, at={($(b-between outgoing 1 and 2)!0!(c-between incoming 1 and 2) - (0,2.5)$)}, ]; \pic[ tqft , name=e, incoming boundary components=2, outgoing boundary components=0, cobordism edge/.style={draw}, at = {(d-outgoing boundary 1)}, ]; \coordinate (temp1) at ($(d-between outgoing 1 and 2)!0.2!(e-between incoming 1 and 2) +(0,0.72)$); \coordinate (temp2) at ($(d-between outgoing 1 and 2)!0.8!(e-between incoming 1 and 2) +(0,0.72)$); \draw[dashed] (temp1) to[bend left=40] +(0,-0.51) ++(0,-0.93) node[below] {$\tau_1$} to[bend left=40] ++(0,-0.42) (temp2) to[bend right=40] +(0,-0.51) ++(0,-0.93) node[below] {$\tau_2$} to[bend right=40] ++(0,-0.42); \coordinate (temp1) at ($(d-between outgoing 1 and 2)!0.5!(e-between incoming 1 and 2)$); \coordinate (temp2) at (a-between first incoming and first outgoing); \draw[->] ($(e-incoming boundary 2)+(-1.1,-0.3)$) node[above left] {$\tau$} to[bend left=30] +(0.7,0.6); \draw [->] ($(d-between outgoing 1 and 2) + (-0.45,0)$) node [below right] {$\sigma$} to[bend left=40] +(0.4,0); \draw (temp1) ++(-0.075,1.5) -- ++(0,-0.4) ++(0.15,0) -- +(0,0.4); % drawing and annotating ball \node[draw, shape=circle, minimum width=1.5cm] at (temp1-|temp2) (circ) {}; \draw[dashed] (circ) +(265:0.75) node[below] {$\tau_2$} to[bend left=15] +(95:0.75); \draw[dashed] (circ) +(295:0.75) to[bend right=40] +(65:0.75) node[right] {$\tau_1$}; \draw[->] (circ) +(220:0.5) to[bend left=20] +(140:0.5); \node[right] at(circ.west) {$\sigma$}; \draw (circ) ++(-0.075,1.5) -- ++(0,-0.4) ++(0.15,0) -- +(0,0.4); \draw[<->] (circ.south west) +(-0.1,0) to[bend left=45] ($(circ.north west)+(-0.1,0)$); \node[left=0.25em] at(circ.west) {$\tau$}; \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{chemformula} % used for \ch and \text \usetikzlibrary{positioning, calc, decorations.pathreplacing} \begin{document} \begin{tikzpicture}[very thick, vertex/.style={draw, circle, minimum size=3ex}] \draw (0,0) coordinate[vertex, fill=teal, label=right:$h_\text{La}$] (h_La) -- ++(-3,-1) coordinate[vertex, fill=blue!60, label=left:$h_\text{O}$] (h_O) -- ++(0,2) coordinate[vertex, fill=orange, label=left:$h_\text{Cu}$] (h_Cu) -- cycle; \node[left=2cm] at ($(h_O)!0.5!(h_Cu)$) (La2CuO4) {\ch{La2CuO4}}; \draw[->] (La2CuO4) -- ++(2cm,0); \draw[ultra thick] (2,-2.5) -- (2,2.5); \begin{scope}[shift={(7,0.75)}] \draw (0,0) coordinate[vertex, fill=teal, label=right:$h_\text{La}^t$] (h_La_t) -- ++(-3,-1) coordinate[vertex, fill=blue!60, label=left:$h_\text{O}^t$] (h_O_t) -- ++(0,2) coordinate[vertex, fill=orange, label=left:$h_\text{Cu}^t$] (h_Cu_t) -- cycle; \draw (6,-2) coordinate[vertex, fill=teal, label=right:$h_\text{La}^{t+1}$] (h_La_tp1) -- ++(-3,-1) coordinate[vertex, fill=blue!60] (h_O_tp1) -- ++(0,2) coordinate[vertex, fill=orange] (h_Cu_tp1) -- cycle; \draw[semithick, decorate, decoration={brace, amplitude=2ex}] ($(h_La_t)-(120:0.3)$) -- ($(h_O_t)-(120:0.3)$) coordinate [vertex, minimum size=2ex, fill=green!70!black, midway, shift={(1.5ex,-4ex)}, label=below:$g(h_\text{La}^t || h_\text{O}^t)$] (g_La_Cu); \draw[semithick, decorate, decoration={brace, amplitude=2ex}] ($(h_Cu_t)+(60:0.3)$) -- ($(h_La_t)+(60:0.3)$) coordinate [vertex, minimum size=2ex, fill=red!90!black, midway, shift={(1.5ex,4ex)}, label=above:$g(h_\text{La}^t || h_\text{Cu}^t)$] (g_La_O); \coordinate[semithick, vertex, minimum size=2ex, fill=yellow, right=1.5 of h_La_t] (alpha); \draw[dashed, ->, shorten <=4, shorten >=4] (g_La_O) edge[bend left] node[midway, above right] {$\alpha_\text{LaCu}$} (alpha); \draw[dashed, ->, shorten <=4, shorten >=4] (g_La_Cu) edge[bend right] node[midway, below right] {$\alpha_\text{LaO}$} (alpha); \node[right=0 of alpha] (plus) {\textbf +}; \draw[->, dashed] (plus) edge[bend left] (h_La_tp1); \end{scope} \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{forest} \usetikzlibrary{fit,positioning} \tikzset{ red arrow/.style={ midway,red,sloped,fill, minimum height=3cm, single arrow, single arrow head extend=.5cm, single arrow head indent=.25cm,xscale=0.3,yscale=0.15, allow upside down }, black arrow/.style 2 args={-stealth, shorten >=#1, shorten <=#2}, black arrow/.default={1mm}{1mm}, tree box/.style={draw, rounded corners, inner sep=0.5em}, node box/.style={white, draw=black, text=black, rectangle, rounded corners}, } \begin{document} \begin{forest} for tree={l sep=3em, s sep=2em, anchor=center, inner sep=0.4em, fill=blue!50, circle, where level=2{no edge}{}} [ Training Data, node box [sample and feature bagging, node box, alias=bagging, above=3em [,red!70,alias=a1[[,alias=a2][]][,red!70,edge label={node[above=1ex,red arrow]{}}[[][]][,red!70,edge label={node[above=1ex,red arrow]{}}[,red!70,edge label={node[below=1ex,red arrow]{}}][,alias=a3]]]] [,red!70,alias=b1[,red!70,edge label={node[below=1ex,red arrow]{}}[[,alias=b2][]][,red!70,edge label={node[above=1ex,red arrow]{}}]][[][[][,alias=b3]]]] [~~~$\dots$~,scale=2,no edge,fill=none,yshift=-3em] [,red!70,alias=c1[[,alias=c2][]][,red!70,edge label={node[above=1ex,red arrow]{}}[,red!70,edge label={node[above=1ex,red arrow]{}}[,alias=c3][,red!70,edge label={node[above=1ex,red arrow]{}}]][,alias=c4]]]] ] \node[tree box, fit=(a1)(a2)(a3)] (t1) {}; \node[tree box, fit=(b1)(b2)(b3)] (t2) {}; \node[tree box, fit=(c1)(c2)(c3)(c4)] (tn) {}; \node[below right=0.5em, inner sep=0pt] at (t1.north west) {Tree 1}; \node[below right=0.5em, inner sep=0pt] at (t2.north west) {Tree 2}; \node[below right=0.5em, inner sep=0pt] at (tn.north west) {Tree $n$}; \path (t1.south west)--(tn.south east) node[midway,below=4em, node box] (mean) {mean in regression or majority vote in classification}; \node[below=3em of mean, node box] (pred) {prediction}; \draw[black arrow={5mm}{4mm}] (bagging) -- (t1.north); \draw[black arrow] (bagging) -- (t2.north); \draw[black arrow={5mm}{4mm}] (bagging) -- (tn.north); \draw[black arrow={5mm}{5mm}] (t1.south) -- (mean); \draw[black arrow] (t2.south) -- (mean); \draw[black arrow={5mm}{5mm}] (tn.south) -- (mean); \draw[black arrow] (mean) -- (pred); \end{forest} \end{document}
\documentclass[tikz,svgnames]{standalone} \usepackage{mathtools} \usetikzlibrary{calc} \renewcommand\vec[1]{\boldsymbol{#1}} \begin{document} \begin{tikzpicture}[ label/.style={black,draw,fill=white,ultra thin}, vector/.style={ultra thick,-latex,DarkBlue} ] \def\xmin{-2} \def\xmax{6} \def\ymin{-2} \def\ymax{6} \def\gridscale{3} \begin{scope} \coordinate (origin) at (0,0); \draw [very thick,->] (\xmin,0) -- (\xmax,0); \draw [very thick,->] (0,\ymin) -- (0,\ymax); \clip [draw] (\xmin,\ymin) rectangle (\xmax,\ymax); \pgftransformcm{1}{0.2}{0.2}{1}{\pgfpoint{0}{0}} \draw[style=help lines,dashed] (\xmin-\xmax,\ymin-\ymax) grid[step=\gridscale] (-\xmin+\xmax,-\ymin+\ymax); \foreach \x in {\xmin,...,\xmax}{ \foreach \y in {\ymin,...,\ymax}{ \node[draw,circle,inner sep=1pt,fill] at (\gridscale*\x,\gridscale*\y) {}; } } \draw [vector] (origin) -- (\gridscale,0) node [label,right=3] {$2 \pi \vec u$}; \draw [vector] (origin) -- (0,\gridscale) node [label,above=3] {$2 \pi \vec v$}; \draw [vector] (origin) -- (\gridscale,\gridscale) node [label,right=3] {$2 \pi (\vec u + \vec v)$}; \filldraw[fill=gray,fill opacity=0.3] (origin) rectangle (\gridscale,\gridscale); \end{scope} \draw [|->,ultra thick] (1.2*\xmax,0) --++(0:0.3*\xmax) node [anchor = south, midway]{$\vec u = (1,0)$}; \begin{scope}[xshift=2*\xmax cm] \coordinate (origin) at (0,0); \draw [very thick,->] (\xmin,0) -- (\xmax,0); \draw [very thick,->] (0,\ymin) -- (0,\ymax); \clip [draw] (\xmin,\ymin) rectangle (\xmax,\ymax); \pgftransformcm{1}{0}{0.2}{1}{\pgfpoint{0}{0}} \draw[style=help lines,dashed] (\xmin-\xmax,\ymin-\ymax) grid[step=\gridscale] (-\xmin+\xmax,-\ymin+\ymax); \foreach \x in {\xmin,...,\xmax}{ \foreach \y in {\ymin,...,\ymax}{ \node[draw,circle,inner sep=1pt,fill] at (\gridscale*\x,\gridscale*\y) {}; } } \draw [vector] (origin) -- (\gridscale,0) node [label,below=3] {$2 \pi$}; \draw [vector] (origin) -- (0,\gridscale) node [label,above=3] {$2 \pi \vec v$}; \draw [vector] (origin) -- (\gridscale,\gridscale) node [label,right=3] {$2 \pi [(1,0) + \vec v]$}; \filldraw[fill=gray,fill opacity=0.3] (origin) rectangle (\gridscale,\gridscale); \end{scope} \end{tikzpicture} \end{document}
\documentclass[border=3pt,tikz]{standalone} \usepackage{mathtools} \usetikzlibrary{decorations.markings} \colorlet{Ecolor}{orange!90!black} \colorlet{pluscolor}{red!60!black} \colorlet{minuscolor}{blue!60!black} \tikzstyle{anode}=[top color=red!20, bottom color=red!50] \tikzstyle{cathode}=[top color=blue!20, bottom color=blue!40] \tikzstyle{charge+}=[very thin,top color=red!50, bottom color=red!80] \tikzstyle{charge-}=[very thin,top color=blue!40, bottom color=blue!70] \tikzset{EFieldLine/.style={ Ecolor, decoration={markings, mark=at position #1 with {\arrow{stealth}}}, postaction={decorate}} } \def\dph{0.3} % dipole height \def\dpw{0.1} % dipole width \def\dipole#1{ \begin{scope}[shift={(#1)}] \draw[charge-] (-\dph,0) to[out=90,in=180] (0,\dpw) -- (0,-\dpw) to[out=180,in=-90] cycle; \draw[charge+] ( \dph,0) to[out=90,in=0] (0,\dpw) -- (0,-\dpw) to[out= 0,in=-90] cycle; \node[scale=0.7] at (-\dph/2,0) {$-$}; \node[scale=0.7] at ( \dph/2,0) {$+$}; \end{scope} } \def\height{5} \def\width{3} \def\platewidth{0.5} \def\dielwidth{0.13*\width} \def\nfieldlines{6} \def\ncharges{7} \begin{document} % capacitor with dipolar polarization \begin{tikzpicture} % dielectric slab \draw[orange!60!black,fill=orange!80!brown!5] (\dielwidth,-0.03*\height) rectangle (\width-\dielwidth,1.03*\height) node[Ecolor, above=3cm, midway] {$\vec E$} node[above, pluscolor] {$+Q_\text{surf}$} node[above, minuscolor] at (1.3*\dielwidth,1.03*\height) {$-Q_\text{surf}$}; % electric field \foreach \i [evaluate={\y=(\i-0.75)*\height/(\nfieldlines-0.5);}] in {1,...,\nfieldlines}{ \draw[EFieldLine={0.54},very thick] (0,\y) --++ (\width,0); } % plates \draw[anode] (0,0) rectangle++ (-\platewidth,\height) node[above, pluscolor] {$+Q_\text{C}$}; \draw[cathode] (\width,0) rectangle++ (\platewidth,\height) node[above, minuscolor] {$-Q_\text{C}$}; \foreach \i [evaluate={\y=(\i-0.5)*\height/\ncharges;}] in {1,...,\ncharges}{ \node[pluscolor] at (-\platewidth/2,\y) {$+$}; \node[minuscolor] at (\width+\platewidth/2,\y) {$-$}; } % dipoles \foreach \i in {0.25, 0.5, 0.75}{ \foreach \j in {1, 3, 5, 7, 9}{ \dipole{\i*\width,0.\j*\height} } } \end{tikzpicture} \end{document}
\documentclass[tikz,svgnames,border={0 2}]{standalone} \usepackage{mathtools} \usetikzlibrary{positioning,arrows,fit} \renewcommand\vec[1]{\boldsymbol{#1}} \begin{document} \begin{tikzpicture}[ box/.style={rectangle,draw,fill=DarkGray!20,node distance=1cm,text width=15em,text centered,rounded corners,minimum height=2em,thick}, arrow/.style={draw,-latex',thick}, ] \node [box] (potential) {$v_{\text{ext},s}(\vec r)=v_\text{H}(\vec r) + v_\text{xc}(\vec r) + v_\text{ext}(\vec r)$}; \node [box,below=0.5 of potential] (hamiltonian) {$\hat{H}_{KS}=-\frac{\hbar^2}{2m}\vec{\nabla}^2 + v_{\text{ext},s}(\vec r)$}; \node [box,below=0.5 of hamiltonian] (se) {$\hat{H}_{KS} \phi_i(\vec r)= E_i \phi_i(\vec r)$}; \node [box,below=0.5 of se] (density) {$\rho(\vec r)=\sum_{i=1}^n f_i\,|\phi_i(\vec r_i)|^2$}; \node [box,below=0.5 of density] (criterion) {Convergence criterion satisfied?}; \path (potential.north west) ++(-1em,1em) coordinate (potential fit) (criterion.south east) ++(1em,-1em) coordinate (criterion fit); \node [box,above=1.5 of potential, fill=orange!30, text width=20em] (initial) {Supply initial density guess $\rho_\text{ini}(\vec r)$ to Kohn Sham equations}; \node [box,below=1.5 of criterion, fill=blue!30, text width=20em] (energy) {Use $\rho_\text{fin}(\vec r)$ to minimize total energy functional $E_{V_\text{ext}}[\rho]=T_{e,s}[\phi_i\{\rho\}] + V_{ee,H}[\rho] + E_{xc}[\rho] + V_{eI}[\rho]$}; \path [arrow] (initial) -- (potential); \path [arrow] (potential) -- (hamiltonian); \path [arrow] (hamiltonian) -- (se); \path [arrow] (se) -- (density); \path [arrow] (density) -- (criterion); \node [rectangle,draw,dashed,inner sep=1em,fit=(potential fit) (criterion fit)] (enclosure) {}; \node [above=-0.8em of enclosure,anchor=south,draw,outer sep=0pt,fill=white] (enclosure label) {\Large\textbf{Kohn-Sham method}}; \path [arrow] (criterion) -- (energy) node [midway,left=0.1,draw,outer sep=0pt,fill=white] (TextNode) {Yes}; \path [draw,thick] (criterion.south) ++(0em,-1em) -- (criterion fit) node [midway,below=0.1,sloped,draw,outer sep=0pt,fill=white] (TextNode) {No}; \draw [arrow] (criterion fit) |- (potential.east); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \tikzset{ canvas/.style={draw,left color=blue!35!black,right color=white}, sign/.style={align=center,fill=white,fill opacity=0.2,text opacity=1,text=white}, axis label/.style={midway,below,sloped} } \def\datapoint(#1,#2,#3)(#4) { \filldraw (#1,#2,#3) -- (#1,#2,0) circle (0.2ex) (#1,#2,#3) -- (0,#2,#3) circle (0.2ex) (#1,#2,#3) -- (#1,0,#3) circle (0.2ex); \shade[ball color=blue!40] (#1,#2,#3) circle (1ex) node[sign,right=1ex] {#4};} \begin{document} \begin{tikzpicture}[font=\sffamily,thick,rotate around y=-17,rotate around z=-8,rotate around x=10] \shade[canvas,shading angle=45] (0,0,0) -- (8,0,0) node[below right,rotate=-20,xslant=0.6] {single} -- (8,0,8) node[right,rotate=-20,xslant=0.6,yshift=1ex] {multiple} node[left,rotate=38,xslant=-0.8,yshift=1ex] {dissimilar} node[sign,shift={(-3ex,6ex)}] {low functional\\redundancy} node[axis label,xslant=-0.5] {functional role} -- (0,0,8) node[axis label,xslant=0.5] {functional response} node[below left,rotate=38,xslant=-0.8] {similar} -- cycle; \shade[canvas,shading angle=225] (0,0,0) -- (0,0,8) node[above left,rotate=40,xslant=0.9] {low} -- (0,8,8) node[axis label,above] {size diversity} node[below left,rotate=40,xslant=0.9] {high} -- (0,8,0) -- cycle; \shade[canvas,shading angle=135] (0,0,0) -- (8,0,0) -- (8,8,0) -- (0,8,0) node[sign,shift={(3ex,-8ex)}] {high functional\\redundancy} -- cycle; \datapoint(4,0.5,6)(DIATOM) \datapoint(5,1,3)(DIAZO) \datapoint(3,1.5,2)(PHAEO) \datapoint(4.5,4,4.5)(COCCO) \datapoint(5.5,7,3.5)(PICO) \fill[opacity=0.2] (8,0,8) to[out=35,in=-120] (8,4,0) to[out=150,in=-40] (0,8,0) to[out=-120,in=50] (0,4,8) to[out=-55,in=165] cycle; \end{tikzpicture} \end{document}
\documentclass[tikz,svgnames]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usetikzlibrary{positioning,decorations.text} \renewcommand{\familydefault}{\sfdefault} \tikzset{ entity/.style={fill=#1!70,text=white,rounded corners,inner sep=1ex,font=\bfseries}, action/.style={->,thick,postaction={decorate,decoration={raise=2pt,text along path,text align=center,text={|\scriptsize|#1}}}}, non-ovs action/.style={->,DarkGray,postaction={decorate,decoration={raise=2pt,text along path,text align=center,text={|\scriptsize\color{DarkGray}|#1}}}}, action/.default= } \begin{document} \begin{tikzpicture}[node distance=2 and 0.1] % Entities \node[entity=DarkBlue] (BV) {Bundesvorstand}; \node[entity=DarkGreen,below=of BV] (SL) {Standortleitung}; \node[entity=DarkOrange,below left=of SL] (SP) {Soziale Partner}; \node[entity=DarkMagenta,below right=of SL] (NHL) {Nachhilfelehrer}; \node[entity=DarkRed,below=4 of SL] (SC) {Schüler}; % Actions % BV to BV \draw[action=erstellen] (BV.north east) to [in=-40,out=40,looseness=5] (BV.south east); \draw[action=editieren,decoration=reverse path] (BV.north west) to [in=220,out=140,looseness=5] (BV.south west); \draw[action=inaktivieren,decoration=reverse path] (BV.50) to [in=130,out=50,looseness=6] (BV.130); % BV to SL \draw[action=erstellen] (BV) to [bend right] (SL); \draw[action=editieren] (BV) to (SL); \draw[action=inaktivieren] (BV) to [bend left] (SL); % SL to SP \draw[action=erstellen,decoration=reverse path] (SL.west) to [bend right] (SP.north); % SP to SL \draw[action=Anfrage stellen] (SP.80) to (SL.190); \draw[action=NH-Ende melden] (SP.65) to [bend right] (SL.195); % SL to NHL \draw[action=inaktivieren] (SL.-10) to [bend right=15] (NHL.110); \draw[action=vermitteln] (SL.-14) to [bend right=35] (NHL.130); \draw[action=erstellen] (SL.-5) to [bend left=15] (NHL.100); % NHL to SL \draw[action=NH-Ende melden,decoration=reverse path] (NHL.north) to [bend right=40] (SL.east); % SP to SC \draw[non-ovs action=Kontakt weitergeben] (SP.south) to [bend right] (SC.west); % SP to NHL \draw[non-ovs action=Treffen vereinbaren] (SP.east) to (NHL.west); % NHL to SC \draw[non-ovs action=Nachhilfe geben,decoration=reverse path] (NHL.south) to [bend left] (SC.east); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{xstring} \usetikzlibrary{fit,positioning} \newcommand\drawNodes[2]{ % #1 (str): namespace % #2 (list[list[str]]): list of labels to print in the node of each neuron \foreach \neurons [count=\lyrIdx] in #2 { \StrCount{\neurons}{,}[\layerLen] % use xstring package to save each layer size into \layerLen macro \foreach \n [count=\nIdx] in \neurons \node[neuron] (#1-\lyrIdx-\nIdx) at (2*\lyrIdx, \layerLen/2-1.4*\nIdx) {\n}; } } \newcommand\denselyConnectNodes[2]{ % #1 (str): namespace % #2 (list[int]): number of nodes in each layer \foreach \n [count=\lyrIdx, remember=\lyrIdx as \previdx, remember=\n as \prevn] in #2 { \foreach \y in {1,...,\n} { \ifnum \lyrIdx > 1 \foreach \x in {1,...,\prevn} \draw[->] (#1-\previdx-\x) -- (#1-\lyrIdx-\y); \fi } } } \begin{document} \begin{tikzpicture}[ shorten >=1pt, shorten <=1pt, neuron/.style={circle, draw, minimum size=4ex, thick}, legend/.style={font=\large\bfseries}, ] % encoder \drawNodes{encoder}{{{,,,,}, {,,,}, {,,}}} \denselyConnectNodes{encoder}{{5, 4, 3}} % decoder \begin{scope}[xshift=11cm] \drawNodes{decoder}{{{,,}, {,,,}, {,,,,}}} \denselyConnectNodes{decoder}{{3, 4, 5}} \end{scope} % mu, sigma, sample nodes \foreach \idx in {1,...,3} { \coordinate[neuron, right=2 of encoder-3-2, yshift=\idx cm,, fill=yellow, fill opacity=0.2] (mu-\idx); \coordinate[neuron, right=2 of encoder-3-2, yshift=-\idx cm, fill=blue, fill opacity=0.1] (sigma-\idx); \coordinate[neuron, right=4 of encoder-3-2, yshift=\idx cm-2cm, fill=green, fill opacity=0.1] (sample-\idx); } % mu, sigma, sample boxes \node [label=$\mu$, fit=(mu-1) (mu-3), draw, fill=yellow, opacity=0.45] (mu) {}; \node [label=$\sigma$, fit=(sigma-1) (sigma-3), draw, fill=blue, opacity=0.3] (sigma) {}; \node [label=sample, fit=(sample-1) (sample-3), draw, fill=green, opacity=0.3] (sample) {}; % mu, sigma, sample connections \draw[->] (mu.east) edge (sample.west) (sigma.east) -- (sample.west); \foreach \a in {1,2,3} \foreach \b in {1,2,3} { \draw[->] (encoder-3-\a) -- (mu-\b); \draw[->] (encoder-3-\a) -- (sigma-\b); \draw[->] (sample-\a) -- (decoder-1-\b); } % input + output labels \foreach \idx in {1,...,5} { \node[left=0 of encoder-1-\idx] {$x_\idx$}; \node[right=0 of decoder-3-\idx] {$\hat x_\idx$}; } \node[above=0.1 of encoder-1-1] {input}; \node[above=0.1 of decoder-3-1] {output}; \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{mathtools} \usetikzlibrary{positioning,arrows} \begin{document} \begin{tikzpicture}[ g/.style={rectangle,draw,rounded corners,minimum height=6em,inner sep=1em,font=\Huge}, w/.style={font=\Huge}, c/.style={node distance=15ex,align=left,font=\huge}, a/.style={draw,-latex',ultra thick} ] \node [w,scale=3] (bra) {(}; \node [node distance=0ex,fill=orange!30,g,right=of bra] (kinetic) {$-\frac{\hbar^2}{2m}\,\vec{\nabla}_{\vec{r}}^2$}; \node [node distance=2ex,w,right=of kinetic] (plus1) {$+$}; \node [node distance=2ex,fill=red!30,g,right=of plus1] (external) {$v_\text{ext}(\vec{r})$}; \node [node distance=2ex,w,right=of external] (plus2) {$+$}; \node [node distance=2ex,fill=red!30,g,right=of plus2] (hartree) {$v_H(\vec{r})$}; \node [node distance=2ex,w,right=of hartree] (plus3) {$+$}; \node [node distance=2ex,fill=red!30,g,right=of plus3] (xc) {$v_{xc}$}; \node [node distance=0ex,w,right=of xc,scale=3] (ket) {)}; \node [node distance=0ex,fill=gray!30,g,right=of ket] (phi1) {$\phi_i(\vec{r})$}; \node [node distance=4ex,w,right=of phi1] (equal) {$=$}; \node [node distance=4ex,fill=blue!30,g,right=of equal] (energy) {$E_i$}; \node [node distance=2ex,fill=gray!30,g,right=of energy] (phi2) {$\phi_i(\vec{r})$}; \node [c,above=of kinetic,xshift=5em] (kinetic comment) {non-rel. Schrödinger equation\\or relativistic Dirac equation}; \node [c,below=of external,xshift=-10em] (external comment) {crystal ions or\\pseudopotential}; \node [c,below=of hartree,xshift=5em] (hartree comment) {Poisson equation\\or Hartree potential}; \node [c,above=of xc,xshift=-11em] (xc comment) {LDA or GGA\\or hybrids}; \node [c,above=of phi1,xshift=5em] (phi comment) {physical orbitals or not\\mesh density and basis set}; \node [c,below=of energy] (energy comment) {band structure\\ or not}; \path [a] (kinetic comment) -- (kinetic.north); \path [a] (external comment) -- (external.south); \path [a] (hartree comment) -- (hartree.south); \path [a] (xc comment) -- (xc.north); \path [a] (phi comment) -- (phi1.north); \path [a] (phi comment) -- (phi2.north); \path [a] (energy comment) -- (energy.south); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{mathtools} \let\Im\relax \DeclareMathOperator{\Im}{Im} \let\Re\relax \DeclareMathOperator{\Re}{Re} \usetikzlibrary{decorations.markings,positioning} \providecommand{\poles}{ \node (poles) at (2.5,1.5) {poles of $h(p_0)$}; \draw[fill] (1.5,3) coordinate [circle,fill,inner sep=1pt,label=right:$p_1$] (p1) (2,-2) coordinate [circle,fill,inner sep=1pt,label=below:$p_2$] (p2) (-3,1) coordinate [circle,fill,inner sep=1pt,label=above:$p_3$] (p3) (-2,-1.5) coordinate [circle,fill,inner sep=1pt,label=above:$p_4$] (p4); \draw[ultra thin,gray] (poles) -- (p1) (poles) -- (p2) (poles.west) -- (p3) (poles) -- (p4); } \providecommand{\polecontours}{ \draw[blue!60!black,decoration={markings,mark=between positions 0.03 and 1.03 step 0.125 with \arrow{<}},postaction={decorate}] (p1) circle (0.5) node [below=0.5] {$C_1$} (p2) circle (0.5) node [below=0.5] {$C_2$} (p3) circle (0.5) node [below=0.5] {$C_3$} (p4) circle (0.5) node [below=0.5] {$C_4$}; } \begin{document} \begin{tikzpicture}[thick] \def\xr{3} \def\yr{3} % Axes \draw [->] (-\xr-1,0) -- (\xr+1,0) node [above left] {$\Re(p_0)$}; \draw [->] (0,-\yr-1) -- (0,\yr+1) node [below left=0.2 and 0] {$\Im(p_0)$}; % Matsubara frequencies \foreach \n in {-\yr,...,-1,1,2,...,\yr}{% \draw[fill] (0,\n) circle (1pt) node [right,font=\footnotesize] {$i \mkern1mu \omega_{_{\n}}$};} \draw[fill] (0,0) circle (1pt) node [above right] {0}; % Contour line \draw[blue!60!black,decoration={markings,mark=between positions 0.125 and 0.875 step 0.25 with \arrow{>}}, postaction={decorate}] circle (\yr+1) node [below right=0.925*\xr and 0.925*\yr] {$C$}; % Poles \poles % Pole contours \polecontours \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usepackage{amsmath} \usetikzlibrary{tqft,calc} \begin{document} \begin{tikzpicture}[ every tqft/.append style={ transform shape, rotate=90, tqft/circle x radius=7pt, tqft/circle y radius=0pt, tqft/boundary separation=1cm } ] % cobordism at upper left \pic[ tqft/cylinder to prior, name=a, every outgoing lower boundary component/.style={draw}, every incoming boundary component/.style={draw}, cobordism edge/.style={draw}, ]; % annotation of cobordism at upper left \coordinate (temp1) at ($(a-incoming boundary.west)!0.3!(a-outgoing boundary.west) +(0,0.08)$); \coordinate (temp2) at ($(a-incoming boundary.west)!0.7!(a-outgoing boundary.west) +(0,-0.08)$); \draw[dashed] (temp1) node[below] {$\tau_1$} -- +(0,0.5) (temp2) node[below] {$\tau_2$} -- +(0,0.5); \draw[->] ($(a-incoming boundary.west) - (0.1,0)$) node[below] {$\sigma$} -- ++(0,0.5); \draw (a-outgoing boundary) ++(0.5,0) node {$+$}; \draw[->] ($(a-incoming boundary.east)+(0.1,0.1)$) to[bend left=13] +(0.9,-0.2); \node[above] at ($(a-incoming boundary.east)+(0.55,0.1)$) {$\tau$}; % cobordism at upper right consisting of two 'pants' \pic[ tqft/pair of pants, name=b, every incoming upper boundary component/.style={draw}, every incoming boundary component/.style={draw}, cobordism edge/.style={draw}, at={($(a-outgoing boundary)+(1,0)$)}, ]; \pic[ tqft/reverse pair of pants, name=c, every outgoing lower boundary component/.style={draw}, % every incoming boundary component/.style={draw}, cobordism edge/.style={draw}, at=(b-outgoing boundary 1), ]; % annotation of cobordism at upper right \draw[->] ($(b-incoming boundary.west) - (0.1,0)$) node[below] {$\sigma$} -- ($(b-incoming boundary.east) - (0.1,0)$); \coordinate (temp1) at ($(b-between outgoing 1 and 2)!0.2!(c-between incoming 1 and 2) +(0,0.72)$); \coordinate (temp2) at ($(b-between outgoing 1 and 2)!0.8!(c-between incoming 1 and 2) +(0,0.72)$); \draw[dashed] (temp1) node[above] {$\tau_1$} -- +(0,-0.51) ++(0,-0.93) -- ++(0,-0.53) (temp2) node[above] {$\tau_2$} -- +(0,-0.51) ++(0,-0.93) -- ++(0,-0.53); \draw[->] ($(b-incoming boundary.east)+(0.1,0.1)$) to[bend right=13] +(0.9,0.25); \node[above] at ($(b-incoming boundary.east)+(0.55,0.1)$) {$\tau$}; % drawing cylinder \path let \p1=(b-between outgoing 1 and 2), \p2=(c-between incoming 1 and 2) in node[name=cyl1, minimum width={\x2-\x1}] at ($(b-outgoing boundary 1)-(0,2.5)$) {} node[name=rec, shape=rectangle, minimum height=1cm, minimum width={\x2-\x1}, anchor=south] at (cyl1) {} node[name=cyl2, shape=ellipse, minimum height=.3cm, minimum width={\x2-\x1}, draw, outer sep=0] at (rec.north) {} ; \draw (cyl1.west) -- (cyl2.west) % left side (cyl1.east) -- (cyl2.east) % right side (cyl1.west) arc(-180:0:0.508cm and 0.15cm); % bottom ellipse % annotating cylinder \draw[<->] ($(cyl2.north east)+(0,0.1)$) to[bend right=15] ($(cyl2.north west)+(0,0.1)$); \node[left] at ($(cyl2.north west)+(0,0.1)$) {$\tau$}; \draw[->] (cyl1.south east) ++ (0.3,0.1) -- ++(0,1.2); \draw (cyl1.south east) ++ (0.3,0.7) node [right] {$\sigma$}; \draw[dashed] ($(cyl1.west)!0.2!(cyl1.east) +(0,-0.12)$) node[below] {$\tau_1$} --($(cyl2.west)!0.2!(cyl2.east) +(0,0.12)$) ($(cyl1.west)!0.8!(cyl1.east) +(0,-0.12)$) node[below] {$\tau_2$} --($(cyl2.west)!0.8!(cyl2.east) +(0,0.12)$); \draw (cyl2) ++(85:0.9) -- +(0,-0.4) (cyl2) ++(95:0.9) -- +(0,-0.4); % drawing and annotating circle \node[draw, shape=circle, minimum width=1cm] at (cyl2.west -| a-between first incoming and first outgoing) (circ) {}; \draw[dashed] (circ) +(155:0.5) -- +(25:0.5) node[right] {$\tau_2$} +(205:0.5) -- +(335:0.5) node[right] {$\tau_1$}; \draw[->] (circ) +(205:0.35) -- +(335:0.35); \node[below=-0.3em] at(circ) {$\sigma$}; \draw (circ) ++(85:0.9) -- +(0,0.4) (circ) ++(95:0.9) -- +(0,0.4); \draw[<->] (circ.south west) +(-0.1,0) to[bend left=45] ($(circ.north west)+(-0.1,0)$); \node[left] at(circ.west) {$\tau$}; \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{positioning} \newcommand{\distro}[4][40]{ \begin{tikzpicture}[thick] \draw[dashed, dash pattern={on 2.3 off 2}] (0, .4) circle (12mm); \draw[blue!60!black, very thick] plot[variable=\t, domain=-1:1, samples=#1] ({\t}, {#2 * exp(-10*(\t)^2) + #3 * exp(-60*(\t-0.6)^2 - \t) + #3 * exp(-60*(\t+0.7)^2 - 0.2) + #4 * 0.5 * exp(-50*(\t+0.3)^2) + #4 * exp(-50*(\t-0.2)^2 + 0.1)}); \draw[solid, ->] (-1, 0)--(1, 0); \draw[solid, ->] (0, -0.5)--(0, 1.25); \end{tikzpicture} } \begin{document} \begin{tikzpicture}[ node distance=2, very thick, flow/.style={shorten >=3, shorten <=3, ->}, znode/.style={circle, fill=black!10, minimum size=22, inner sep=0}, ] \node[znode, draw=red] (z0) {$z_0$}; \node[znode, right=of z0] (z1) {$z_1$}; \draw[flow] (z0) -- node[above, midway] {$f_1(z_0)$} (z1); \node[znode, right=2.5 of z1] (zi) {$z_i$}; \node[znode, right=of zi] (zip1) {$z_{i+1}$}; \draw[flow] (zi) -- node[above, midway] {$f_{i+1}(z_i)$} (zip1); \draw[flow, shorten <=5ex] (z1) -- node[pos=0.16, inner sep=1] {\textbf\dots} node[above, midway] {$f_i(z_{i-1})$} (zi); \node[znode, draw=green!70!black, right=2.5 of zip1] (zk) {$z_k$}; \draw[flow, shorten <=5ex] (zip1) -- node[pos=0.16, inner sep=1] {\textbf\dots} node[above, midway] {$f_k(z_{k-1})$} (zk); \node[right=0 of zk, scale=1.2] {$= x$}; \node[outer sep=0, inner sep=0, below=0.2 of z0, label={below:$z_0 \sim p_0(z_0)$}] (f0) {\distro{1}{0}{0}}; \node[outer sep=0, inner sep=0, below=0.2 of zi, label={below:$z_i \sim p_i(z_i)$}] (fi) {\distro[70]{1}{1}{0}}; \node[outer sep=0, inner sep=0, below=0.2 of zk, label={below:$z_k \sim p_k(z_k)$}] (fk) {\distro[90]{0}{1}{1}}; \end{tikzpicture} \end{document}
% Original TikZ source: https://fleuret.org/git-extract/tex/single-attention.tex % Any copyright is dedicated to the Public Domain. % https://creativecommons.org/publicdomain/zero/1.0 \documentclass[tikz]{standalone} \usepackage{mathtools} \def\transpose{^{\top}} \DeclareMathOperator\softmax{softmax} \DeclareMathOperator\Attention{Attention} \usetikzlibrary{positioning, arrows.meta} \begin{document} \begin{tikzpicture}[ value/.style = { font=\scriptsize, rectangle, draw=black!50, fill=white, thick, inner sep=3pt, inner xsep=2pt, minimum size=10pt, minimum height=20pt }, parameter/.style = { font=\scriptsize, rectangle, draw=black!50, fill=lightblue!15, thick, inner sep=0pt, inner xsep=2pt, minimum size=10pt, minimum height=20pt }, operation/.style = { font=\scriptsize, rectangle, draw=black!50, fill=teal!30, thick, inner sep=3pt, minimum size=10pt, minimum height=20pt }, flow/.style={->,shorten <= 1pt,shorten >= 1pt, draw=black!50, thick}, f2f/.style={draw=black!50, thick}, v2f/.style={{Bar[width=1.5mm]}-,shorten <= 0.75pt,draw=black!50, thick}, f2v/.style={->,shorten >= 0.75pt,draw=black!50, thick} ] \node[font=\bfseries] at (3.5, 2.3) {Single-head attention}; \node at (3.5, -2.5) {$\displaystyle \Attention(Q, K, V) = \softmax_\text{row} \left( \frac{Q K\transpose}{\sqrt{d}} \right) V$}; \node[value, minimum height=0.8cm,minimum width=0.7cm] (K) at (0, 0) {$K$}; \node[value, minimum height=1.2cm,minimum width=0.7cm] (Q) [above=0.5cm of K] {$Q$}; \node[value, minimum height=0.8cm,minimum width=1.0cm] (V) [below=0.5cm of K] {$V$}; \node[operation,minimum height=0.4cm,minimum width=0.4cm] (att) [right=0.5cm of K] {$\cdot\transpose$}; \node[operation,minimum height=0.4cm,minimum width=0.4cm] (sm) [right=0.25cm of att] {$\softmax$}; \node[value, minimum height=1.2cm,minimum width=0.8cm] (A) [right=0.5cm of sm] {$A$}; \node[operation,minimum height=0.4cm,minimum width=0.4cm] (prod) [right=0.5cm of A] {$\cdot$}; \node[value, minimum height=1.2cm,minimum width=1.0cm] (Y) [right=0.5cm of prod] {$Y$}; \draw[v2f,rounded corners=1mm] (K) -- (att); \draw[v2f,rounded corners=1mm] (Q) -| (att); \draw[f2f,rounded corners=1mm] (att) -- (sm); \draw[f2v,rounded corners=1mm] (sm) -- ([xshift=-1pt]A.west); \draw[v2f,rounded corners=1mm] (A) -- (prod); \draw[v2f,rounded corners=1mm] (V) -| (prod); \draw[f2v,rounded corners=1mm] (prod) -- ([xshift=-1pt]Y.west); \draw[very thick,yellow] ([yshift=1pt]Q.north west) -- ([yshift=1pt]Q.north east); \draw[very thick,yellow] ([yshift=1pt]K.north west) -- ([yshift=1pt]K.north east); \draw[very thick,orange] ([yshift=1pt]V.north west) -- ([yshift=1pt]V.north east); \draw[very thick,orange] ([yshift=1pt]Y.north west) -- ([yshift=1pt]Y.north east); \draw[very thick,red] ([xshift=-1pt]V.north west) -- ([xshift=-1pt]V.south west); \draw[very thick,red] ([xshift=-1pt]K.north west) -- ([xshift=-1pt]K.south west); \draw[very thick,cyan] ([xshift=-1pt]Q.north west) -- ([xshift=-1pt]Q.south west); \draw[very thick,cyan] ([xshift=-1pt]Y.north west) -- ([xshift=-1pt]Y.south west); \draw[very thick,cyan] ([xshift=-1pt]A.north west) -- ([xshift=-1pt]A.south west); \draw[very thick,red] ([yshift=1pt]A.north west) -- ([yshift=1pt]A.north east); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \usetikzlibrary{patterns,decorations.markings} \tikzset{ dressed/.style={fill=white,postaction={pattern=north east lines}}, momentum/.style={->,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 <=-1ex} } \def\lrad{1} \def\mrad{0.175*\lrad} \def\srad{0.15*\lrad} \begin{document} % Diagram 1 \begin{tikzpicture} % Loop \draw[loop/.list={{0.125}{1},{0.125*3}{2},{0.125*5}{3},{0.125*7}{4}}] (0,0) circle (\lrad); \draw[dressed] (0,\lrad) circle (\srad) node[above=2pt] {$G_{k,ij}(p_1,p_2)$}; \draw[dressed] (0,-\lrad) circle (\srad) node[below=3pt] {$G_{k,kl}(p_3,p_4)$}; % 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 (-2.1*\lrad,\lrad) (Gkajk) {$\Gamma_{k,ajk}^{(3)}(q_1,p_2,-p_3)$}; \draw[label] (Gkajk.-30) -- (-\lrad,0); \draw[dressed] (-\lrad,0) circle (\mrad); \node at (2.1*\lrad,\lrad) (Gkbli) {$\Gamma_{k,bli}^{(3)}(-q_2,-p_1,p_4)$}; \draw[label] (Gkbli.-150) -- (\lrad,0); \draw[dressed] (\lrad,0) circle (\mrad); \end{tikzpicture} % Diagram 2 \begin{tikzpicture} % Loop \draw[loop/.list={{0}{1},{0.125*4}{2}}] (0,0) circle (\lrad); \draw[dressed] (0,\lrad,0) circle (\srad) node[above=2pt] {$G_{k,ij}(p_1,p_2)$}; % External lines \draw (-2*\lrad,-\lrad) node[left] {$\varphi_a$} -- (2*\lrad,-\lrad) node[right] {$\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,abji}^{(4)}(q_1,-q_2,-p_1,p_2)$}; \end{tikzpicture} \end{document}
\documentclass[border=15pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings} \begin{document} \begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick}] \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=6}] \tikzstyle{damper}=[thick,decoration={markings, mark connection node=dmp, mark=at position 0.5 with { \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=15pt,minimum height=3pt,draw=none] {}; \draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$); \draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$); } }, decorate] \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm] \node (M) [minimum width=3.5cm,minimum height=2cm] {mass, $m$}; \node (ground1) at (M.south) [ground,yshift=-1.5cm,xshift=-1.25cm,anchor=north] {}; \draw (ground1.north west) -- (ground1.north east); \draw [spring] (ground1.north) -- ($(M.south east)!(ground1.north)!(M.south west)$); \node (ground2) at (M.south) [ground,yshift=-1.5cm,anchor=north] {}; \draw (ground2.north west) -- (ground2.north east); \draw [damper] (ground2.north) -- ($(M.south east)!(ground2.north)!(M.south west)$); \node (ground3) at (M.south) [ground,yshift=-1.5cm,xshift=1.25cm,anchor=north] {}; \draw (ground3.north west) -- (ground3.north east); \draw [spring] (ground3.north) -- ($(M.south east)!(ground3.north)!(M.south west)$); \draw [-latex,ultra thick] (M.north) ++(0,0.2cm) -- +(0,1cm); \begin{scope}[xshift=7cm] \node (M) [minimum width=1cm, minimum height=2.5cm] {$m$}; \node (ground) [ground,anchor=north,yshift=-0.25cm,minimum width=1.5cm] at (M.south) {}; \draw (ground.north east) -- (ground.north west); \draw [thick] (M.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm); \node (wall) [ground, rotate=-90, minimum width=3cm,yshift=-3cm] {}; \draw (wall.north east) -- (wall.north west); \draw [spring] (wall.170) -- ($(M.north west)!(wall.170)!(M.south west)$); \draw [damper] (wall.10) -- ($(M.north west)!(wall.10)!(M.south west)$); \draw [-latex,ultra thick] (M.east) ++ (0.2cm,0) -- +(1cm,0); \end{scope} \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage{tikz} \begin{document} \pagestyle{empty} \def\layersep{3cm} \def\nodeinlayersep{1.5cm} \begin{tikzpicture} [ shorten >=1pt,->, draw=black!50, node distance=\layersep, every pin edge/.style={<-,shorten <=1pt}, neuron/.style={circle,fill=black!25,minimum size=17pt,inner sep=0pt}, input neuron/.style={neuron, fill=green!50,}, output neuron/.style={neuron, fill=red!50}, hidden neuron/.style={neuron, fill=blue!50}, annot/.style={text width=4em, text centered}, bias/.style={neuron, fill=yellow!50,minimum size=4em},%<-- added %%% ] % Draw the input layer nodes \foreach \name / \y in {1,...,3} \node[input neuron, pin=left:Input \#\y] (I-\name) at (0,-\y-2.5) {}; % set number of hidden layers \newcommand\Nhidden{2} % Draw the hidden layer nodes \foreach \N in {0,...,\Nhidden} { \foreach \y in {0,...,5} { % <-- added 0 instead of 1 %%%%% \ifnum \y=4 \ifnum \N>0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \node at (\N*\layersep,-\y*\nodeinlayersep) {$\vdots$}; % add dots \else\fi %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \else \ifnum \y=0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifnum \N<3 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \node[bias] (H\N-\y) at (\N*\layersep,-\y*\nodeinlayersep ) {Bias}; %<-- added \else\fi %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \else %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifnum \N>0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%% % print function \node[hidden neuron] (H\N-\y) at (\N*\layersep,-\y*\nodeinlayersep ) {$\frac{1}{1+e^{-x}}$}; %<-- added %%%%%%%%%%% \else\fi %<-- added %%%%%%%%%%%% \fi %<-- added %%%%%%% \fi } \ifnum \N>0 %<-- added %%%%%% % print hidden layer labels at the top \node[annot,above of=H\N-1, node distance=1cm,yshift=2cm] (hl\N) {Hidden layer \N}; % <- added yshift=2cm %%%%%%%%%%%% \else\fi %<-- added %%%%% } % Draw the output layer node and label \node[output neuron,pin={[pin edge={->}]right:Output}, right of=H\Nhidden-3] (O) {}; % Connect bias every node in the input layer with every node in the % hidden layer. \foreach \source in {1,...,3} \foreach \dest in {1,...,3,5} { % \path[yellow] (H-0) edge (H1-\dest); \path[dashed,orange] (H0-0) edge (H1-\dest); %<-- added %%%%% \path[green!50] (I-\source) edge (H1-\dest); % change to green, yellow gets blended }; % connect all hidden stuff \foreach [remember=\N as \lastN (initially 1)] \N in {2,...,\Nhidden} \foreach \source in {0,...,3,5} \foreach \dest in {1,...,3,5}{ \ifnum \source=0 %<-- added %%%%%%%%%%%%%%%%%%%%%%% \path[dashed,red](H\lastN-\source) edge (H\N-\dest);%<-- added \else %<-- added %%% \path[blue!50] (H\lastN-\source) edge (H\N-\dest);%<-- added \fi %<-- added %%% }; %<-- added %%%% % Connect every node in the hidden layer with the output layer \foreach \source in {1,...,3,5} \path[green!50] (H\Nhidden-\source) edge (O); \path[dashed,red] (H2-0) edge (O); %<-- added %%%% % Annotate the input and output layers \node[annot,left of=hl1] {Input layer}; \node[annot,right of=hl\Nhidden] {Output layer}; \end{tikzpicture} % End of code \end{document}
\documentclass[margin=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta}% Unecessary (only for the second example) \tikzset{ timeline/.style={-latex}% ,timeline style/.style={timeline/.append style={#1}}% ,year label/.style={below}% ,year label style/.style={year label/.append style={#1}}% ,year tick/.style={tick size=5pt}% ,year tick style/.style={year tick/.append style={#1}}% ,minor tick/.style={tick size=2pt, very thin}% ,minor tick style/.style={minor tick/.append style={#1}}% ,tick size/.code={\def\ticksize{#1}}% ,labeled years step/.code={\def\yearlabelstep{#1}}% ,minor tick step/.code={\def\minortickstep{#1}}% ,year tick step/.code={\def\yeartickstep{#1}}% ,enlarge timeline/.code={\def\enlarge{#1}} } \newcommand*{\drawtimeline}[4][]{% \def\fromyear{#2}% \def\toyear{#3}% \def\timelinesize{#4}% \pgfmathsetmacro{\timelinesizept}{\timelinesize} \begin{scope}[x=1pt, y=1pt, % Change main units to pt labeled years step=1,% Set some defaults minor tick step=0.25,% enlarge timeline=1.05,% year tick step=1,#1] \pgfmathsetmacro{\yearticksep}{\timelinesize/((\toyear-\fromyear)/\yeartickstep)} \pgfmathsetmacro{\minorticksep}{\timelinesize/((\toyear-\fromyear)/\minortickstep)} \pgfmathsetmacro{\minorticklast}{\minorticksep/\minortickstep)} \foreach \y[remember=\y as \lasty (initially 0), count=\i from \fromyear] in {0,\yearticksep,...,\timelinesizept}{ \coordinate (Y-\i) at (\y,0); \draw[year tick] (\y,-\ticksize/2) -- ++(0,\ticksize); \ifnum\i=\toyear\breakforeach\else \foreach \q[count=\j from 0] in {0,\minorticksep,...,\minorticklast}{ \coordinate (Y-\i-\j) at (\q+\y,0); \draw[minor tick] (\q+\y,-\ticksize/2) -- ++(0,\ticksize); };\fi }; \pgfmathsetmacro{\nextyear}{int(\fromyear+\yearlabelstep)} \foreach \y in {\fromyear,\nextyear,...,\toyear} \node[year label] at (Y-\y) {\y}; \draw[timeline] (0,0) -- +(\enlarge*\timelinesizept,0);% Timeline \end{scope}% } \begin{document} \begin{tikzpicture}[event/.style={very thick, solid, line cap=round}] \drawtimeline[% gray, timeline style={thick}, labeled years step=6, minor tick step=0.25]{2002}{2016}{10cm}; \drawtimeline[ yshift=-2cm, labeled years step=2, timeline style={-stealth, shorten <=-5pt, very thick}, year tick style={{Triangle[reversed, scale=0.75]}-, tick size=5pt, yshift=2.5pt}, minor tick style={tick size=2pt, yshift=1pt}, year label style={anchor=west, rotate=60, outer sep=2pt, yshift=4pt}]{2002}{2016}{10cm}; \draw[event, red] (Y-2002-2) -- (Y-2003); \end{tikzpicture} \end{document}
% Author: Izaak Neutelings (June 2017) % taken from https://tex.stackexchange.com/questions/159445/draw-in-cylindrical-and-spherical-coordinates \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \tikzset{>=latex} % for LaTeX arrow head %% split figures into pages %\usepackage[active,tightpage]{preview} %\PreviewEnvironment{tikzpicture} %\setlength\PreviewBorder{1pt}% \begin{document} % 3D axis with spherical coordinates \tdplotsetmaincoords{60}{110} \begin{tikzpicture}[scale=3,tdplot_main_coords] % variables \def\rvec{.8} \def\thetavec{30} \def\phivec{60} % axes \coordinate (O) at (0,0,0); \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$}; \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$}; \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$}; % vectors \tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec} \draw[-stealth,red] (O) -- (P) node[above right] {$P$}; \draw[dashed,red] (O) -- (Pxy); \draw[dashed,red] (P) -- (Pxy); \draw[dashed,red] (Py) -- (Pxy); % arcs \tdplotdrawarc[->]{(O)}{0.2}{0}{\phivec} {anchor=north}{$\phi$} \tdplotsetthetaplanecoords{\phivec} \tdplotdrawarc[->,tdplot_rotated_coords]{(0,0,0)}{0.5}{0}{\thetavec} {anchor=south west}{$\theta$} \end{tikzpicture} % CMS conventional coordinate system with LHC and other detectors \tdplotsetmaincoords{75}{50} % to reset previous setting \begin{tikzpicture}[scale=2.7,tdplot_main_coords,rotate around x=90] % variables \def\rvec{1.2} \def\thetavec{40} \def\phivec{70} \def\R{1.1} \def\w{0.3} % axes \coordinate (O) at (0,0,0); \draw[thick,->] (0,0,0) -- (1,0,0) node[below left]{$x$}; \draw[thick,->] (0,0,0) -- (0,1,0) node[below right]{$y$}; \draw[thick,->] (0,0,0) -- (0,0,1) node[below right]{$z$}; \tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec} % vectors \draw[->,red] (O) -- (P) node[above left] {$P$}; \draw[dashed,red] (O) -- (Pxy); \draw[dashed,red] (P) -- (Pxy); \draw[dashed,red] (Py) -- (Pxy); % circle - LHC \tdplotdrawarc[thick,rotate around x=90,black!70!blue]{(\R,0,0)}{\R}{0}{360}{}{} % compass - the line between CMS and ATLAS has a ~12° declination (http://googlecompass.com) \begin{scope}[shift={(1.1*\R,0,1.65*\R)},rotate around y=12] \draw[<->,black!50] (-\w,0,0) -- (\w,0,0); \draw[<->,black!50] (0,0,-\w) -- (0,0,\w); \node[above left,black!50,scale=0.6] at (-\w,0,0) {N}; \end{scope} % nodes \node[left,align=center] at (0,0,1.1) {Jura}; \node[right] at (\R,0,0) {LHC}; \fill[radius=0.8pt,black!20!red] (O) circle node[left=4pt,below=2pt] {CMS}; \draw[thick] (0.02,0,0) -- (0.5,0,0); % partially overdraw x-axis and CMS point \fill[radius=0.8pt,black!20!blue] (2*\R,0,0) circle node[right=4pt,below=2pt,scale=0.9] {ATLAS}; \fill[radius=0.8pt,black!10!orange] ({\R*sqrt(2)/2+\R},0,{ \R*sqrt(2)/2}) circle node[left=2pt,below=2pt,scale=0.8] {ALICE}; \fill[radius=0.8pt,black!60!green] ({\R*sqrt(2)/2+\R},0,{-\R*sqrt(2)/2}) circle node[below=2pt,right=2pt,scale=0.8] {LHCb}; % arcs \tdplotdrawarc[->]{(O)}{0.2}{0}{\phivec} {above=2pt,right=-1pt,anchor=mid west}{$\phi$} \tdplotdrawarc[->,rotate around z=\phivec-90,rotate around y=-90]{(0,0,0)}{0.5}{0}{\thetavec} {anchor=mid east}{$\theta$} \end{tikzpicture} \end{document}
\documentclass[tikz,border=10pt]{standalone} %%%< \usepackage{verbatim} %%%> \begin{comment} :Title: Perpendicular bisectors of a triangle :Tags: Coordinate calculations;Foreach;Mathematical engine;Geometry;Mathematics :Author: Sam Britt :Slug: bisector A perpendicular bisector of a line segment is a line which is perpendicular to this line and passes through its midpoint. This drawing shows perpendicular bisectors of a triangle. They meet in the center of the circumcircle of the triangle. This example was written by Sam Britt answering a question on TeX.SE. \end{comment} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} [ scale=3, >=stealth, point/.style = {draw, circle, fill = black, inner sep = 1pt}, dot/.style = {draw, circle, fill = black, inner sep = .2pt}, ] % the circle \def\rad{1} \node (origin) at (0,0) [point, label = {below right:$P_c$}]{}; \draw (origin) circle (\rad); % triangle nodes: just points on the circle \node (n1) at +(60:\rad) [point, label = above:$1$] {}; \node (n2) at +(-145:\rad) [point, label = below:$2$] {}; \node (n3) at +(-45:\rad) [point, label = {below right:$3$ $(0, 0, 0)$}] {}; % triangle edges: connect the vertices, and leave a node at the midpoint \draw[->] (n3) -- node (a) [label = {above right:$\vec{v}_1$}] {} (n1); \draw[->] (n3) -- node (b) [label = {below right:$\vec{v}_2$}] {} (n2); \draw[dashed] (n2) -- (n1); % Bisectors % start at the point lying on the line from (origin) to (a), at % twice that distance, and then draw a path going to the point on % the line lying on the line from (a) to the (origin), at 3 times % that distance. \draw[dotted] ($ (origin) ! 2 ! (a) $) node [right] {Bisector 1} -- ($(a) ! 3 ! (origin)$ ); % similarly for origin and b \draw[dotted] ($ (origin) ! 2 ! (b) $) -- ($(b) ! 3 ! (origin)$ ) node [right] {Bisector 2}; % short vectors \draw[->] ($ (origin) ! -.7 ! (a) $) -- node [below] {$\vec{u}_4$} ($ (origin) ! -.1 ! (a) $); \draw[->] ($ (origin) ! -.1 ! (b) $) -- node [right] {$\vec{u}_3$} ($ (origin) ! -.7 ! (b) $); % Right angle symbols \def\ralen{.5ex} % length of the short segment \foreach \inter/\first/\last in {a/n3/origin, b/n2/origin} { \draw let \p1 = ($(\inter)!\ralen!(\first)$), % point along first path \p2 = ($(\inter)!\ralen!(\last)$), % point along second path \p3 = ($(\p1)+(\p2)-(\inter)$) % corner point in (\p1) -- (\p3) -- (\p2) % path ($(\inter)!.5!(\p3)$) node [dot] {}; % center dot } \end{tikzpicture} \end{document}
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows.meta, positioning} \tikzset{ red-rounded-rectangle/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, align=center}, green-rounded-rectangle/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=green!30, align=center}, blue-rounded-rectangle/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=blue!30, align=center}, } \begin{document} \begin{tikzpicture}[node distance=0.5cm, >/.tip=Latex, thick] \node (scotus) [green-rounded-rectangle, text width = 10cm]{ {\Huge \textbf{The Supreme Court}} }; \node (state) [green-rounded-rectangle, right = of scotus, text width=4cm]{ {\large \textbf{State Supreme Court}}\\ Highest Law of the State }; \node (state-appeals) [red-rounded-rectangle, below = of state, text width = 4cm]{ {\large \textbf{State Court of Appeals}}\\ Hears Appeals from Trials on a Case-By-Case basis. }; \node (12-appeals) [red-rounded-rectangle, left=of state-appeals -| scotus, text width = 4cm] { {\large \textbf{12 Federal Courts of Appeals}}\\ Hears Appeals from lower courts. Geographically distributed. }; \node (94-district) [blue-rounded-rectangle, below = of 12-appeals,, text width=4cm]{ {\large \textbf{94 District Courts}}\\ Hears cases and deals verdicts. \textit{Judge Judy} except federal. }; \node (court-appeals) [red-rounded-rectangle, right = of scotus |- state-appeals, text width=4cm]{ {\large \textbf{Court of Appeals for the Federal Circuit}}\\ Hears special federal appeals. (e.g. patents) }; \node (legis-courts) [blue-rounded-rectangle, below= of court-appeals, text width = 4cm]{ {\large \textbf{Legislative Courts}}\\ Weaker Courts created by Congress. (E.g. \textit{Court of Military Appeals}) }; \node (trial-court) [blue-rounded-rectangle, below = of state-appeals, text width=4cm]{ {\large \textbf{Trial Court}}\\ Your typical \textit{Judge Judy} case. Hears either criminal or civil cases, and deals verdicts. }; \draw [->] (trial-court) edge (state-appeals) (state-appeals) edge (state) (state) edge (scotus) (legis-courts) edge (court-appeals) (court-appeals) edge (scotus.south -| court-appeals) (94-district) edge (12-appeals) (12-appeals) -- (12-appeals |- scotus.south) ; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{mindmap,trees} \begin{document} \resizebox{!}{4 in}{% \begin{tikzpicture} \path[ mindmap, concept color=black, text=white, grow cyclic, segment length=20cm, level 1/.append style={level distance=8cm,sibling angle=60}, level 2/.append style={level distance=2.5cm}, ] node[concept] {Main} [clockwise from=0] child[concept color=green!50!black] {% node[concept] {A} [clockwise from=30] child {node[concept] {A1} } child {node[concept] {A2} } child {node[concept] {A3} } child {node[concept] {A4} } child {node[concept] {A5} } child {node[concept] {A6} } } child[concept color=blue] {% node[concept] {B} [clockwise from=30] child {node[concept] {B1} } child {node[concept] {B2} } child {node[concept] {B3} } child {node[concept] {B4} } child {node[concept] {B5} } child {node[concept] {B6} } } child[concept color=red] {% node[concept] {C} [clockwise from=30] child {node[concept] {C1} } child {node[concept] {C2} } child {node[concept] {C3} } child {node[concept] {C4} } child {node[concept] {C5} } child {node[concept] {C6} } } child[concept color=orange] {% node[concept] {D} [clockwise from=30] child {node[concept] {D1} } child {node[concept] {D2} } child {node[concept] {D3} } child {node[concept] {D4} } child {node[concept] {D5} } child {node[concept] {D6} } } child[concept color=magenta] {% node[concept] {E} [clockwise from=30] child {node[concept] {E1} } child {node[concept] {E2} } child {node[concept] {E3} } child {node[concept] {E4} } child {node[concept] {E5} } child {node[concept] {E6} } } child[concept color=brown] {% node[concept] {F} [clockwise from=30] child {node[concept] {F1} } child {node[concept] {F2} } child {node[concept] {F3} } child {node[concept] {F4} } child {node[concept] {F5} } child {node[concept] {F6} } }; \end{tikzpicture} } \end{document}
\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usepackage{verbatim} \begin{comment} :Title: Radix-2 FFT signal flow :Slug: radix2fft :Tags: Foreach Radix-2 signal flow graph for a 16 point fast Fourier transform (FFT). This diagram is quite complex. However, the most difficult part is keeping track of all the indexes. The ``foreach`` command is used extensively to get compact code. | Source: The diagram was inspired by content on `this web page`__. .. __: http://www.ece.uvic.ca/499/2004a/group05/html/background.html \end{comment} \begin{document} \pagestyle{empty} \tikzstyle{n}= [circle, fill, minimum size=4pt,inner sep=0pt, outer sep=0pt] \tikzstyle{mul} = [circle,draw,inner sep=-1pt] % Define two helper counters \newcounter{x}\newcounter{y} \begin{tikzpicture}[yscale=0.5, xscale=1.2, node distance=0.3cm, auto] % The strategy is to create nodes with names: N-column-row % Input nodes are named N-0-0 ... N-0-15 % Output nodes are named N-10-0 ... N-10-15 % Draw inputs \foreach \y in {0,...,15} \node[n, pin={[pin edge={latex'-,black}]left:$x(\y)$}] (N-0-\y) at (0,-\y) {}; % Draw outputs \foreach \y / \idx in {0/0,1/8,2/4,3/12,4/2,5/10,6,7/14, 8/1,9,10/5,11/13,12/3,13/11,14/7,15} \node[n, pin={[pin edge={-latex',black}]right:$X(\idx)$}] (N-10-\y) at (7,-\y) {}; % draw connector nodes \foreach \y in {0,...,15} \foreach \x / \c in {1/1,2/3,3/4,4/6,5/7,6/9} \node[n, name=N-\c-\y] at (\x,-\y) {}; % draw x nodes \foreach \y in {0,...,15} \foreach \x / \c in {1/2,4/5,7/8} \node[mul, right of=N-\x-\y] (N-\c-\y) {${\times}$}; % horizontal connections % Note the use of simple counter arithmetics to get correct % indexes. \foreach \y in {0,...,15} \foreach \x in {0,1,3,4,6,7,9} { \setcounter{x}{\x}\stepcounter{x} \path (N-\x-\y) edge[-] (N-\arabic{x}-\y); } % Draw the W_16 coefficients \setcounter{y}{0} \foreach \i / \j in {0/0,1/0,2/0,3/0,4/0,5/0,6/0,7/0, 0/1,1/1,2/1,3/1,4/1,5/1,6/1,7/1} { \path (N-2-\arabic{y}) edge[-] node {\tiny $W^{\i\cdot\j}_{16}$} (N-3-\arabic{y}); \stepcounter{y} } % Draw the W_8 coefficients \setcounter{y}{0} \foreach \i / \j in {0/0,1/0,2/0,3/0,0/1,1/1,2/1,3/1, 0/0,1/0,2/0,3/0,0/1,1/1,2/1,3/1} { \path (N-5-\arabic{y}) edge[-] node {\tiny $W^{\i\cdot\j}_{8}$} (N-6-\arabic{y}); \addtocounter{y}{1} } % Draw the W_4 coefficients \setcounter{y}{0} \foreach \i / \j in {0/0,1/0,0/1,1/1,0/0,1/0,0/1,1/1, 0/0,1/0,0/1,1/1,0/0,1/0,0/1,1/1} { \path (N-8-\arabic{y}) edge[-] node {\tiny $W^{\i\cdot\j}_{4}$} (N-9-\arabic{y}); \stepcounter{y} } % Connect nodes \foreach \sourcey / \desty in {0/8,1/9,2/10,3/11, 4/12,5/13,6/14,7/15, 8/0,9/1,10/2,11/3, 12/4,13/5,14/6,15/7} \path (N-0-\sourcey.east) edge[-] (N-1-\desty.west); \foreach \sourcey / \desty in {0/4,1/5,2/6,3/7, 4/0,5/1,6/2,7/3, 8/12,9/13,10/14,11/15, 12/8,13/9,14/10,15/11} \path (N-3-\sourcey.east) edge[-] (N-4-\desty.west); \foreach \sourcey / \desty in {0/2,1/3,2/0,3/1, 4/6,5/7,6/4,7/5, 8/10,9/11,10/8,11/9, 12/14,13/15,14/12,15/13} \path (N-6-\sourcey.east) edge[-] (N-7-\desty.west); \foreach \sourcey / \desty in {0/1,1/0,2/3,3/2, 4/5,5/4,6/7,7/6, 8/9,9/8,10/11,11/10, 12/13,13/12,14/15,15/14} \path (N-9-\sourcey.east) edge[-] (N-10-\desty.west); \end{tikzpicture} \end{document}
\documentclass[tikz,border=10pt]{standalone} %%%< \usepackage{verbatim} %%%> \begin{comment} :Title: Linear regression :Tags: Foreach;Plotting;Plots;Mathematics :Author: Henri Menke :Slug: linear-regression This is an illustration of linear regression. This example was written by Henri Menke on TeXwelt.de. http://texwelt.de/wissen/fragen/4912/skizze-zur-illustration-linearer-regression An animated version can be found there in addition. \end{comment} \usetikzlibrary{arrows,intersections} \begin{document} \begin{tikzpicture}[ thick, >=stealth', dot/.style = { draw, fill = white, circle, inner sep = 0pt, minimum size = 4pt } ] \coordinate (O) at (0,0); \draw[->] (-0.3,0) -- (8,0) coordinate[label = {below:$x$}] (xmax); \draw[->] (0,-0.3) -- (0,5) coordinate[label = {right:$f(x)$}] (ymax); \path[name path=x] (0.3,0.5) -- (6.7,4.7); \path[name path=y] plot[smooth] coordinates {(-0.3,2) (2,1.5) (4,2.8) (6,5)}; \scope[name intersections = {of = x and y, name = i}] \fill[gray!20] (i-1) -- (i-2 |- i-1) -- (i-2) -- cycle; \draw (0.3,0.5) -- (6.7,4.7) node[pos=0.8, below right] {Sekante}; \draw[red] plot[smooth] coordinates {(-0.3,2) (2,1.5) (4,2.8) (6,5)}; \draw (i-1) node[dot, label = {above:$P$}] (i-1) {} -- node[left] {$f(x_0)$} (i-1 |- O) node[dot, label = {below:$x_0$}] {}; \path (i-2) node[dot, label = {above:$Q$}] (i-2) {} -- (i-2 |- i-1) node[dot] (i-12) {}; \draw (i-12) -- (i-12 |- O) node[dot, label = {below:$x_0 + \varepsilon$}] {}; \draw[blue, <->] (i-2) -- node[right] {$f(x_0 + \varepsilon) - f(x_0)$} (i-12); \draw[blue, <->] (i-1) -- node[below] {$\varepsilon$} (i-12); \path (i-1 |- O) -- node[below] {$\varepsilon$} (i-2 |- O); \draw[gray] (i-2) -- (i-2 -| xmax); \draw[gray, <->] ([xshift = -0.5cm]i-2 -| xmax) -- node[fill = white] {$f(x_0 + \varepsilon)$} ([xshift = -0.5cm]xmax); \endscope \end{tikzpicture} \end{document}
\documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,calc,decorations.pathmorphing,positioning,decorations.markings} \tikzset{ % build the shaded rectangle shadedrec/.style={ rectangle, draw=black, top color=gray, % this is part of the shade bottom color=white, % this is part of the shade shading angle={135}, % this is part of the shade text width=3cm, inner sep=1em, rounded corners=1.2ex, very thick, text centered}, snake arrow/.style={ decorate, decoration={zigzag,amplitude=3mm,segment length=5mm,post length=0mm}}, damper/.style={ very thick, decoration={markings, mark connection node=dmp, mark=at position 0.5 with { \node (dmp) [very thick,transform shape,text width=.3cm,rotate=-90,minimum height=3pt,draw=none, fill=black,outer xsep=2pt, outer ysep=1pt] {}; \draw [very thick] ($(dmp.north east)+(-.6pt,0)$) -- ($(dmp.south east)+(-.6pt,0)$) -- ($(dmp.south west)+(-.6pt,0)$) -- ($(dmp.north west)+(-.6pt,0)$); \draw [very thick,rotate=-90] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$); } }, decorate} } \begin{document} \pagestyle{empty} \begin{tikzpicture} % Shapes \node[shadedrec, anchor=center] (S1) at (4,3) {$M$}; \node[shadedrec, anchor=center, below=2 of S1] (S2) {$m$}; %Nodes side \node[anchor=center,text centered,right=2cm of S1.east] (sm) {Sprung mass}; \node[below=of sm] (susp) {Suspension}; \node[below=of susp] (usm) {Unsprung mass}; \node[below=of usm] {Tire}; % Paths %side arrows \draw[->,very thick] (S1.west) -- ++ (-1.5,0) -- ++ (0,-1.5) node[below] {$Z$}; \draw[->,very thick] (S2.west) -- ++ (-1.5,0) -- ++ (0,-1.5) node[below] {$Z_u$}; %zigzag lines \draw[very thick, snake arrow] ($(S1.south west)!.5!(S1.south)$) -- ++ (0,-2) node[left,midway,xshift=-1em] {$K_s$}; \draw[very thick, snake arrow] (S2.south) -- ++ (0,-2) node[left,midway,xshift=-1em] {$K_t$}; %Connector shape \draw[damper] ($(S2.north east)!.5!(S2.north)$) -- ($(S1.south east)!.5!(S1.south)$) node[right,midway,xshift=1em] {$C_s$}; % Road \coordinate (A) at ($(S2.west)+(5.5,-2.45)$); \draw[->,very thick] (A) -- ++(-7,0) -- ++ (0,-1.5) node[below] {$Z_r$}; \begin{scope}[shift={($(S2.west)+(-1.5,-2.45)$)}] \foreach \x in {0.5,1,...,7} { %This one draws the little diagonal lines \draw (\x,0) -- ({\x-.5},-.5); } \end{scope} \end{tikzpicture} \end{document}
% How to break text lines: https://tex.stackexchange.com/a/124114/173708 % Author: Izaak Neutelings (September 2018) \documentclass[border=3pt,tikz]{standalone} \usepackage{amsmath} % for \; \usepackage{tikz} \usepackage{xcolor} \colorlet{myblue}{blue!70!black} \colorlet{mylightblue}{blue!10} \tikzset{>=latex} % for LaTeX arrow head \begin{document} \begin{tikzpicture}[yscale=0.8,anchor=west] % FIRST COLUMN \node[anchor=west,draw=myblue,fill=mylightblue,thick,rounded corners=4,inner sep=1.5pt] (L) at (0,4) {\;\strut$qq\nu\nu$\;}; \node (L1) at (0.5,3) {\strut$jj\nu\nu$}; \node (L2) at (-1.5,2) [draw, text width=1cm] {common text}; % break a line in two \node (L3) at (0.5,1) {\strut tt$\nu\nu$}; \draw[->,myblue,thick] (L.south west) ++ (0.18,0) |- (L1.west); \draw[->,myblue,thick] (L.south west) ++ (0.18,0) |- (L2.east); \draw[->,myblue,thick] (L.south west) ++ (0.18,0) |- (L3.west); % SECOND COLUMN \begin{scope}[shift={(2.5,0)}] \node[draw=myblue,fill=mylightblue,thick,rounded corners=4,inner sep=1.5pt] (M) at (0,4) {\;\strut$qq\ell\ell$\;}; \node (M1) at (0.5,3) {\strut$jj\mu\mu$}; \node (M2) at (0.5,2) {\strut bb$\tau\tau$, b$\tau\tau$}; \node (M3) at (0.5,1) {\strut tt$\tau\tau$}; \draw[->,myblue,thick] (M.south west)++(0.18,0) |- (M1.west); \draw[->,myblue,thick] (M.south west)++(0.18,0) |- (M2.west); \draw[->,myblue,thick] (M.south west)++(0.18,0) |- (M3.west); \end{scope} % THIRD COLUMN \begin{scope}[shift={(5.0,0)}] \node[draw=myblue,fill=mylightblue,thick,rounded corners=4,inner sep=1.5pt] (R) at (0,4) {\;\strut$qq\ell\nu$\;}; \node (R1) at (0.5,3) {\strut$jj\mu\nu$}; \draw[->,myblue,thick] (R.south west)++(0.18,0) |- (R1.west); \end{scope} \end{tikzpicture} \end{document}
\documentclass[margin=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc, positioning} \tikzset{ basic/.style={draw=black,fill=white,thick,rectangle,rounded corners=20pt, align=center}, HeatEx/.style={draw=black,fill=white,thick,circle,minimum width=1cm}, Tank/.style={basic, minimum width=1.5cm,minimum height=3cm,text width=1.5cm}, 3Phase/.style={basic, minimum width=4cm,minimum height=1.5cm,text width=4cm}, Reactor/.style={basic, ultra thick,minimum width=1.5cm,minimum height=4cm,text width=1.5cm}, } \newcommand{\COOLER}[3]{ \node[HeatEx,right=#1 of #2](#3){}; \draw[thick,-latex] ($(#3.south east)+(3mm,0)$) to[out=170,in=-20] ($(#3.north west)+(-3mm,0)$); } \newcommand{\HEATER}[4]{ \node[HeatEx,below right=#1 and #2 of #3](#4){}; \draw[thick,-latex] ($(#4.north east)+(3mm,0)$) to[out=200,in=20] ($(#4.south west)+(-3mm,0)$); } \newcommand{\TANK}[4]{ \node[Tank,right=#1 of #2](#3){#4}; } \newcommand{\ThreeSEP}[5]{ \node[3Phase,right=#1 of #2](#3){#4}; \draw[thick] (#3.south) to[out=-90,in=-90, looseness=2] node[midway] (sman) {} ($(#3.south)!.5!(#3.south east)$); \draw[thick,->] (sman.center) --++ (0,-1cm) -- (#5); } \newcommand{\REACTOR}[5]{ \node[Reactor,below right=#1 and #2 of #3](#4){#5}; } \begin{document} \begin{tikzpicture} \node (START) {Text}; \TANK{1cm}{START}{F1}{Tanks} \node[below right=of F1] (W1) {Text}; \COOLER{1cm}{F1}{C1} \REACTOR{1cm}{1cm}{C1}{R1}{Reactor} \HEATER{1cm}{1cm}{R1}{H1} \ThreeSEP{1cm}{H1}{S1}{Separator}{15,-12} %Arrows \draw[thick,-latex] (START.east) to (F1.west); \draw[thick,-latex] (F1.south) |- (W1); \draw[thick,-latex] (F1.east) to (C1.west); \draw[thick,-latex] (C1.east) -| (R1.north); \draw[thick,-latex] (R1.south) |- (H1.west); \draw[thick,-latex] (H1.east) to (S1.west); \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\tikzmycustomgrowth {% \pgftransformreset \ifnum\tikztreelevel=1 \pgftransformrotate {(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}% \fi \ifnum\tikztreelevel=2 \pgftransformrotate {(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentgrandchild-4)}% \global\advance\tikznumberofcurrentgrandchild by 1 \fi \pgftransformxshift {\the\tikzleveldistance}% } \tikzset{ branch color/.style={ concept color=#1!white, every child/.append style={concept color=#1!white!30!white}, } } \begin{document} \begin{tikzpicture} [ mindmap, growth function=\tikzmycustomgrowth, 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 distance=12.5cm, sibling angle=360/35}, % distance par rapport au CENTRE ! (avec le code tel qu'en ce moment) ] \tikznumberofcurrentgrandchild=0 \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{article} \usepackage{tikz,times} %\usepackage[paperwidth=25cm,paperheight=22cm,left=1cm,top=1cm]{geometry} % prevent print PDF and png in page 1 \usepackage{geometry} \usetikzlibrary{mindmap,backgrounds} %\pagestyle{empty} \begin{document} \centering\begin{tikzpicture}[mindmap, level 1 concept/.append style={level distance=130,sibling angle=30}, extra concept/.append style={color=blue!50,text=black}] % Applied area: computer science and its subfields \begin{scope}[mindmap, concept color=orange, text=white] \node [concept] {Informatique}[clockwise from=-5] child {node [concept] (log) {M{\'e}thodes cat{\'e}goriques}} child {node [concept] (alg) {Algorithmique}} child {node [concept] (cod) {Compression \& transmission}} child {node [concept] (img) {Tra{\^i}tement des images}} child {node [concept] (opt) {Optimisation}} child {node [concept] (res) {R{\'e}seaux}}; \end{scope} % Applied area: theoretical physics and its subfields \begin{scope}[mindmap, concept color=red,text=white] \node [concept] at (-5,-15) {Physique} child [grow=-10, level distance=160] {node [concept] (qin) {Calcul quantique}} child [grow=20] {node [concept] (csm) {Astronomie \& cosmologie}} child [grow=110] {node [concept] (mat) {Mati{\`e}re condens{\'e}e}}; \end{scope} % Applied area: biology and its subfields \begin{scope}[mindmap, concept color=green!50!black,text=white] \node [concept] at (6.5,-15) {Biologie} child [grow=165, level distance=120] {node [concept] (med) {M{\'e}decine}} child [grow=60] {node [concept] (gen) {G{\'e}nomique}}; \end{scope} % Applied area: economics (one subfield) \begin{scope}[mindmap, concept color=violet, text=white] \node [concept] at (11,-14) {{\'E}conomie} child [grow=70, level distance=120] {node [concept] (dec) {Choix \& prise de d{\'e}cision}}; \end{scope} % Researchers listed by their main specialization in mathematics \begin{scope}[mindmap, concept color=blue] % Combinatorics and discrete mathematics \node [concept, text=white] at (5.2,-10.8) {Combinatoire \& math{\'e}matiques discr{\`e}tes} [clockwise from=150] child [concept color=blue!50] {node [concept] (ver) {Vereschagin}} child [concept color=blue!50, level distance=125] {node [concept] (kab) {Kabatyanski, Tsfasman, Rybakov, Zykin}} child [concept color=blue!50] {node [concept] (kch) {Kucherov, Roytberg}} child [concept color=blue!50] {node [concept] (raf) {Raffinot}} child [concept color=blue!50, level distance=135] {node [concept] (ksh) {Koshevoy}}; % Partial differential equations \node [concept, text=white] at (-3,-11) {Equations aux d{\'e}riv{\'e}es partielles \& m{\'e}thodes num{\'e}riques} child [concept color=blue!50, grow=0, level distance=140] {node [concept] (lhc) {Loh{\'e}ac}} child [concept color=blue!50, grow=60, level distance=115] {node [concept] (otr) {OTARIE (Sobolevski)}} child [concept color=blue!50, grow=95] {node [concept] (ndr) {Nadirashvili}}; % Probability \node [concept, text=white] at (-7.2,-3.2) {Probabilit{\'e}s} child [concept color=blue!50, grow=-70, level distance=120] {node [concept] (rbk) {Rybko}}; % Logic \node [concept, text=white] at (11.5,-5) {Logique} child [concept color=blue!50, grow=165, level distance=120] {node [concept] (sht) {Shehtman}}; \end{scope} % Connections of researchers to applied subfields \begin{pgfonlayer}{background} \draw [circle connection bar] (kab) edge (cod) (kch) edge (alg) edge (gen) (lhc) edge (med) (ksh) edge (dec) (ndr) edge (mat) (otr) edge (opt) edge (csm) edge (img) (raf) edge (alg) edge (gen) (rbk) edge (res) edge (mat) (sht) edge (log) edge (dec) (ver) edge (qin) edge (cod); \end{pgfonlayer} \end{tikzpicture} \end{document}
\documentclass{article} \usepackage[paperheight=6in,paperwidth=6in, top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry} \pagestyle{empty} \usepackage{tikz} \usepackage{verbatim} \usetikzlibrary{shapes,arrows,positioning,calc} \begin{comment} To draw a block diagram, (1) First define a style definition for each repeated blocks, input/output, summations, or pins; so that different property of each node is attributed. Use them properly in each node definition mentioned below. (2) Use node command to place each node, it is convenient to allocate each node based on relative position (above, below, right, left =xx cm of < a node >) where positioning tikzlibrary is instrumental. For each node it is convenient to assigned an <internal name> for later reference, for example, when drawing lines. (3) Use draw to complete the line connections, assigning labels along the line via node[<location>](<internal name>){<external name>} syntax. \end{comment} \begin{document} To draw a block diagram, (1) First define a style definition for each repeated blocks, input/output, summations, or pins; so that different property of each node is attributed. Use them properly in each node definition mentioned below. (2) Use node command to place each node, it is convenient to allocate each node based on relative position (above, below, right, left =xx cm of < a node >) where positioning tikzlibrary is instrumental. For each node it is convenient to assigned an <internal name> for later reference, for example, when drawing lines. (3) Use draw to complete the line connections, assigning labels along the line via node[<location>](<internal name>){<external name>} syntax. \tikzset{ block/.style = {draw, fill=white, rectangle, minimum height=3em, minimum width=3em}, tmp/.style = {coordinate}, sum/.style= {draw, fill=white, circle, node distance=1cm}, input/.style = {coordinate}, output/.style= {coordinate}, pinstyle/.style = {pin edge={to-,thin,black} } } %\begin{figure}[!htb] %\centering \begin{tikzpicture}[auto, node distance=2cm,>=latex'] \node [input, name=rinput] (rinput) {}; \node [sum, right of=rinput] (sum1) {}; \node [block, right of=sum1] (controller) {$k_{p\beta}$}; \node [block, above of=controller,node distance=1.3cm] (up){$\frac{k_{i\beta}}{s}$}; \node [block, below of=controller,node distance=1.3cm] (rate) {$sk_{d\beta}$}; \node [sum, right of=controller,node distance=2cm] (sum2) {}; \node [block, above = 2cm of sum2](extra){$\frac{1}{\alpha_{\beta2}}$}; % \node [block, right of=sum2,node distance=2cm] (system) {$\frac{a_{\beta 2}}{s+a_{\beta 1}}$}; \node [output, right of=system, node distance=2cm] (output) {}; \node [tmp, below of=controller] (tmp1){$H(s)$}; \draw [->] (rinput) -- node{$R(s)$} (sum1); \draw [->] (sum1) --node[name=z,anchor=north]{$E(s)$} (controller); \draw [->] (controller) -- (sum2); \draw [->] (sum2) -- node{$U(s)$} (system); \draw [->] (system) -- node [name=y] {$Y(s)$}(output); \draw [->] (z) |- (rate); \draw [->] (rate) -| (sum2); \draw [->] (z) |- (up); \draw [->] (up) -| (sum2); \draw [->] (y) |- (tmp1)-| node[pos=0.99] {$-$} (sum1); \draw [->] (extra)--(sum2); \draw [->] ($(0,1.5cm)+(extra)$)node[above]{$d_{\beta 2}$} -- (extra); \end{tikzpicture} %\caption{A PID Control System} \label{fig6_10} %\end{figure} \end{document}
\documentclass{standalone} \usepackage{tikz} \usepackage{verbatim} \begin{comment} :Title: IS-LM diagram :Tags: Diagrams, Plots, Coord. calculations This figure shows how an economy utilizing fixed exchange rates will react according to the `IS-LM curve`_ (sometimes also known as `Mundell Flemming`_) .. _IS-LM curve: http://en.wikipedia.org/wiki/IS/LM_model .. _Mundell Flemming: http://en.wikipedia.org/wiki/Mundell-Fleming_model :Author: Rasmus Pank Roulund \end{comment} \usetikzlibrary{arrows,calc} \usepackage{relsize} \newcommand\LM{\ensuremath{\mathit{LM}}} \newcommand\IS{\ensuremath{\mathit{IS}}} \begin{document} \begin{tikzpicture}[ scale=2, IS/.style={blue, thick}, LM/.style={red, thick}, axis/.style={very thick, ->, >=stealth', line join=miter}, important line/.style={thick}, dashed line/.style={dashed, thin}, every node/.style={color=black}, dot/.style={circle,fill=black,minimum size=4pt,inner sep=0pt, outer sep=-1pt}, ] % axis \draw[axis,<->] (2.5,0) node(xline)[right] {$Y$} -| (0,2.5) node(yline)[above] {$i$}; % IS-LM diagram \draw[LM] (0.2,0.3) coordinate (LM_1) parabola (1.8,1.8) coordinate (LM_2) node[above] {\LM}; \draw[IS] (0.2,1.8) coordinate (IS_1) parabola[bend at end] (1.8,.3) coordinate (IS_2) node[right] {\IS}; %Intersection is calculated "manually" since Tikz does not offer %intersection calculation for parabolas \node[dot,label=above:$A$] at (1,.68) (int1) {}; %shifted IS-LM diagram \draw[xshift=.7cm, LM, red!52] (0.2,0.2) parabola (1.8,1.7) node[above] {\LM'}; \draw[xshift=.4cm, yshift=.3cm, IS, blue!60] (0.2,1.8) parabola[bend at end] (1.8,.3) node[right] {\IS'}; %Intersection of shifted IS-LM \path[xshift=.36cm, yshift=.35cm] (.98,.7) node[dot,label=above:{$B$}] (int2) {}; \path[xshift=.805cm] (1,.68) node[dot,label=above:$C$] (int3) {}; %arrows between intersections \draw[->, very thick, black, >=stealth'] ($(int1)+1/2*(-.80,1)$) -- ($(int2)+1/2*(-.8,1)$) node[sloped, above, midway] {$\mathsmaller{\Delta G > 0}$}; \draw[->, very thick, black, >=stealth'] ($(int2)+2*(.14,.2)$) -- ($(int2)!.2cm!270:(int2)+(.9,0)$) node[sloped,above, midway] {$\mathsmaller{\Delta M>0}$}; \begin{scope}[xshift=4cm] %E-diagram \draw[axis,<->] (0,2.5) node(eyline)[above] {$i$} |- (2.5,0) node(exline)[right] {$E$}; \draw[important line, green, xshift=.5cm] (.2,.2) coordinate (es) -- (1.5,1.5) coordinate (ee) node [above right] {Interest rate parity}; \end{scope} %Lines connecting IS LM coordinates and E coordinates \draw[dashed] let % Store the intersection point in \p1 for later retrieval. % A convenient feature of the let operation is that we can % access the x and y component of the coordinate directly % using the \x1 and \y1 syntax. \p1=(intersection of int2--[xshift=1]int2 and es--ee) in (0,\y1) node[left]{$i'$} -| (\x1,0) node[pos=0.5,dot,label=above:$B'$] {} node[below] {$E'$}; \draw[dashed line] let \p1=(intersection of int3--[xshift=1]int3 and es--ee) in (0,\y1) node[left]{$i\phantom{'}$} -| (\x1,0) node[dot,label=above:$C'$,pos=0.5] {} node[below] {$E$}; \end{tikzpicture} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End:
\documentclass[tikz]{standalone} \usetikzlibrary{decorations.pathreplacing} \usepackage{mathtools} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \renewcommand{\epsilon}{\varepsilon} \begin{document} \begin{tikzpicture}[xscale=8,yscale=5] \newcommand{\xmin}{-.4} \newcommand{\xmax}{.5} \newcommand{\deltaX}{.65} \begin{scope} \draw[black,->] (-.6,-.7) -- (.5,-.7) node[right] {$x$}; \draw[black,->] (-.5,-.8) -- (-.5,0.5) node[above] {$y$}; % \useasboundingbox; \path[fill=black!30,draw=black!30] (-.33,-.33*1.65) -- (-.33,-.33*.35) -- (.33,.33*.35) -- (.33,.33*1.65) -- cycle; \draw[thick,densely dotted] (.33,-.72) node[below] (delta3) {$x_0+\delta\strut$} -- (.33,.33*1.65); \draw[thick,densely dotted] (-.33,-.72) node[below] (mdelta3) {$x_0-\delta\strut$} -- (-.33,-.33*.35); \fill[black!50] (-.25,-.25*3/2) -- (-.25,-.25/2) -- (.25,.25/2) -- (.25,.25*3/2) -- cycle; \path[fill=black!70] (-.15,-.15*1.25) -- (-.15,-.15*.75) -- (.15,.15*.75) -- (.15,.15*1.25) -- cycle; \node[circle,draw=black,inner sep=0pt,minimum size=3pt,fill=black] (x0y0) at (0,0) {}; \draw[black,domain=\xmin:\xmax,samples=2] plot(\x,\x) node[right] {$\Delta y = f'(x_0) \Delta x$}; \draw[very thick,black,smooth,domain=\xmin:\xmax,samples=30] plot (\x,{1-1/(\x+1)}) node[right] {$y=f(x)$}; \draw[black,very thin] (x0y0) -- (0,{-.72}) node[below] (x0) {$x_0\strut$}; \draw[black,very thin] (x0y0) -- (-.52,0) node[left]{$y_0$}; \end{scope} \draw[decorate,decoration={brace,amplitude=5pt,mirror,raise=1pt}] (.33,.33*.35) -- node[right]{\hspace{6pt}$\epsilon \Delta x$} (.33,.33); \draw[decorate,decoration={brace,amplitude=5pt}] (delta3.south) -- node[below] {$\rule{0pt}{14pt}\abs{\Delta x} < \delta$} (mdelta3.south); \end{tikzpicture} \end{document}
\documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[y=1cm, x=1cm, thick, font=\footnotesize] \usetikzlibrary{arrows,decorations.pathreplacing} \tikzset{ brace_top/.style={ decoration={brace}, decorate }, brace_bottom/.style={ decoration={brace, mirror}, decorate } } % time line week \draw[line width=1.2pt, ->, >=latex'](0,0) -- coordinate (x axis) (8,0) node[right] {Days}; \foreach \x in {0,...,7} \draw (\x,0.1) -- (\x,-0.1) node[below] {\x}; % top brace \node (start_week) at (0,0.1) {}; \node (end_week) at (7,0.1) {}; \draw [brace_top] (start_week.north) -- node [above, pos=0.5] {$|T| =a~Week = 672~Periods$} (end_week.north); % low brace \node (start_day_u) at (3,-0.4) {}; \node (end_day_u) at (4,-0.4) {}; \draw [brace_bottom] (start_day_u.south) -- node [below, pos=0.5] {} (end_day_u.south); % time line day \draw[line width=1.2pt, ->, >=latex'](0,-1.5) -- coordinate (x axis) (8,-1.5) node[right] {Hours}; \draw (0,-1.4) -- (0,-1.6) node[below] {1}; \foreach \x in {4,8,12,16,20,24} \draw (\x/3.4,-1.4) -- (\x/3.4,-1.6) node[below] {\x}; \draw (9/3.4,-1.4) -- (9/3.4,-1.6) node[below] {9}; % top brace \node (start_day) at (0,-1.4) {}; \node (end_day) at (7,-1.4) {}; \draw [brace_top] (start_day.north) -- node [above, pos=0.5] {$ a~Day = 96~Periods$} (end_day.north); % low brace \node (start_hour_u) at (8/3.4,-1.9) {}; \node (end_hour_u) at (9/3.4,-1.9) {}; \draw [brace_bottom] (start_hour_u.south) -- node [below, pos=0.5] {} (end_hour_u.south); % time line hour \draw[line width=1.2pt, ->, >=latex'](0,-3.0) -- coordinate (x axis) (8,-3.0) node[right] {Minutes}; \draw (0,-2.9) -- (0,-3.1) node[below] {1}; \foreach \x in {15,30,45,60} \draw (\x/8.5,-2.9) -- (\x/8.5,-3.1) node[below] {\x}; % top brace \node (start_hour) at (0,-2.9) {}; \node (end_hour) at (7.05,-2.9) {}; \draw [brace_top] (start_hour.north) -- node [above, pos=0.5] {$ a~Hour = 4~Periods$} (end_hour.north); % time line period \foreach \x in {1,...,4} \draw[dotted] (15*\x/8.5,-3.45) -- (15*\x/8.5,-3.6) node[below] {\textbf{\x}}; % low brace period \node (start_period) at (30/8.5,-3.9) {}; \node (end_period) at (45/8.5,-3.9) {}; \draw [brace_bottom] (start_period.south) -- node [below, pos=0.5] {$t=a~Period$} (end_period.south); \end{tikzpicture} \end{document}
\documentclass[tikz,14pt,border=10pt]{standalone} %%%< \usepackage{verbatim} %%%> \begin{comment} :Title: Block diagram of Third order noise shaper in Compact Disc Players :Tags: Diagrams;Block diagrams;Electrical engineering :Author: Ramón Jaramillo :Slug: noise-shaper This is a block diagram of a third-order noise shaper, circuit located inside of a compact disc player. Source: A fundamental introduction to the Compact Disc Player (1994), located in http://www.tc.umn.edu/~erick205/Papers/3011Paper.pdf, page 17 by Grant M. Erickson \end{comment} \usepackage{textcomp} \usetikzlibrary{shapes,arrows} \begin{document} % Definition of blocks: \tikzset{% block/.style = {draw, thick, rectangle, minimum height = 3em, minimum width = 3em}, sum/.style = {draw, circle, node distance = 2cm}, % Adder input/.style = {coordinate}, % Input output/.style = {coordinate} % Output } % Defining string as labels of certain blocks. \newcommand{\suma}{\Large$+$} \newcommand{\inte}{$\displaystyle \int$} \newcommand{\derv}{\huge$\frac{d}{dt}$} \begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45] \draw % Drawing the blocks of first filter : node at (0,0)[right=-3mm]{\Large \textopenbullet} node [input, name=input1] {} node [sum, right of=input1] (suma1) {\suma} node [block, right of=suma1] (inte1) {\inte} node at (6.8,0)[block] (Q1) {\Large $Q_1$} node [block, below of=inte1] (ret1) {\Large$T_1$}; % Joining blocks. % Commands \draw with options like [->] must be written individually \draw[->](input1) -- node {$X(Z)$}(suma1); \draw[->](suma1) -- node {} (inte1); \draw[->](inte1) -- node {} (Q1); \draw[->](ret1) -| node[near end]{} (suma1); % Adder \draw node at (5.4,-4) [sum, name=suma2] {\suma} % Second stage of filter node at (1,-6) [sum, name=suma3] {\suma} node [block, right of=suma3] (inte2) {\inte} node [sum, right of=inte2] (suma4) {\suma} node [block, right of=suma4] (inte3) {\inte} node [block, right of=inte3] (Q2) {\Large$Q_2$} node at (9,-8) [block, name=ret2] {\Large$T_2$} ; % Joining the blocks of second filter \draw[->] (suma3) -- node {} (inte2); \draw[->] (inte2) -- node {} (suma4); \draw[->] (suma4) -- node {} (inte3); \draw[->] (inte3) -- node {} (Q2); \draw[->] (ret2) -| (suma3); \draw[->] (ret2) -| (suma4); % Third stage of filter: % Defining nodes: \draw node at (11.5, 0) [sum, name=suma5]{\suma} node [output, right of=suma5]{} node [block, below of=suma5] (deriv1){\derv} node [output, right of=suma5] (sal2){} ; % Joining the blocks: \draw[->] (suma2) -| node {}(suma3); \draw[->] (Q1) -- (8,0) |- node {}(ret1); \draw[->] (8,0) |- (suma2); \draw[->] (5.4,0) -- (suma2); \draw[->] (Q1) -- node {}(suma5); \draw[->] (deriv1) -- node {}(suma5); \draw[->] (Q2) -| node {}(deriv1); \draw[<->] (ret2) -| node {}(deriv1); \draw[->] (suma5) -- node {$Y(Z)$}(sal2); % Drawing nodes with \textbullet \draw node at (8,0) {\textbullet} node at (8,-2){\textbullet} node at (5.4,0){\textbullet} node at (5,-8){\textbullet} node at (11.5,-6){\textbullet} ; % Boxing and labelling noise shapers \draw [color=gray,thick](-0.5,-3) rectangle (9,1); \node at (-0.5,1) [above=5mm, right=0mm] {\textsc{first-order noise shaper}}; \draw [color=gray,thick](-0.5,-9) rectangle (12.5,-5); \node at (-0.5,-9) [below=5mm, right=0mm] {\textsc{second-order noise shaper}}; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage[margin=3cm]{geometry} \usepackage{ragged2e} \usepackage{fourier} \usepackage{tikz} \usetikzlibrary{chains,shapes.arrows,fit} \definecolor{arrowcolor}{RGB}{201,216,232}% color for the arrow filling \definecolor{circlecolor}{RGB}{79,129,189}% color for the inner circles filling \colorlet{textcolor}{white}% color for the text inside the circles \colorlet{bordercolor}{white}% color for the outer border of circles \pgfdeclarelayer{background} \pgfsetlayers{background,main} \newcounter{task} \newlength\taskwidth% width of the box for the task description \newlength\taskvsep% vertical distance between the task description and arrow \setlength\taskwidth{2.5cm} \setlength\taskvsep{17pt} \def\taskpos{} \def\taskanchor{} \newcommand\task[1]{% {\parbox[t]{\taskwidth}{\scriptsize\Centering#1}}} \tikzset{ inner/.style={ on chain, circle, inner sep=4pt, fill=circlecolor, line width=1.5pt, draw=bordercolor, text width=1.2em, align=center, text height=1.25ex, text depth=0ex }, on grid } \newcommand\Task[2][]{% \node[inner xsep=0pt] (c1) {\phantom{A}}; \stepcounter{task} \ifodd\thetask\relax \renewcommand\taskpos{\taskvsep}\renewcommand\taskanchor{south} \else \renewcommand\taskpos{-\taskvsep}\renewcommand\taskanchor{north} \fi \node[inner,font=\footnotesize\sffamily\color{textcolor}] (c\the\numexpr\value{task}+1\relax) {#1}; \node[anchor=\taskanchor,yshift=\taskpos] at (c\the\numexpr\value{task}+1\relax) {\task{#2}}; } \newcommand\drawarrow{% the arrow is placed in the background layer % after the node for the tasks have been placed \ifnum\thetask=0\relax \node[on chain] (c1) {}; % if no \Task command is used, the arrow will be drawn \fi \node[on chain] (f) {}; \begin{pgfonlayer}{background} \node[ inner sep=10pt, single arrow, single arrow head extend=0.8cm, draw=none, fill=arrowcolor, fit= (c1) (f) ] (arrow) {}; \fill[white] % the decoration at the tail of the arrow (arrow.before tail) -- (c1|-arrow.west) -- (arrow.after tail) -- cycle; \end{pgfonlayer} } \newenvironment{timeline}[1][node distance=.75\taskwidth] {\par\noindent\begin{tikzpicture}[start chain,#1]} {\drawarrow\end{tikzpicture}\par} \begin{document} \begin{timeline} \Task{Complete oral presentation\\ 27/04/2012} \Task{Work on user interface and some modulation \\ 28/04/2012} \Task{Work on and complete proposal to hand in \\ 29/04/2012} \Task{Hand in proposal and astart working on Software planning \\ 04/05/2012} \Task{Hand in Software planning and work on more content \\ 06/05/2012} \Task{Complete full user UI with action listeners \\ 12/05/2012} \Task{Complete beta testing and debug \\ May 13th to May 29th} \end{timeline} \vspace{1cm} \definecolor{arrowcolor}{RGB}{144,168,65} \colorlet{circlecolor}{white} \definecolor{bordercolor}{RGB}{168,89,65} \colorlet{textcolor}{bordercolor} \setlength\taskwidth{1.7cm} \begin{timeline} \Task[M]{Grilled cheese sandwiches on whole-wheat bread, one peach} \Task[Tu]{Penne pasta Caprese salad} \Task[W]{Zucchini muffins with cream cheese, grapes, and watermelon} \Task[Th]{Peanut butter and banana sandwiches, popcorn, one peach} \Task[F]{Cream cheese and cucumber sandwich, grapes, and blueberries} \Task[Sa]{Grilled fish with lemon, grilled corn, and whole-wheat biscuits} \Task[Su]{Yogurth with honey and blueberries} \end{timeline} \end{document}
\documentclass[border=5pt]{standalone} \usepackage{tikz} \usepackage{verbatim} \begin{comment} :Title: Scenario tree :Tags: Trees A scenario tree from the field of economics. The figure is a replication of a figure 4 from Barry Eichengreen's NBER paper on "Hegemonic Stability Theories of the International Monetary System" from 1987 (PDF_). .. _PDF: http://papers.nber.org/papers/W2193.pdf :Author: Rasmus Pank Roulund \end{comment} \usetikzlibrary{shapes} \usepackage{amsmath} \usepackage{xspace} \newcommand{\A}{\ensuremath{\mathcal{A}}\xspace} \newcommand{\B}{\ensuremath{\mathcal{B}}\xspace} \newcommand\pa[1]{\ensuremath{\left(#1\right)}} \begin{document} \begin{tikzpicture}[ grow=right, level 1/.style={sibling distance=3.5cm,level distance=5.2cm}, level 2/.style={sibling distance=3.5cm, level distance=6.7cm}, edge from parent/.style={very thick,draw=blue!40!black!60, shorten >=5pt, shorten <=5pt}, edge from parent path={(\tikzparentnode.east) -- (\tikzchildnode.west)}, kant/.style={text width=2cm, text centered, sloped}, every node/.style={text ragged, inner sep=2mm}, punkt/.style={rectangle, rounded corners, shade, top color=white, bottom color=blue!50!black!20, draw=blue!40!black!60, very thick } ] \node[punkt, text width=5.5em] {Country~\B} %Lower part lv1 child { node[punkt] [rectangle split, rectangle split, rectangle split parts=3, text ragged] { \textbf{Scenario 1} \nodepart{second} $\text{Country \B}\colon s\bar{Q}$ \nodepart{third} $\text{Country \A}\colon\pa{1-s}\bar{Q}$ } edge from parent node[kant, below, pos=.6] {Unchanged parity} } %Upper part, lv1 child { node[punkt, text width=6em] {Country~\A} %child 1 child { node [punkt,rectangle split, rectangle split, rectangle split parts=3] { \textbf{Scenario 2} \nodepart{second} $\text{Country \B}\colon s\bar{Q}+2\alpha\Delta E -sc$ \nodepart{third} $\text{Country \A}\colon\pa{1-s}\bar{Q}-\alpha\Delta E - \pa{1-s}c$ } edge from parent node[below, kant, pos=.6] {Unchanged parity} } %child 2 child { node [punkt, rectangle split, rectangle split parts=3]{ \textbf{Scenario 3} \nodepart{second} $\text{Country \B}\colon s\bar{Q}-2sc$ \nodepart{third} $\text{Country \A}\colon\pa{1-s}\bar{Q}-2\pa{1-s}c$ } edge from parent node[kant, above] {Devalues}} edge from parent{ node[kant, above] {Devalues}} }; \end{tikzpicture} \end{document}
\documentclass[border=15pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings} \begin{document} \begin{tikzpicture} \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=6}] \tikzstyle{damper}=[thick,decoration={markings, mark connection node=dmp, mark=at position 0.5 with { \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=15pt,minimum height=3pt,draw=none] {}; \draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$); \draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$); } }, decorate] \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm] \node (M) [draw,outer sep=0pt,thick,minimum width=1cm, minimum height=2cm] {$m_1$}; \node (M2) [draw,outer sep=0pt,thick,minimum width=1cm, minimum height=2cm] at (2,0) {$m_2$}; \node (M3) [draw,outer sep=0pt,thick,minimum width=1cm, minimum height=2cm] at (4,0) {$m_3$}; \node (M4) [draw,outer sep=0pt,thick,minimum width=1cm, minimum height=2cm] at (6,0) {$m_4$}; \node (ground) [ground,anchor=north,xshift=3cm,yshift=-0.25cm,minimum width=9.5cm] at (M.south) {}; \draw (ground.north east) -- (ground.north west); \draw [thick] (M.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm); \draw [thick] (M2.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M2.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm); \draw [thick] (M3.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M3.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm); \draw [thick] (M4.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M4.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm); \draw [spring] (M2.220) -- ($(M.north east)!(M.220)!(M.south east)$); \draw [spring] (M3.220) -- ($(M2.north east)!(M2.220)!(M2.south east)$); \draw [spring] (M4.220) -- ($(M3.north east)!(M3.220)!(M3.south east)$); \draw [damper] (M2.170) -- ($(M.north east)!(M2.170)!(M.south east)$); \draw [damper] (M3.170) -- ($(M2.north east)!(M3.170)!(M2.south east)$); \draw [damper] (M4.170) -- ($(M3.north east)!(M4.170)!(M3.south east)$); \node at (1,.8) {$d_1$}; \node at (3,.8) {$d_2$}; \node at (5,.8) {$d_3$}; \node at (1,-.8) {$k_1$}; \node at (3,-.8) {$k_2$}; \node at (5,-.8) {$k_3$}; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} %%Create a style for the arrows we are using \tikzset{normal arrow/.style={draw, thin}} %%Create the different coordinates to place the nodes \path (0,0) coordinate (1) ++(0,-2) coordinate (2) ++(0,-2) coordinate (3); \path (1) ++(-3,-.2) coordinate (x1); \path (3) ++(-3, .2) coordinate (x2); %%Use the calc library and partway modifiers to generate the second and third level points \path ($(1)!.5!(2)!3 cm!90:(2)$) coordinate (4); \path ($(2)!.5!(3)!3 cm!90:(3)$) coordinate (5); \path ($(4)!.5!(5)!3 cm!90:(5)$) coordinate (6); \path (6) ++(3,0) coordinate (7); %%Place nodes at each point using the foreach construct \foreach \i/\color in {1/Magenta!60,2/MidnightBlue!60,3/CadetBlue!80,4/CadetBlue!80,5/CadetBlue!80,6/CadetBlue!80}{ \node[draw,circle,shading=axis,top color=\color, bottom color=\color!black,shading angle=45] (n\i) at (\i) {$f_{\i}(e)$}; } %%Place the remaining nodes separately \node (nx1) at (x1) {$\mathbf{x_1}$}; \node (nx2) at (x2) {$\mathbf{x_2}$}; \node (ny) at (7) {$\mathbf{y}$}; %%Drawing the arrows \path[normal arrow] (nx1) -- (n1); \path[normal arrow] (nx1) -- (n3); \path[normal arrow] (nx2) -- (n1); \path[normal arrow] (nx2) -- (n3); \path[normal arrow] (n1) -- (n4); \path[normal arrow] (n1) -- (n5); \path[normal arrow] (n2) -- (n4); \path[normal arrow] (n2) -- (n5); \path[normal arrow] (n3) -- (n4); \path[normal arrow] (n3) -- (n5); \path[normal arrow] (n4) -- (n6); \path[normal arrow] (n5) -- (n6); \path[normal arrow] (n6) -- (ny); %%Drawing the cyan arrows including the labels \path[normal arrow,Cyan] (nx1) -- node[above=.5em,Cyan] {$\mathbf{w_{(x1)2}}$} (n2); \path[normal arrow,Cyan] (nx2) -- node[below=.5em,Cyan] {$\mathbf{w_{(x2)2}}$} (n2); \end{tikzpicture} \end{document}
\documentclass[12pt]{article} \usepackage[a4paper, margin=1cm]{geometry} \usepackage{tikz} \pagestyle{empty} \newcommand{\anno}{1} % starting year \newcommand{\target}{31} % ending year \newcommand{\alto}{3} % height \tikzset{ start date/.code args = {#1/#2}{ \def\dstart{#1} \def\mstart{#2} }, end date/.code args = {#1/#2}{ \def\dend{#1} \def\mend{#2} }, event color/.style = { fill=#1!50, draw=#1, }, } \pgfmathsetmacro{\myend}{\target+1-\anno} \pgfmathsetmacro{\myspacing}{16/(\target-1-\anno)} \newcommand{\eventpoint}[2][]{ \begin{scope}[#1] \pgfmathsetmacro{\mmstart}{((13-\mstart)*4)} \pgfmathsetmacro{\mmend}{((13-\mend)*4)} \ifnum\mstart=\mend \filldraw (\dstart, \mmstart ) rectangle (\dend, \mmend+1) node [font=\scriptsize, text centered, midway, inner sep=0pt] {#2}; \else \filldraw (\dstart, \mmstart ) rectangle (31, \mmstart+1) node [font=\scriptsize, text centered, midway, inner sep=0pt] {#2}; \filldraw (0, \mmend ) rectangle (\dend, \mmend+1) node [font=\scriptsize, text centered, midway, inner sep=0pt] {#2}; \fi \end{scope} } \begin{document} \centering \begin{tikzpicture}[x=\myspacing cm,y=5mm] %creating the sublines needed and formating them \foreach \y in {0,4,8,12,16,20,24,28,32,36,40,44,48}{ \draw[|->, -latex] (-.5,\y) -- (\myend+.5,\y); \path (0,0) -- (0,\alto); \foreach \x [evaluate=\x as \day using int(\x)] in {0,10,20,30}{ \draw (\x,\y) node[below=7pt,font=\footnotesize] {$\day$}; \draw (\x,\y -.2) -- (\x,\y +.2); \draw[loosely dotted] (\x,\y +.2) -- (\x,\y+ \alto-0.5); } \foreach \tick in {0,...,\myend}{ \draw (\tick,\y +.1) -- (\tick,\y -.1); } } %trying to add the events \eventpoint[start date=15/7,end date=25/7,event color=green]{test} \eventpoint[start date=17/8,end date=19/9,event color=red,yshift=5pt]{test 2} % shift just to show you can hook into standard tikz keys to change the event's features ad-hoc \end{tikzpicture} \end{document}
\documentclass[tikz, border=5mm]{standalone} \usetikzlibrary{arrows,shadows,positioning} \begin{document} \begin{tikzpicture}[font=\sffamily,>=stealth',thick, commentl/.style={text width=3cm, align=right}, commentr/.style={commentl, align=left},] \node[] (init) {\LARGE Initiator}; \node[right=1cm of init] (recv) {\LARGE Receiver}; \draw[->] ([yshift=-1.7cm]init.south) coordinate (fin1o) -- ([yshift=-.7cm]fin1o-|recv) coordinate (fin1e) node[pos=.3, above, sloped] {FIN}; \draw[->] ([yshift=-.3cm]fin1e) coordinate (ack1o) -- ([yshift=-.7cm]ack1o-|init) coordinate (ack1e) node[pos=.3, above, sloped] {ACK}; \draw[->] (ack1e-|recv) coordinate (fin2o) -- ([yshift=-.7cm]fin2o-|init) coordinate (fin2e) node[pos=.3, above, sloped] {FIN}; \draw[->] ([yshift=-.3cm]fin2e) coordinate (ack2o) -- ([yshift=-.7cm]ack2o-|recv) coordinate (ack2e) node[pos=.3, above, sloped] {ACK}; \draw[thick, shorten >=-1cm] (init) -- (init|-ack2e); \draw[thick, shorten >=-1cm] (recv) -- (recv|-ack2e); \draw[dotted] (recv.285)--([yshift=2mm]recv.285|-fin1e) coordinate[pos=.5] (aux1); \draw[dotted] (init.255)--([yshift=2mm]init.255|-fin1o); \draw[dotted] ([yshift=1mm]init.255|-fin2e) --([yshift=-5mm]init.255|-ack2e) coordinate (aux2); \node[commentr, right =2mm of ack2e] {\textbf{CLOSED}}; \node[commentr, right =2mm of fin2o] {\textbf{LAST ACK}}; \node[below left = 0mm and 2mm of init.south, commentl]{\textbf{ESTABLISHED}\\[-1.5mm]{\itshape connection}}; \node[left = 2mm of fin1o.west, commentl]{{\itshape active close}\\[-1mm]\textbf{FIN\_WAIT\_1}}; \node[left = 2mm of ack1e.west, commentl]{\textbf{FIN\_WAIT\_2}}; \node[below left = -1mm and 2mm of fin2e.west, commentl]{\textbf{TIME\_WAIT}}; \node[below left = -1mm and 2mm of aux2-|init, commentl]{\textbf{CLOSED}}; \node[right = 2mm of recv|-aux1, commentr]{\textbf{ESTABLISHED}\\[-1.5mm]{\itshape connection}}; \node[right = 2mm of fin1e.west, commentr]{\textbf{CLOSE\_WAIT}\\[-1mm]{\itshape passive close}}; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{snakes} \usepackage{fullpage} \usepackage{graphicx} \usetikzlibrary{calc} \begin{document} \resizebox{\linewidth}{!}{% Resize table to fit within \begin{tikzpicture}[snake=zigzag, line before snake = 5mm, line after snake = 5mm] %draw 1st horizontal line \draw (0,0) -- (19/2,0); \draw[snake] (19/2,0) -- (25/2,0); \draw (25/2,0) -- (30/2,0); \draw[snake] (30/2,0) -- (35/2,0); \draw (35/2,0) -- (40/2,0); %draw vertical lines \foreach \x in {0, 5, 10, 19, 30, 40}{ \draw (\x/2,3pt) -- (\x/2,-3pt); } %draw nodes \draw (-2,0) node { PHYS1060 }; \draw (0,0) node[below=3pt] { Pre-test published } node[above=3pt] { Jan 4, 2014 }; \draw (5/2,0) node[below=3pt] { Nudge } node[above=3pt] { Jan 9, 2014 }; \draw (10/2,0) node[below=3pt] { First class } node[above=3pt] { Jan 13, 2014 }; \draw (19/2,0) node[below=3pt] { Pre-test due } node[above=3pt] { Jan 22, 2014 }; \draw (30/2,0) node[below=3pt] { Midterm } node[above=3pt] { Feb 17, 2014 }; \draw (40/2,0) node[below=3pt] { Final Exam} node[above=3pt] { May 5, 2014 }; %draw 2nd horizontal line \draw (-2,-2) node { PHYS1050 }; \draw (0,-2) -- (19/2,-2); \draw[snake] (19/2,-2) -- (25/2,-2); \draw (25/2,-2) -- (30/2,-2); \draw[snake] (30/2,-2) -- (35/2,-2); \draw (35/2,-2) -- (40/2,-2); draw vertical lines \foreach \x in {0, 5, 10, 19, 30, 40}{ \draw ($(0,-2)+(\x/2, 3pt)$) -- ($(0,-2)+(\x/2, -3pt)$); } %draw nodes \draw (0,-2) node[below=3pt] { Pre-test published } node[above=3pt] { Aug 10, 2014 }; \draw (5/2,-2) node[below=3pt] { First class } node[above=3pt] { Aug 27, 2014 }; \draw (10/2,-2) node[below=3pt] { Nudge } node[above=3pt] { Sept 4, 2014 }; \draw (19/2,-2) node[below=3pt] { Pre-test due } node[above=3pt] { Sept 7, 2014 }; \draw (30/2,-2) node[below=3pt] { Midterm } node[above=3pt] { ?, 2014 }; \draw (40/2,-2) node[below=3pt] { Final Exam} node[above=3pt] { ?, 2014 }; \end{tikzpicture} } \end{document}
\documentclass{article} \usepackage{tikz} %%%< \usepackage{verbatim} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt}% %%%> \begin{comment} :Title: Representation of a geometric series :Tags: Foreach; Scopes :Author: Jimi Oke :Slug: geometric-series The infinite series 1/4 + 1/16 + 1/64 + 1/256 + ... is one of the first computed infinite series in the history of mathematics, already used by Archimedes. Its sum is 1/3. \end{comment} \begin{document} \begin{tikzpicture}[scale=.35]\footnotesize \pgfmathsetmacro{\xone}{-.4} \pgfmathsetmacro{\xtwo}{ 16.4} \pgfmathsetmacro{\yone}{-.4} \pgfmathsetmacro{\ytwo}{16.4} \begin{scope}<+->; % grid \draw[step=1cm,gray,very thin] (\xone,\yone) grid (\xtwo,\ytwo); % ticks \foreach \x/\xtext in { 8/\frac{1}{2}, 16/1} \draw[gray,xshift=\x cm] (0,.3) -- (0,0) node[below] {$\xtext$}; \foreach \y/\ytext in {8/\frac{1}{2},16/1} \draw[gray, yshift=\y cm] (.3,0) -- (0,0) node[left] {$\ytext$}; % origin \draw[gray] (0,0) node[anchor=north east] {$O$}; % axes \draw[gray,thick,<->] (\xone, 0) -- (\xtwo, 0) node[right] {$x$}; \draw[gray,thick,<->] (0, \yone) -- (0, \ytwo) node[above] {$y$}; \end{scope} % function \begin{scope}[thick,red] \foreach \x in {16, 8, 4, 2, 1,.5,.25} \draw (16-\x, 16-\x) rectangle (16,16); \foreach \x in {16, 8, 4, 2, 1,.5,.25} \filldraw[thin,red,opacity=.3] (16-\x, 16-\x) rectangle (16-.5*\x,16-.5*\x); \foreach \x in {16, 8, 4, 2, 1,.5,.25}{ \filldraw[thin,blue,opacity=.2] (16-\x, 16-.5*\x) rectangle (16-.5*\x,16); \filldraw[thin,blue,opacity=.2] (16-.5*\x, 16-\x) rectangle (16,16-.5*\x);} \end{scope} \end{tikzpicture} \end{document}
\documentclass[border=10pt,svgnames]{standalone} %%%< \usepackage{verbatim} %%%> \begin{comment} :Title: Simulation approaches versus abstraction levels :Tags: Diagrams;Shadows;Styles :Author: Valeria Borodin :Slug: simulation-abstraction This is the LaTeX version of the figure from the following link: https://en.wikipedia.org/wiki/AnyLogic#/media/File:Simulation_approaches_vs_abstraction_levels.jpg Note that the color range is slightly modified. This example illustrates how modelling approaches correspond to the abstraction levels. \end{comment} \usepackage{tikz} \usetikzlibrary{positioning,shadows.blur} \usepackage{pifont} \renewcommand{\labelitemi}{\ding{112}} \begin{document} \begin{tikzpicture} \tikzset{ box/.style = { rounded corners = 5pt, align = left, font = \sffamily\footnotesize, text width = 3.45cm, blur shadow = {shadow blur steps = 15} }, legend/.style = { font = \sffamily\bfseries, align = right, text width = 3.4cm}, } \node [shade, blur shadow = {shadow blur steps = 15}, text width = 1.01\textwidth, top color = black, bottom color = Maroon, text = white, font = \sffamily\bfseries\large] (A) {Aggregates, global feedback dynamics, ... \\ \vspace{.6\textwidth} Individual objects, exact sizes, distances, velocities, timings, ...}; \node [box, below left = -4.5cm and -3.85cm of A, fill = YellowGreen] (DE) {\underline{\bfseries Discrete Event (DE)} \begin{itemize} \setlength{\itemindent} {-.5cm} \item entities (passive objects) \item flowcharts \item network ressources \end{itemize} }; \node [box, above right = -3.5cm and .5cm of DE, minimum height=0.55\textwidth, fill = Gold, text depth = 0.35\textwidth] (AB) { \underline{\bfseries Agent Based (AB)} \begin{itemize} \setlength{\itemindent}{-.5cm} \item Active objects \item Individual behavior rules \item (In)direct interaction \item Environnement models \end{itemize} }; \node [box, above right = -2.cm and .5cm of AB, fill = LightSteelBlue] (SD) { \underline{\bfseries System Dynamics (SD)} \begin{itemize} \setlength{\itemindent}{-.5cm} \item Levels (aggregates) \item Stocks \& flow diagrams \item Feedback loops \end{itemize} }; \node [legend, above left = -1.25cm and 4.75cm of AB] (HA) {High Abstraction \\ Less Details \\ Macro Level \\ Strategic Level}; \node [legend, below = 1.5cm of HA] (MA) {Middle Abstraction \\ Average Details \\ Meso Level \\ Tactical Level}; \node [legend, below = 1.5cm of MA] (LA) {Low Abstraction \\ More Details \\ Micro Level \\ Operational Level}; \node [below = 1.25cm of AB, font = \sffamily\bfseries\large ] (d1) {Mostly Discrete $\triangleleft$}; \node [right = .5cm of d1, font = \sffamily\bfseries\large ] (d2) {$\triangleright$ Mostly Continuous }; \path [ draw, color = DimGray, dashed, line width = 2pt ] (d1.south east) + (0.3cm,0) coordinate(x1) -- (x1|-A.north); \path [draw, <->, >=latex, line width = 2pt ] (A.south west) + (-0.25cm,0) coordinate(x2) -- (x2|-A.north); \end{tikzpicture} \end{document}
\documentclass[border=15pt]{standalone} %\usepackage{showframe} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning} \usepackage[latin1]{inputenc} \tikzset{ line/.style={>=Stealth, semithick, draw=blue!75}, post/.style={line,->, shorten >=1pt}, node_box/.style={rectangle, thick, draw=blue!75, fill=blue!10,minimum width=20mm, minimum height=5mm}, labelnode/.style={auto, sloped, font=\footnotesize,align=center}, } \begin{document} %\begin{center} \begin{tikzpicture}[node distance=3cm and 1.7cm] \begin{scope}[every node/.style={node_box}] \node (south_if) {south\_if}; \node [above left=of south_if,xshift=5mm] (south_r) {south\_r}; \node [above=of south_r] (box_a) {box\_a}; \node [above=of box_a] (nout_join) {nout\_join}; \node [above right=of south_if] (sout_join) {sout\_join}; \node [above=of sout_join] (box_b) {box\_b}; \node [above=of box_b] (north_r) {north\_r}; \node [above left=of north_r,yshift=-1.5cm] (north_if) {north\_if}; % \node [at={(south_if |- box_a)}] (box_c) {box\_c}; \node [at={(box_c|-sout_join)}] (t_rdr) {t\_rdr}; % \node [above=of box_c] (t_output) {t\_output}; \node [below=2cm of t_rdr] (south_rp) {south\_rp}; \node [above right=1.5cm and 0mm of t_rdr] (test_prov) {test\_prov}; \node [below right=7mm and 1cm of test_prov] (sink_prov) {sink}; \node [above left=1.5cm and -5mm of box_a] (sink_test_a) {sink}; \node [above right=1cm and -5mm of box_b] (sink_test_p) {sink}; \end{scope} \begin{scope}[every node/.style={labelnode}] \foreach \i/\j in {% box_b/sout_join, box_a/nout_join, north_r/box_b, box_c/t_rdr, t_rdr/south_rp, t_output/box_c, south_r/box_a} \draw [post] (\i) -- (\j) node[above,near start] {output} node[below,near end,swap] {input}; \foreach \i/\j in{% nout_join/north_if, sout_join/south_if} \draw [post] (\i) |- (\j) node[above,near start] {output} node[below,near end,swap] {input}; \foreach \i/\j in{% north_if/north_r, south_if/south_r} \draw [post] (\i) -| (\j) node[above,near start] {output} node[below,near end,swap] {input}; \draw [post] (t_rdr) -- (test_prov) node[above,pos=0.4] {prov\_out} node[below,pos=0.6] {input}; \draw [post] (test_prov) -- ([xshift=-3mm]t_output.south east) node[above,pos=0.7] {test\_prov} node[below,pos=0.3] {output}; \draw [post] (t_rdr) -- (sout_join) node[above,pos=0.45] {output\_s,src} node[below,pos=0.55] {output\_s,src}; \draw [post] (test_prov) -| (sink_prov) node[above,pos=0.4] {output1} node[left,sloped=false,pos=0.8] {fromtest}; \draw [post] (north_r) -- (t_output) node[above,pos=0.65] {n\_test\_in,\\test\_out} node[below,pos=0.35] {test\_out,\\n\_test\_in}; \draw [post] (box_a) -| (sink_test_a) node[left,sloped=false,pos=0.85] {test\_a} node[below,pos=0.49] {output4}; \draw [post] (box_b) -| (sink_test_p) node[right,sloped=false,pos=0.85] {test\_p} node[below,pos=0.49] {output4}; \draw [post] (t_rdr) -- (nout_join) node[below,near start] {output\_n,n\_src} node[above,near end] {output\_n,src}; \draw [post] (south_r) -- (t_output) node[below,near start] {test\_out,n\_test\_n} node[above,near end] {n\_test\_out,test\_out}; \end{scope} \end{tikzpicture} %\end{center} \end{document}
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,fit,calc} \colorlet{mygreen}{green!80!black} \colorlet{myblue}{blue!80!black} \colorlet{myred}{red!80!black} \begin{document} \begin{tikzpicture} [ std/.style={ draw, text width=2.5cm, align=center, font=\strut\sffamily }, rnd/.style={ draw=#1, rounded corners=8pt, line width=1pt, align=center, text width=3cm, minimum height=2cm, font=\strut\sffamily }, vac/.style={ text width=2.5cm, align=center, font=\strut\sffamily }, ar/.style={ ->, >=latex }, node distance=0.5cm and 3cm ] %The nodes for the left \node[std] (va) {Vehicle Age}; \node[std,below=of va] (fs) {Fan Strength}; \node[std,below=of fs] (vs) {Vehicle Speed}; \node[std,below=of vs] (cv) {Cabin Volume}; \node[std,below= 1cm of cv] (fr) {Fraction of Recirculation}; \node[std,below=of fr] (ac) {Ambient $CO_{2}$ Concentration}; \node[std,below=of ac] (op) {Occupant Parameters}; %The nodes for the center \node[rnd,right=of va,yshift=-12.5pt] (aer) {Air Exchange Rate Determination}; \node[rnd=myblue,below=of aer] (cdm) {Carbon Dioxide Built-in Module}; \node[rnd=myred,below=of cdm] (vcm) {Vehicle Cabin Module}; \node[rnd=mygreen,below=of vcm] (hvac) {\textsc{hvac} Module}; %The nodes for the right \node[vac,right=1cm of cdm] (occ) {Output $CO_{2}$ Concentration}; \node[vac,right=1cm of vcm] (the) {Thermal Environment}; \node[vac,right=1cm of hvac] (col) {Compressor Load}; %The dashed fitting node \node[draw,dashed,inner sep=8pt,fit={(va) (cv)}] (fit) {}; % Some auxiliary coordinates for the arrows \coordinate (aux1) at ( $ (va.east|-aer.west)!0.25!(aer.west) $ ); \coordinate (aux2) at ( $ (va.east|-aer.west)!0.50!(aer.west) $ ); \coordinate (aux3) at ( $ (va.east|-aer.west)!0.75!(aer.west) $ ); %The arrows from left to center \draw[dashed,ar] (fit.east|-aer) -- (aer); \foreach \Nodo in {fs,vs,cv} { \draw[ar,myred] ([yshift=5pt]\Nodo.east) -- ([yshift=5pt]aux3|-\Nodo.east) |- (vcm); } \foreach \Nodo in {fs,vs,fr} { \draw[ar,mygreen] ([yshift=-5pt]\Nodo.east) -- ([yshift=-5pt]aux2|-\Nodo.east) |- (hvac); } \foreach \Nodo in {op,ac} { \draw[ar,myblue] (\Nodo.east) -- (aux1|-\Nodo.east) |- (cdm); } \draw[ar,myblue] ([yshift=5pt]fr.east) -- ([yshift=5pt]aux1|-fr.east) |- (cdm); \draw[myblue] ([yshift=-5pt]cv.east) -- ([yshift=-5pt]aux1|-cv.east); %The arrows from center to right \foreach \Ori/\Dest in {cdm/occ,vcm/the,hvac/col} { \draw[ar] (\Ori.east|-\Dest) -- (\Dest); } \end{tikzpicture} \end{document}
\documentclass[a4paper,portrait]{article} \usepackage{tikz} \usepackage[margin=0.3in]{geometry} \usetikzlibrary{scopes} \usetikzlibrary{intersections} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} [ scale=0.7, node font=\LARGE, dashed axis/.style={dash pattern=on 4pt off 2pt}, moon line/.style={dash pattern=on 8pt off 4pt}, information text/.style={rounded corners, fill=Info Color, inner sep=1ex} ] \definecolor{Earth Color}{HTML}{358af3}; \definecolor{Sun Color}{HTML}{fffc00}; \definecolor{Moon Color}{HTML}{ddbd4c}; \definecolor{Info Color}{HTML}{eeeeee}; \def\SunPosition{16}; % draw Earth xy-frame (fixed direction Earth frame), and the Earth at the origin \fill (0, 0) [Earth Color, opacity=.6] circle (1cm); \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}] (-4, 0) -- (16, 0) node [right=1em] {$x$}; \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}] (0, -4) -- (0, 16) node [above=1em] {$y$}; \filldraw (0, 0) circle (3pt); \path (0, 0) node [shift={(-3.5, 1.6)}, anchor=north west] {\Large EARTH}; % draw Earth x'y'-frame (Earth frame directed at Sun, ie 'Noon-frame'), and the Sun on the y'-axis \begin{scope}[rotate around={-55:(0, 0)}] \fill (0, \SunPosition) coordinate (S) [Sun Color, opacity=.7] circle (1.5cm); \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}] (-4, 0) -- (10, 0) coordinate (X') node [right=1em] {$x'$}; \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}] (0, -4) -- (0, 24) node [above=1em] {$y'$}; \filldraw (0, \SunPosition) circle (3pt); \end{scope} \draw[line width=2pt] (0.6,0) -- ($(0,0)!(0.6,0)!(S)$); \draw[line width=2pt] (0.6,0) -- ($(0,0)!(0.6,0)!(X')$); % draw arrow for Earth's orbital motion \draw[-{Stealth[length=0.6cm]},line width=3pt,Earth Color,rotate around={203:(S)}] ($(S) + (21,0)$) arc [start angle=0, end angle=10, radius=21]; % draw Sun's x''y''-frame (fixed direction Sun frame) \begin{scope}[shift={(S)}] \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}, dashed axis] (-4, 0) -- (4, 0) node [right=1em] {$x''$}; \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}, dashed axis] (0, -4) -- (0, 8) node [above=1em] {$y''$}; \draw[-{Stealth[length=0.3cm]}, green!60!black] (2.5, 0) arc [start angle=0, end angle=215, radius=2.5] node[pos=0.65,above left] {$\pi + \theta$}; \path (0, 0) node [shift={(2.2,-1.2)}] {\Large SUN (fixed)}; \end{scope} % draw Moon \begin{scope}[rotate around={-20:(0, 0)}] \fill (0, 7) coordinate (M) [Moon Color, opacity=.8] circle (.7cm); \draw[moon line] (0, 0) -- (0, 15); \filldraw (0, 7) circle (3pt); \node [shift={(-0.8,1)}] at (0, 7) {\Large MOON}; \draw[-{Stealth[length=0.6cm]},line width=3pt,Moon Color,rotate around={-10:(0, 0)}] (0, 9.5) arc [start angle=90, end angle=110, radius=9.5]; \end{scope} % draw various angles including Moon phase angle psi \draw[-{Stealth[length=0.3cm]},green!60!black] (2, 0) arc [start angle=0, end angle=70, radius=2] node[pos=0.7,above right=-4pt] {$\phi$}; \draw[-{Stealth[length=0.3cm]},green!60!black] (3.5, 0) arc [start angle=0, end angle=35, radius=3.5] node[pos=0.45,above right=-2pt] {$\theta$}; \draw[-{Stealth[length=0.3cm]}, red!80!black,rotate around={-55:(0, 0)}] (5, 0) arc [start angle=0, end angle=125, radius=5] node[pos=0.3, below right=-2pt] {$\psi$}; % draw information box \draw[shift={(10, -11)}] node[above right, text width=7cm,information text] { \Large {\boldmath \textbf{\underline{Moon Phase Angle $\psi$}} } \vspace{1ex} \large \begin{description} {\boldmath \item[$xy$-axes]= fixed direction but moving frame centered on Earth \item[$x'y'$-axes]= moving 'noon' frame centered on Earth (always points at Sun) \item[$x''y''$-axes]= fixed frame of Sun \item[$\psi$]= moon phase angle =} $\pi/2 + (\phi - \theta)$ \end{description} }; \node[above right] at (-5, -11) {\Large \textbf{Fig. 1} \hspace{0.1cm} Moon Phase Angle}; \end{tikzpicture} \end{document}
\documentclass[border=10pt]{standalone} %%%< \usepackage{verbatim} %%%> \begin{comment} :Title: Diagram of Android activity life cycle :Tags: Diagrams;Flowcharts;Charts;Styles;Computer science :Author: Pavel Seda :Slug: android A flow diagram of an Android activity life cycle. It uses basic nodes and arrows and defines node styles. \end{comment} \usepackage{tikz} \usetikzlibrary{arrows.meta} \tikzset{% >={Latex[width=2mm,length=2mm]}, % Specifications for style of nodes: base/.style = {rectangle, rounded corners, draw=black, minimum width=4cm, minimum height=1cm, text centered, font=\sffamily}, activityStarts/.style = {base, fill=blue!30}, startstop/.style = {base, fill=red!30}, activityRuns/.style = {base, fill=green!30}, process/.style = {base, minimum width=2.5cm, fill=orange!15, font=\ttfamily}, } \begin{document} % Drawing part, node distance is 1.5 cm and every node % is prefilled with white background \begin{tikzpicture}[node distance=1.5cm, every node/.style={fill=white, font=\sffamily}, align=center] % Specification of nodes (position, etc.) \node (start) [activityStarts] {Activity starts}; \node (onCreateBlock) [process, below of=start] {onCreate()}; \node (onStartBlock) [process, below of=onCreateBlock] {onStart()}; \node (onResumeBlock) [process, below of=onStartBlock] {onResume()}; \node (activityRuns) [activityRuns, below of=onResumeBlock] {Activity is running}; \node (onPauseBlock) [process, below of=activityRuns, yshift=-1cm] {onPause()}; \node (onStopBlock) [process, below of=onPauseBlock, yshift=-1cm] {onStop()}; \node (onDestroyBlock) [process, below of=onStopBlock, yshift=-1cm] {onDestroy()}; \node (onRestartBlock) [process, right of=onStartBlock, xshift=4cm] {onRestart()}; \node (ActivityEnds) [startstop, left of=activityRuns, xshift=-4cm] {Process is killed}; \node (ActivityDestroyed) [startstop, below of=onDestroyBlock] {Activity is shut down}; % Specification of lines between nodes specified above % with aditional nodes for description \draw[->] (start) -- (onCreateBlock); \draw[->] (onCreateBlock) -- (onStartBlock); \draw[->] (onStartBlock) -- (onResumeBlock); \draw[->] (onResumeBlock) -- (activityRuns); \draw[->] (activityRuns) -- node[text width=4cm] {Another activity comes in front of the activity} (onPauseBlock); \draw[->] (onPauseBlock) -- node {The activity is no longer visible} (onStopBlock); \draw[->] (onStopBlock) -- node {The activity is shut down by user or system} (onDestroyBlock); \draw[->] (onRestartBlock) -- (onStartBlock); \draw[->] (onStopBlock) -| node[yshift=1.25cm, text width=3cm] {The activity comes to the foreground} (onRestartBlock); \draw[->] (onDestroyBlock) -- (ActivityDestroyed); \draw[->] (onPauseBlock) -| node(priorityXMemory) {higher priority $\rightarrow$ more memory} (ActivityEnds); \draw (onStopBlock) -| (priorityXMemory); \draw[->] (ActivityEnds) |- node [yshift=-2cm, text width=3.1cm] {User navigates back to the activity} (onCreateBlock); \draw[->] (onPauseBlock.east) -- ++(2.6,0) -- ++(0,2) -- ++(0,2) -- node[xshift=1.2cm,yshift=-1.5cm, text width=2.5cm] {The activity comes to the foreground}(onResumeBlock.east); \end{tikzpicture} \end{document}
\documentclass[tikz,border=5]{standalone} \usetikzlibrary{fadings} \tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!100] \def\factor{4} \def\xradius{2} \def\yradius{2/\factor} \def\height{1.05cm} \def\xandy{2 and 2/\factor} \tikzset{ pics/.cd, % disc/.style ={ code = { %% the foundation \path [fill=black!15] (-\xradius,0) -- (-\xradius,-\height) arc (180:360:\xandy) -- (\xradius,0) arc (0:180:\xandy);% \path [top color=black!25, bottom color=white, opacity=0.2] (0,0) ellipse [x radius=\xradius, y radius =\yradius];% \path [left color=black!25, right color=black!15] (-\xradius,0) -- (-\xradius,-\height) arc (180:240:\xandy) -- +(0,\height) arc (240:180:\xandy);% \path [left color=black!15, right color=black!30] (\xradius,0) -- (\xradius,-\height) arc (360:320:\xandy) -- +(0,\height) arc (320:360:\xandy); %% rays in front \foreach \col/\r/\shift/\stop/\opacity in {% black/205/25/20/100, % black/295/35/30/100, % black/295/30/30/200, % black/295/25/20/300, % white/245/14/14/100, % white/245/12/12/20, % white/245/10/10/10} {% \foreach \i [evaluate={\opposite=\r-180;}] in {0,1,...,\stop}{% \fill [\col, fill opacity = 1/\opacity] (\opposite:0.1 and 0.1/\factor) -- (\r+\shift-\i:\xandy) -- ++(0,-\height) arc (\r+\shift-\i:\r-\shift+\i:\xandy) -- +(0,\height) -- cycle; }} %% rays in back \foreach \r/\shift/\stop/\opacity in {% 25/25/20/100, % 115/35/3/150,% 115/30/23/100} {% \foreach \i [evaluate={\opposite=\r-180;}] in {0,1,...,\stop}{% \fill [black, fill opacity = 1/\opacity] (\opposite:0.1 and 0.1/\factor) -- (\r+\shift-\i:\xandy) arc (\r+\shift-\i:\r-\shift+\i:\xandy) -- cycle; }} %% masking the four edges in the center \foreach \i in {0.1, 0.2, ..., 0.4}% \fill[black!15, opacity=0.7, path fading=fade out] (0,0) ellipse[x radius=\i, y radius =\i/\factor]; %% the light and the dark arcs \foreach \i [evaluate={\start=185+10*\i; \finish=355-10*\i;}]% in {0.1, 0.2, ..., 1.5}{% \draw[white, opacity=0.04, line width=\i, yshift=0.02cm] (\start:\xandy) arc (\start:\finish:\xandy); \draw[black!80, opacity=0.05, line width=\i, yshift=-\height] (\start:\xandy) arc (\start:\finish:\xandy); } } },% disc bottom/.style = { code = { \foreach \i/\opacity in {% 1/20,2/20,3/20,4/30,5/35,6/40,7/60,8/80,9/100,10/100,11/100,12/100}% \fill [black, fill opacity = 1/\opacity, yshift=-0.03cm] (0,-\height) ellipse [x radius = \xradius+\i/40, y radius = \yradius+\i/20/\factor]; \path pic {disc}; } },% disc top/.style = { code = { \foreach \i/\opacity in {% 2/60, 3/55, 4/50,5/40, 6/35, 7/30, 8/20, 9/20, 10/20, 11/20, 12/20, 13/20, 14/20, 15/20, 16/20, 17/20, 18/20, 19/20, 20/20, 21/20, 22/20, 23/20, 24/20, 25/20, 26/20}% \fill [black, fill opacity = 1/\opacity, yshift=-0.35cm] (0,-\height) ellipse [x radius = \xradius-\i/40, y radius = \yradius-\i/20/\factor]; \path pic {disc}; } } } \begin{document} \begin{tikzpicture} \path (0,0) pic {disc bottom} (0,1.4) pic {disc top} (0,2.8) pic {disc top}; \end{tikzpicture} \end{document}
\documentclass{standalone} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} %%Create a style for the arrows we are using \tikzset{normal arrow/.style={draw,-triangle 45,very thick}} %%Create the different coordinates to place the nodes \path (0,0) coordinate (1) ++(0,-2) coordinate (2) ++(0,-2) coordinate (3); \path (1) ++(-3,-.2) coordinate (x1); \path (3) ++(-3, .2) coordinate (x2); %%Use the calc library and partway modifiers to generate the second and third level points \path ($(1)!.5!(2)!3 cm!90:(2)$) coordinate (4); \path ($(2)!.5!(3)!3 cm!90:(3)$) coordinate (5); \path ($(4)!.5!(5)!3 cm!90:(5)$) coordinate (6); \path (6) ++(3,0) coordinate (7); %%Place nodes at each point using the foreach construct \foreach \i/\color in {1/Magenta!60,2/MidnightBlue!60,3/CadetBlue!80,4/CadetBlue!80,5/CadetBlue!80,6/CadetBlue!80}{ \node[draw,circle,shading=axis,top color=\color, bottom color=\color!black,shading angle=45] (n\i) at (\i) {$f_{\i}(e)$}; } %%Place the remaining nodes separately \node (nx1) at (x1) {$\mathbf{x_1}$}; \node (nx2) at (x2) {$\mathbf{x_2}$}; \node (ny) at (7) {$\mathbf{y}$}; %%Drawing the arrows \path[normal arrow] (nx1) -- (n1); \path[normal arrow] (nx1) -- (n3); \path[normal arrow] (nx2) -- (n1); \path[normal arrow] (nx2) -- (n3); \path[normal arrow] (n1) -- (n4); \path[normal arrow] (n1) -- (n5); \path[normal arrow] (n2) -- (n4); \path[normal arrow] (n2) -- (n5); \path[normal arrow] (n3) -- (n4); \path[normal arrow] (n3) -- (n5); \path[normal arrow] (n4) -- (n6); \path[normal arrow] (n5) -- (n6); \path[normal arrow] (n6) -- (ny); %%Drawing the cyan arrows including the labels \path[normal arrow,Cyan] (nx1) -- node[above=.5em,Cyan] {$\mathbf{w_{(x1)2}}$} (n2); \path[normal arrow,Cyan] (nx2) -- node[below=.5em,Cyan] {$\mathbf{w_{(x2)2}}$} (n2); \end{tikzpicture} \end{document}
\documentclass[border=10]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,shapes,arrows} \newcommand{\symbolA}{ % red symbol \tikz \draw[red] (0,0)--(0,0.2)--(0.2,0.2)--(0.2,0.4)--(0.4,0.4); } \newcommand{\symbolB}{ % blue symbol \tikz[y={(0,-1)}] \draw[blue] (0,0)--(0,0.2)--(0.2,0.2)--(0.2,0.4)--(0.4,0.4); } \newcommand{\symbolC}{ % another way to add symbols \begin{tikzpicture} \draw[fill=green] (0,0) circle (0.2cm); \end{tikzpicture} } \begin{document} \tikzstyle{block} = [draw, fill=blue!20, rectangle, minimum height=3em, minimum width=6em] \tikzstyle{sum} = [draw, fill=blue!20, circle, node distance=1cm] \tikzstyle{input} = [coordinate] \tikzstyle{output} = [coordinate] \tikzstyle{pinstyle} = [pin edge={to-, thin, black}] % The block diagram code is probably more verbose than necessary \begin{tikzpicture}[auto, node distance=2cm, >=latex'] % We start by placing the blocks \node [input, name=input] {}; \node [sum, right of=input] (sum) {}; \node [block, right of=sum] (controller) {\symbolA}; % add label to controller \node[above of=controller] (ctrlabel) [yshift=-0.75cm] {Controller}; % add arrow from label to box \draw[->] (ctrlabel) -- (controller); % this is option 1: adding label on top % \node [block, right of=controller, pin={[pinstyle] above:Disturbances}, % node distance=3cm] (system) {\symbolB}; % this option 2: adding label on top \node [block, right of=controller, node distance=3cm] (system) {\symbolB}; % add label "Disturbances" above system \node[above of=system] (syslabel) [yshift=-0.75cm] {Disturbances}; \draw[->] (syslabel) -- (system); % We draw an edge between the controller and system block to % calculate the coordinate "u". We need it to place the measurement block. \draw [->] (controller) -- node[name=u] {$u$} (system); \node [output, right of=system] (output) {}; \node [block, below of=u] (measurements) {\symbolC}; % add label to "measurements" block \node[below of=measurements] (mealabel) [yshift=0.75cm] {Measurements}; \draw[->] (mealabel) -- (measurements); % Once the nodes are placed, connecting them is easy. \draw [draw,->] (input) -- node {$r$} (sum); \draw [->] (sum) -- node {$e$} (controller); \draw [->] (system) -- node [name=y] {$y$}(output); \draw [->] (y) |- (measurements); % \draw [->] (measurements) -| node[pos=0.99] {$-$} % node [near end] {$y_m$} (sum); \draw [->] (measurements) -| node [near end] {$y_m$} (sum); \draw (sum) node [yshift=-7, xshift=-7] {$-$}; \end{tikzpicture} \end{document}
\documentclass[0pt]{article} \usepackage{pgf,tikz} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} %\SweaveOpts{concordance=TRUE} \definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1} \definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm] \draw [color=cqcqcq,, xstep=1cm,ystep=1cm] (-11.22,-7.62) grid (8.54,8.3); \draw[->,color=black] (-11.22,0) -- (8.54,0); \foreach \x in {-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$}; \draw[->,color=black] (0,-7.62) -- (0,8.3); \foreach \y in {-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$}; \clip(-11.22,-7.62) rectangle (8.54,8.3); \draw [rotate around={-27.068368650285745:(-4.32,2.45)},line width=2pt] (-4.32,2.45) ellipse (4.618210097836655cm and 3.463721193710664cm); \draw (-4.98,-1.58) node[anchor=north west] {ellipse}; \begin{scriptsize} \draw [fill=ududff] (-7.04,3.84) circle (2.5pt); \draw[color=ududff] (-6.85,4.35) node {$A$}; \draw [fill=ududff] (-1.6,1.06) circle (2.5pt); \draw[color=ududff] (-1.41,1.57) node {$B$}; \draw [fill=ududff] (-3.78,-1.26) circle (2.5pt); \draw[color=ududff] (-3.59,-0.75) node {$C$}; \draw[color=black] (-5.11,6.09) node {$c$}; \draw [fill=ududff] (-6.64,-1.24) circle (2.5pt); \draw[color=ududff] (-6.45,-0.73) node {$D$}; \end{scriptsize} \end{tikzpicture} \end{document}
\documentclass[crop, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \definecolor{bluport}{HTML}{21ADFD} \definecolor{orgport}{HTML}{E37322} \definecolor{pplport}{HTML}{4F21E9} \definecolor{redport}{HTML}{701315} \begin{document} \begin{tikzpicture} \fill[pplport!15] (0, 0) ellipse (0.25 and 3); \fill[redport!15] (2.75, -3) rectangle (3.25, 3); \fill[bluport!15] (6, 0) ellipse (0.25 and 3); \fill[orgport!15] (9, 0) ellipse (0.25 and 3); \draw[thick, pplport] (0, 0) ellipse (0.25 and 3); \draw[ultra thick, pplport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (0, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, pplport] (1) at (0, -3.5) {\emph{stash}}; \draw[ultra thick, redport] (2.75, -3) rectangle (3.25, 3); \node[text height=1em, text depth=1em, redport] (2) at (3, -3.5) {\emph{working directory}}; \draw[thick, orgport] (9, 0) ellipse (0.25 and 3); \draw[ultra thick, orgport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (9, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, orgport] (4) at (9, -3.5) {\emph{repository}}; \draw[-stealth, very thick] (6, 2) -- node[above] {\tt\footnotesize git commit} (9, 2); \draw[-stealth, very thick] (9, 1) -- node[above] {\tt\footnotesize git checkout} (6, 1); \draw[-stealth, very thick] (9, 0) -- node[above] {\tt\footnotesize git reset} (6, 0); \draw[very thick] (6, -2) -- node[above] {\tt\scriptsize git diff -{}-staged} (9, -2); \draw[very thick] (3, -2.5) -- node[above, pos=0.75] {\tt\scriptsize git diff HEAD} (9, -2.5); \draw[-stealth, very thick] (9, -0.5) -- node[above, pos=0.25] {\tt\footnotesize git rebase} (3, -0.5); \draw[-stealth, very thick] (9, -1) -- node[above, pos=0.25] {\tt\footnotesize git merge} (3, -1); % draw the blue portal here for the portal effect \draw[thick, bluport] (6, 0) ellipse (0.25 and 3); \draw[ultra thick, bluport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (6, 0) ellipse (0.23 and 3.05); \node[text height=1em, text depth=1em, bluport] (3) at (6, -3.5) {\emph{index}}; % Redraw some lines for piercing effect through blu port \draw[-stealth, very thick] (6, -0.5) -- (3, -0.5); \draw[-stealth, very thick] (6, -1) -- (3, -1); \draw[very thick] (3, -2.5) -- (6, -2.5); \draw[-stealth, very thick] (3, 2.5) -- node[above] {\tt\footnotesize git add/rm} (6, 2.5); \draw[-stealth, very thick] (3, 1.5) -- node[above] {\tt\footnotesize git stash save} (0, 1.5); \draw[-stealth, very thick] (6, 1) -- node[above] {\tt\footnotesize git checkout} (3, 1); \draw[-stealth, very thick] (0, 0.5) -- node[above] {\tt\footnotesize git stash pop} (3, 0.5); \draw[-stealth, very thick] (0, -0.5) -- node[above] {\tt\footnotesize git stash apply} (3, -0.5); \draw[very thick] (3, -1.5) -- node[above] {\tt\footnotesize git diff} (6, -1.5); \end{tikzpicture} \end{document}
\documentclass[landscape]{article} \usepackage{tikz} \usepackage[margin=1in]{geometry} \usetikzlibrary{arrows.meta} \usetikzlibrary{scopes} \newcommand{\fluidcontainer}{ \begin{scope} \draw [rounded corners, line width=2pt] (0, 7) -- (0,0) -- (6,0) -- (6,2) -- (7,2); \draw [rounded corners, line width=2pt] (7,3) -- (6,3) -- (6,7); \draw[-{Stealth[length=0.25cm]},blue_annot] (3,8.5) -- (3,7.5) node[pos=0.5,left] {\large $p_{1}$} ; \draw[-{Stealth[length=0.25cm]},blue_annot] (8.5,2.8) -- (7.5,2.8) node[pos=0.5,above] {\large $p_{2}$} ; \draw[red_annot] (1,8) node[above] {\large $R_{1}$} to [bend left=15] (1.5,6.6); \draw[red_annot] (7.5,4) node[above] {\large $R_{2}$} to [bend right=20] (6.4,2.5); \node[red_annot] at (3,3.5) {\Large $R_{3}$}; \draw[{Stealth[length=0.3cm]}-{Stealth[length=0.3cm]}] (-1,6.8) -- (-1,2.5) node[pos=0.5,left] {$h$}; \draw[-{Stealth[length=0.2cm]}] (7,7.5) -- (7,6.8); \draw[-{Stealth[length=0.2cm]}] (7,5.7) -- (7,6.4); \node at (7.5,6.6) {\large $\Delta s_{1}$}; \draw[-{Stealth[length=0.2cm]}] (5.3,1) -- (6,1); \draw[-{Stealth[length=0.2cm]}] (7.5,1) -- (6.8,1); \node at (6.5,0.7) {\large $\Delta s_{2}$}; \end{scope} } \begin{document} \definecolor{fluid_color}{RGB}{255,247,153} \definecolor{blue_annot}{RGB}{0,0,255} \definecolor{red_annot}{RGB}{255,0,0} \definecolor{level_color}{RGB}{0,190,0} \begin{tikzpicture}[scale=1,level dashed/.style={level_color, line width=1pt, dash pattern=on 4pt off 2pt},level solid/.style={level_color, line width=2pt}] \begin{scope}[shift={(0cm,0cm)}] \path [fill=fluid_color] (0,0) -- (6,0) -- (6,6.8) -- (0,6.8) -- cycle; \draw[level solid] (0,6.8) -- (6,6.8); \draw[level dashed] (0,6.4) -- (6,6.4); \draw[level solid] (6,1.5) -- (6,3.5); \draw[level dashed] (6.8,2) -- (6.8,3); \fluidcontainer; \draw[-{Stealth[length=0.25cm]},blue_annot] (5,6.8) -- (5,5) node[pos=0.5,left] {\large $v_{1}$} ; \draw[-{Stealth[length=0.25cm]},blue_annot] (6,2.4) -- (7.7,2.4) node[pos=0.75,below] {\large $v_{2}$} ; \end{scope} \begin{scope}[shift={(11cm,0cm)}] \path [fill=fluid_color] (0,0) -- (6,0) -- (6,2) -- (6.8,2) -- (6.8,3) -- (6,3) -- (6,6.4) -- (0,6.4) -- cycle; \draw[level dashed] (0,6.8) -- (6,6.8); \draw[level solid] (0,6.4) -- (6,6.4); \draw[level dashed] (6,1.5) -- (6,3.5); \draw[level solid] (6.8,2) -- (6.8,3); \fluidcontainer; \draw[-{Stealth[length=0.25cm]},blue_annot] (5,6.4) -- (5,4.6) node[pos=0.5,left] {\large $v_{1}$} ; \draw[-{Stealth[length=0.25cm]},blue_annot] (6.8,2.4) -- (8.5,2.4) node[pos=0.7,below] {\large $v_{2}$} ; \end{scope} \node at (8.5,-1.5) {\Large \textbf{Fig. 1} \hspace{0.2cm} Fluid before and after time $\Delta t$. }; \end{tikzpicture} \end{document}
\documentclass{article} \usepackage[paperwidth=4in,paperheight=4in]{geometry} \usepackage{tikz} \begin{document} \usetikzlibrary{arrows} \begin{tikzpicture} % Draw axes \draw [thick] (0,5) node (yaxis) [above] {$y$} |- (5,0) node (xaxis) [right] {$x$}; % draw line \draw (0,-1) -- (5,4); % y=x-1 \draw[dashed] (-1,0) -- (4,5); % y=x+1 \draw[dashed] (2,-1) -- (6,3); % y=x-3 % \draw labels \draw (3.5,3) node[rotate=45,font=\small] {$\mathbf{w}\cdot \mathbf{x} + b = 0$}; \draw (2.5,4) node[rotate=45,font=\small] {$\mathbf{w}\cdot \mathbf{x} + b = 1$}; \draw (4.5,2) node[rotate=45,font=\small] {$\mathbf{w}\cdot \mathbf{x} + b = -1$}; % draw distance \draw[dotted] (4,5) -- (6,3); \draw (5.25,4.25) node[rotate=-45] {$\frac{2}{\Vert \mathbf{w} \Vert}$}; \draw[dotted] (0,0) -- (0.5,-0.5); \draw (0,-0.5) node[rotate=-45] {$\frac{b}{\Vert \mathbf{w} \Vert}$}; \draw (2,1) -- (1.5,1.5); \draw (1.85,1.35) node[rotate=-45] {$\mathbf{w}$}; % draw negative dots \fill[red] (0.5,1.5) circle (3pt); \fill[red] (1.5,2.5) circle (3pt); \fill[black] (1,2.5) circle (3pt); \fill[black] (0.75,2) circle (3pt); \fill[black] (0.6,1.9) circle (3pt); \fill[black] (0.77, 2.5) circle (3pt); \fill[black] (1.5,3) circle (3pt); \fill[black] (1.3,3.3) circle (3pt); \fill[black] (0.6,3.2) circle (3pt); % draw positive dots \draw[red,thick] (4,1) circle (3pt); \draw[red,thick] (3.3,.3) circle (3pt); \draw[black] (4.5,1.2) circle (3pt); \draw[black] (4.5,.5) circle (3pt); \draw[black] (3.9,.7) circle (3pt); \draw[black] (5,1) circle (3pt); \draw[black] (3.5,.2) circle (3pt); \draw[black] (4,.3) circle (3pt); \end{tikzpicture} \end{document}
\documentclass{article} \usepackage{tikz} %%%< \usepackage{verbatim} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{10pt}% %%%> \begin{comment} :Title: Direction-of-arrival diagram :Tags: Diagrams;Styles; :Author: Edgar Fuentes :Slug: doa-diagram This diagram explains a spatial filter with direction of arrival estimation. \end{comment} \usetikzlibrary{shapes.geometric} \usetikzlibrary{shapes.arrows} \usepackage{array} \begin{document} \begin{tikzpicture} [ auto, decision/.style = { diamond, draw=blue, thick, fill=blue!20, text width=5em, text badly centered, inner sep=1pt, rounded corners }, block/.style = { rectangle, draw=blue, thick, fill=blue!20, text width=10em, text centered, rounded corners, minimum height=2em }, line/.style = { draw, thick, ->, shorten >=2pt }, ] % Define nodes in a matrix \matrix [column sep=5mm, row sep=10mm] { & \node [text centered] (x) {$\mathbf{X}$}; & \\ & \node (null1) {}; & \\ & \node [block] (doa) {\textsf{DoAE}($\mathbf{X}$)}; & \\ \node(null3){}; & \node [decision] (uiddes) {\textsf{UID}($\hat{\mathbf{X}}$)}; & \node[text centered](tra){$\mathbf{i}$}; \\ & \node [block] (track) {\textsf{DoAT}($\mathbf{x}$)}; & \\ & \node [block] (pesos) {\textsf{BF}(DoA$_{\mathrm{T}}$,DoAs)}; & \\ & \node [block] (filtrado) {\textsf{SF}($\mathbf{w}$,$\mathbf{x}$)}; & \\ & \node [text centered] (xf) {$\hat{x}(t)$ }; & \\ }; % connect all nodes defined above \begin{scope} [every path/.style=line] \path (x) -- (doa); \path (doa) -- node [near start] {DoAs} (uiddes); \path (tra) -- (uiddes); \path (uiddes) --++ (-3,0) node [near start] {no} |- (null1); \path (uiddes) -- node [near start] {DoA} (track); \path (track) -- node [near start] {DoA$_{\mathrm{T}}$} (pesos); \path (pesos) -- node [near start] {\textbf{w}} (filtrado); \path (filtrado) -- (xf); \end{scope} % % legend for subprocedures \node (leyend) at (7.5, 5){ \begin{tabular}{>{\sffamily}l@{: }l} \multicolumn{2}{c}{\textbf{subprocedures}} \\ DoAE & direction of arrival estimation \\ UID & user identification \\ DoAT & DoA tracking \\ BF & beam forming \\ SF & spatial filtering \end{tabular} }; % % legend for input and output variables \node (leyend) at (7, 0){ \begin{tabular}{l@{: }l} \multicolumn{2}{c}{\textbf{variables}} \\ DoA & direction of arrival \\ $\mathbf{i}$ & identification sequence \\ $\mathbf{X},\,\mathbf{x}$ & signal model \\ DoA$_{\mathrm{T}}$ & DoAs up to date \\ $\hat{x}(t)$ & fitered signal \end{tabular} }; \end{tikzpicture} \end{document}