-
Notifications
You must be signed in to change notification settings - Fork 3
/
switch.tex
60 lines (52 loc) · 2.14 KB
/
switch.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\documentclass{standalone}
\usepackage{tikz,rxmarbles}
\usetikzlibrary[arrows,shapes,positioning,matrix,calc]
\begin{document}
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\draw [time] (0,0) -- (5.4,0);
\begin{scope}[xshift=0.5cm,rotate=-21]
\draw [time] (0,0) -- (3.1,0);
\coordinate (0x0) at (0,0);
\node[marble,diamond,magenta] (0x0x0) at (0.75,0) {};
\node[marble,diamond,magenta] (0x1x0) at (1.5,0) {};
\node[marble,diamond,magenta] (0x2x0) at (2.25,0) {};
\node[complete,rotate=-21] (0x3x0) at (2.7,0) {};
\end{scope}
\begin{scope}[xshift=2.25cm,rotate=-21]
\draw [time] (0,0) -- (3.5,0);
\coordinate (1x0) at (0,0);
\node[marble,diamond,yellow] (1x0x0) at (0.65,0) {};
\node[marble,diamond,yellow] (1x1x0) at (1.4,0) {};
\node[marble,diamond,yellow] (1x2x0) at (2.15,0) {};
\node[complete,rotate=-21] (1x3x0) at (3.1,0) {};
\end{scope}
\node[complete] (2x0) at (4.9,0) {};
\\
\node[box,minimum width=7cm] (op) {Switch};
\\
\draw [time] (0,0) -- (5.65,0);
\path let \p1 = (0x0x0) in node[marble,diamond,magenta] (0x2) at (\x1,0) {};
\path let \p1 = (0x1x0) in node[marble,diamond,magenta] (1x2) at (\x1,0) {};
\path let \p1 = (1x0x0) in node[marble,diamond,yellow] (2x2) at (\x1,0) {};
\path let \p1 = (1x1x0) in node[marble,diamond,yellow] (3x2) at (\x1,0) {};
\path let \p1 = (1x2x0) in node[marble,diamond,yellow] (4x2) at (\x1,0) {};
\path let \p1 = (1x3x0) in node[complete] (5x2) at (\x1,0) {};
\\
};
\draw [fdash] (0x0) -- (0x0|-op.north);
\draw [fdash] (1x0) -- (1x0|-op.north);
\draw [dashed,color=gray] (0x0x0) -- (0x0x0|-op.north);
\draw [dashed,color=gray] (0x1x0) -- (0x1x0|-op.north);
\draw [dashed,color=gray] (1x0x0) -- (1x0x0|-op.north);
\draw [dashed,color=gray] (1x1x0) -- (1x1x0|-op.north);
\draw [dashed,color=gray] (1x2x0) -- (1x2x0|-op.north);
\draw [rdash,color=gray] (0x2) -- (0x2|-op.south);
\draw [rdash,color=gray] (1x2) -- (1x2|-op.south);
\draw [rdash,color=gray] (2x2) -- (2x2|-op.south);
\draw [rdash,color=gray] (3x2) -- (3x2|-op.south);
\draw [rdash,color=gray] (4x2) -- (4x2|-op.south);
\draw [rdash] (5x2) -- (5x2|-op.south);
\end{tikzpicture}
\end{document}