schemes
[pec.git] / tikz-setup.tex
blob57752a0383b717e2159b3a344cf0a45a94a42e15
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{inboard} = [rectangle, text width=1.65em,
14 font=\scriptsize, fill=gray!20,
15 minimum height=2em, minimum width=1.65em,
16 node distance=2em]
17 \tikzstyle{cord} = [-hooks reversed, very thick, draw=black]
18 \tikzstyle{sboard} = [board, yslant=0.5, xslant=-1,]
19 \tikzstyle{fboard} = [yslant=0.5, xslant=-1,
20 minimum height=2.8em, minimum width=2.8em,]
21 \tikzstyle{mut-op} = [->, black, thick, bend right=90, distance=0.75em]
22 \tikzstyle{sub-pop} = [font=\footnotesize]
24 \def\board(#1,#2){
25 % processor
26 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
27 scale=0.75, yslant=0.5, xslant=-1]
28 at (#1+0.125,#2+0.0675) {};
29 % button
30 \node [rectangle, draw, fill=white!80,
31 scale=0.25, yslant=0.5, xslant=-1]
32 at (#1-0.2,#2) {};
33 % other stuff
34 \node [rectangle, draw, fill=black!80, draw=black!80,
35 scale=0.16, yslant=0.5, xslant=-1,
36 minimum width=3em, minimum height=1em]
37 at (#1,#2-0.16) {};
38 % connectors
39 \foreach \xb in {0.425,-0.425} {
40 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
41 minimum width=1em, minimum height=6em,scale=0.125,
42 yslant=0.5, xslant=-1]
43 at (#1+\xb,#2) {};
44 \foreach \t in {-0.15,-0.1,...,0.15}{
45 \draw [color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.85,#2+\t); }
47 \foreach \yb in {0.425,-0.425} {
48 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
49 minimum height=1em, minimum width=6em,scale=0.125,
50 yslant=0.5, xslant=-1]
51 at (#1,#2+\yb) {};
52 \foreach \t in {-0.15,-0.1,...,0.15}{
53 \draw [color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.85); }
56 \def\flatboard(#1,#2){
57 % processor
58 \node [rectangle, draw, very thick, fill=black!80, draw=black!80, scale=0.75]
59 at (#1+0.125,#2+0.0675) {};
60 % button
61 \node [rectangle, draw, fill=white!80, scale=0.25]
62 at (#1-0.2,#2) {};
63 % other stuff
64 \node [rectangle, draw, fill=black!80, draw=black!80,
65 scale=0.16,
66 minimum width=3em, minimum height=1em]
67 at (#1,#2-0.16) {};
68 % connectors
69 \foreach \xb in {0.425,-0.425} {
70 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
71 minimum width=1em, minimum height=6em,scale=0.125]
72 at (#1+\xb,#2) {};
73 \foreach \t in {-0.15,-0.1,...,0.15}{
74 \draw [color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.85,#2+\t); }
76 \foreach \yb in {0.425,-0.425} {
77 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
78 minimum height=1em, minimum width=6em,scale=0.125]
79 at (#1,#2+\yb) {};
80 \foreach \t in {-0.15,-0.1,...,0.15}{
81 \draw [color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.85); }
84 \def\bflatboard(#1,#2){
85 % processor
86 \node [rectangle, draw, very thick, fill=black!80, draw=black!80, scale=3]
87 at (#1+0.125,#2+0.0675) {};
88 % button
89 \node [rectangle, draw, fill=white!80, scale=0.75]
90 at (#1-0.2,#2) {};
91 % other stuff
92 \node [rectangle, draw, fill=black!80, draw=black!80,
93 scale=0.64,
94 minimum width=3em, minimum height=1em]
95 at (#1,#2-0.16) {};
96 % connectors
97 \foreach \xb in {0.425,-0.425} {
98 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
99 minimum width=1em, minimum height=6em,scale=0.8]
100 at (#1+\xb,#2) {};
101 \foreach \t in {-0.075,-0.05,...,0.075}{
102 \draw [very thick, color=orange] (#1+\xb,#2+\t) to (#1+\xb*0.9,#2+\t); }
104 \foreach \yb in {0.425,-0.425} {
105 \node [rectangle, draw, very thick, fill=black!80, draw=black!80,
106 minimum height=1em, minimum width=6em,scale=0.8]
107 at (#1,#2+\yb) {};
108 \foreach \t in {-0.075,-0.05,...,0.075}{
109 \draw [very thick, color=orange] (#1+\t,#2+\yb) to (#1+\t,#2+\yb*0.9); }
112 \def\individual(#1,#2,#3){
113 {\footnotesize
114 \path [decorate, decoration={text along path,text={#3}}]
115 (#1-0.75,#2) to (#1+0.75,#2);