-
Notifications
You must be signed in to change notification settings - Fork 19
/
input-toggle.tex
160 lines (144 loc) · 3.59 KB
/
input-toggle.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
\input{diagrams}
\def \FastRender{0}
\def \ShowWatermarks{0}
\def \ShowIdealWatermarkOnly{1}
\def \InputVersion{8}
\newcommand {\DrawToggle}[9] {
% #1 = value
% #2 = x
% #3 = frame
% #4 = fill 1
% #5 = draw 1
% #6 = y1 (bottom)
% #7 = fill 2
% #8 = draw 2
% #9 = y2 (top)
\contourlength{\InputContour}
\def \NumFrames{24}
\def \tx{\ox + #2}
\def \ty{{\oy + #9 - (#9 - #6) * #3 / \NumFrames}}
\def \OpacityA{#3 / \NumFrames}
\def \OpacityB{1 - \OpacityA}
\draw[c_back_light,-,densely dotted,line width=.75pt] (\tx, \oy + #6) -- (\tx, \oy + #9);
\filldraw[c_back_light] (\tx, \oy + #6) circle [radius=1pt];
\filldraw[c_back_light] (\tx, \oy + #9) circle [radius=1pt];
\filldraw[#4, draw=black] (\tx, \ty) circle [radius=6pt];
\node[#5,font=\bf\sffamily] at (\tx, \ty) {\contour{black}{#1}};
\begin{scope}[transparency group,opacity=\OpacityB]
\filldraw[#7, draw=black, opacity=\OpacityB] (\tx, \ty) circle [radius=6pt];
\node[#8,font=\bf\sffamily,text opacity=\OpacityB] at (\tx, \ty) {\contour{black}{#1}};
\end{scope}
}
\newcommand{\DrawToggles}[1] {
\def \FillA{c_datum_back}
\def \DrawA{c_datum_text}
\def \FillB{c_toggle_b}
\def \DrawB{c_datum_text}
\DrawToggle{5}{0.444}{#1}{\FillA}{\DrawA}{.333}{\FillB}{\DrawB}{2.111}
\DrawToggle{7}{2.444}{#1}{\FillA}{\DrawA}{.666}{\FillB}{\DrawB}{.888}
\DrawToggle{8}{3.111}{#1}{\FillA}{\DrawA}{2.111}{\FillB}{\DrawB}{1.777}
\DrawToggle{3}{3.666}{#1}{\FillA}{\DrawA}{1.222}{\FillB}{\DrawB}{1.111}
\DrawToggle{4}{4.333}{#1}{\FillA}{\DrawA}{1.666}{\FillB}{\DrawB}{3.888}
\DrawToggle{3}{6.666}{#1}{\FillA}{\DrawA}{2.333}{\FillB}{\DrawB}{1.999}
\DrawToggle{8}{7.444}{#1}{\FillA}{\DrawA}{3.666}{\FillB}{\DrawB}{2.555}
\DrawToggle{1}{7.777}{#1}{\FillA}{\DrawA}{4.0}{\FillB}{\DrawB}{3.222}
\DrawToggle{9}{1.444}{#1}{\FillA}{\DrawA}{3.333}{\FillB}{\DrawB}{1.333}
}
\newcommand{\ToggleDiagram}[1] {
\TriggersDiagram[c_back_dark]{5.222}{
\DrawToggles{#1}
}
}
\ToggleDiagram{0}
\if \FastRender 0
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{0}
\ToggleDiagram{1}
\ToggleDiagram{2}
\ToggleDiagram{3}
\ToggleDiagram{4}
\fi % \FastRender 0
\ToggleDiagram{5}
\if \FastRender 0
\ToggleDiagram{6}
\ToggleDiagram{7}
\ToggleDiagram{8}
\ToggleDiagram{9}
\ToggleDiagram{10}
\ToggleDiagram{11}
\ToggleDiagram{12}
\ToggleDiagram{13}
\ToggleDiagram{14}
\ToggleDiagram{15}
\ToggleDiagram{16}
\ToggleDiagram{17}
\ToggleDiagram{18}
\ToggleDiagram{19}
\ToggleDiagram{20}
\ToggleDiagram{21}
\ToggleDiagram{22}
\ToggleDiagram{23}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\ToggleDiagram{24}
\fi % \FastRender 0
\ToggleDiagram{24}
\if \FastRender 0
\ToggleDiagram{23}
\ToggleDiagram{22}
\ToggleDiagram{21}
\ToggleDiagram{20}
\ToggleDiagram{19}
\ToggleDiagram{18}
\ToggleDiagram{17}
\ToggleDiagram{16}
\ToggleDiagram{15}
\ToggleDiagram{14}
\ToggleDiagram{13}
\ToggleDiagram{12}
\ToggleDiagram{11}
\ToggleDiagram{10}
\ToggleDiagram{9}
\ToggleDiagram{8}
\ToggleDiagram{7}
\ToggleDiagram{6}
\ToggleDiagram{5}
\ToggleDiagram{4}
\ToggleDiagram{3}
\ToggleDiagram{2}
\ToggleDiagram{1}
\fi % \FastRender 0
\end{document}