misc edits
[pec.git] / tikz-setup.tex
blob621b7ad29547fbc66ffee1ddb0b018c6a1324a8b
1 \usepackage{tikz}
2 \usepackage{gnuplot-lua-tikz}
4 \usetikzlibrary{shapes,arrows,decorations}
5 \usetikzlibrary{decorations.text,decorations.pathreplacing}
7 % tikz setup
8 \tikzstyle{board} = [rectangle, draw, rounded corners,
9 font=\footnotesize, fill=gray!20,
10 very thick, draw=gray,
11 minimum height=3em, minimum width=3em,
12 node distance=2em]
13 \tikzstyle{cord} = [-hooks reversed, very thick, draw=black]
14 \tikzstyle{sboard} = [board, yslant=0.5, xslant=-1,]
15 \tikzstyle{fboard} = [yslant=0.5, xslant=-1,
16 minimum height=2.8em, minimum width=2.8em,]
17 \tikzstyle{mut-op} = [->, black, thick, bend right=90, distance=0.75em]
18 \tikzstyle{sub-pop} = [font=\footnotesize]
20 \def\board(#1,#2){
21 % processor
22 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
23 scale=0.75, yslant=0.5, xslant=-1]
24 at (#1+0.125,#2+0.0675) {};
25 % button
26 \node [rectangle, draw, fill=white!80,
27 scale=0.25, yslant=0.5, xslant=-1]
28 at (#1-0.2,#2) {};
29 % other stuff
30 \node [rectangle, draw, fill=black!80, draw=black!80,
31 scale=0.16, yslant=0.5, xslant=-1,
32 minimum width=3em, minimum height=1em]
33 at (#1,#2-0.16) {};
34 % connectors
35 \foreach \xb in {0.425,-0.425} {
36 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
37 minimum width=1em, minimum height=6em,scale=0.125,
38 yslant=0.5, xslant=-1]
39 at (#1+\xb,#2) {};
40 \foreach \t in {-0.15,-0.1,...,0.15}{
41 \draw [color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.85,#2+\t); }
43 \foreach \yb in {0.425,-0.425} {
44 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
45 minimum height=1em, minimum width=6em,scale=0.125,
46 yslant=0.5, xslant=-1]
47 at (#1,#2+\yb) {};
48 \foreach \t in {-0.15,-0.1,...,0.15}{
49 \draw [color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.85); }
52 \def\flatboard(#1,#2){
53 % processor
54 \node [rectangle, draw, very thick, fill=black!80, draw=black!80, scale=0.75]
55 at (#1+0.125,#2+0.0675) {};
56 % button
57 \node [rectangle, draw, fill=white!80, scale=0.25]
58 at (#1-0.2,#2) {};
59 % other stuff
60 \node [rectangle, draw, fill=black!80, draw=black!80,
61 scale=0.16,
62 minimum width=3em, minimum height=1em]
63 at (#1,#2-0.16) {};
64 % connectors
65 \foreach \xb in {0.425,-0.425} {
66 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
67 minimum width=1em, minimum height=6em,scale=0.125]
68 at (#1+\xb,#2) {};
69 \foreach \t in {-0.15,-0.1,...,0.15}{
70 \draw [color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.85,#2+\t); }
72 \foreach \yb in {0.425,-0.425} {
73 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
74 minimum height=1em, minimum width=6em,scale=0.125]
75 at (#1,#2+\yb) {};
76 \foreach \t in {-0.15,-0.1,...,0.15}{
77 \draw [color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.85); }
80 \def\bflatboard(#1,#2){
81 % processor
82 \node [rectangle, draw, very thick, fill=black!80, draw=black!80, scale=3]
83 at (#1+0.125,#2+0.0675) {};
84 % button
85 \node [rectangle, draw, fill=white!80, scale=0.75]
86 at (#1-0.2,#2) {};
87 % other stuff
88 \node [rectangle, draw, fill=black!80, draw=black!80,
89 scale=0.64,
90 minimum width=3em, minimum height=1em]
91 at (#1,#2-0.16) {};
92 % connectors
93 \foreach \xb in {0.425,-0.425} {
94 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
95 minimum width=1em, minimum height=6em,scale=0.8]
96 at (#1+\xb,#2) {};
97 \foreach \t in {-0.075,-0.05,...,0.075}{
98 \draw [very thick, color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.9,#2+\t); }
100 \foreach \yb in {0.425,-0.425} {
101 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
102 minimum height=1em, minimum width=6em,scale=0.8]
103 at (#1,#2+\yb) {};
104 \foreach \t in {-0.075,-0.05,...,0.075}{
105 \draw [very thick, color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.9); }
108 \def\individual(#1,#2,#3){
109 {\footnotesize
110 \path [decorate, decoration={text along path,text={#3}}]
111 (#1-0.75,#2) to (#1+0.75,#2);