Debian Codegraph @

texmf-dist/fonts/source/public/circ/cicirc.mf

raw
1 %%
2 %% This is file `cicirc.mf',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% circ.dtx (with options: `csycirc')
8 %% CIRC is a LaTeX package to typeset circuit and optics diagrams.
9 %% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
10 %%
11 %% This program is free software; you can redistribute it and/or modify
12 %% it under the terms of the GNU General Public License as published by
13 %% the Free Software Foundation; either version 2 of the License, or
14 %% (at your option) any later version.
15 %%
16 %% This program is distributed in the hope that it will be useful,
17 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
18 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 %% GNU General Public License for more details.
20 %%
21 %% You should have received a copy of the GNU General Public License
22 %% along with this program; if not, write to the Free Software
23 %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 %%
25 %% For error reports concerning UNCHANGED versions of this file no
26 %% more than one year old, see CIRC.DVI after installation.
27 %% If installation fails search thru this file for 'bug'.
28 input csym;
29
30 designsize:=2lLE#;
31
32 fontdimen10: .4gat_ht#;
33 fontdimen11: .65gat_lt#;
34
35 fontdimen12: .5pin_lt#;
36 fontdimen13: pin_spc#;
37 fontdimen14: .5ios_wd#+.5pin_lt#;
38 fontdimen15: mid_wd#+ios_wd#;
39 fontdimen16: ios_wd#;
40 fontdimen17: out_spc#;
41
42
43 def defcircleabout(expr p, rad)=
44 z[p]=.5[z[p+1],z[p+3]]=.5[z[p+2],z[p+4]];
45 y[p+1]=y[p+3];
46 x[p+2]=x[p+4];
47 x[p]=lft(x[p+1])-rad;
48 y[p]=top(y[p+4])+rad;
49 enddef;
50
51 def gate=
52 charic:=.5pin_spc#;
53 z0=(0,0);
54 x20=x15=x1=x6=x7= x0+pin_lt;
55 y8=y6=-y7= y0+.5gat_ht;
56 x8=x9=x10= x1+gat_lt-2pin_lt;
57 y15=-y20= y0+.5pin_spc;
58 x25-x0= gat_lt;
59
60 y9=y7; y25=y10=y1=y0;
61 x0=x26=x27;
62 y26=y15; y27=y20;
63
64 pickup pencircle scaled thickline;
65 defcircleabout(1,inv_rad);
66 defcircleabout(10,inv_rad);
67 defcircleabout(15,inv_rad);
68 defcircleabout(20,inv_rad);
69 enddef;
70
71 def segment =
72 z0=(0,0);
73 x1-x0=pin_lt; y0=y1;
74 defcircleabout(1,inv_rad); % z2 z3 z4 z5 defined
75 z1=.5[z6,z7]; x6=x7=x8;
76 y7-y6=pin_spc;
77 y8-y1=out_spc;
78 x9-x8=ios_wd; y8=y9;
79 enddef;
80
81 def topbotsegs(expr fc, myht, mydp) =
82 beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp);
83 pickup pensquare scaled thickline;
84 segment
85 draw z6--z8--z9;
86 endchar;
87 beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp);
88 pickup pensquare scaled thickline;
89 segment
90 draw z6--z8--z9;
91 pickup pensquare scaled normalline;
92 draw z0--z1;
93 endchar;
94 beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp);
95 pickup pensquare scaled thickline;
96 segment
97 draw z6--z5;
98 draw z3--z8--z9;
99 pickup pencircle scaled normalline;
100 draw fullcircle scaled 2inv_rad shifted z1;
101 pickup pensquare scaled normalline;
102 draw z0--z4;
103 endchar;
104 beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp);
105 pickup pensquare scaled thickline;
106 segment
107 draw z6--z8--z9;
108 pickup pensquare scaled normalline;
109 draw z0--z1;
110 pickup pencircle scaled normalline;
111 draw z3--z2--z5;
112 endchar;
113 enddef;
114
115 def midsegs(expr fc, myht, mydp) =
116 beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp);
117 pickup pensquare scaled thickline;
118 segment
119 draw z6--z8;
120 endchar;
121 beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp);
122 pickup pensquare scaled thickline;
123 segment
124 draw z6--z8;
125 pickup pensquare scaled normalline;
126 draw z0--z1;
127 endchar;
128 beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp);
129 pickup pensquare scaled thickline;
130 segment
131 draw z6--z5;
132 draw z3--z8;
133 pickup pencircle scaled thickline;
134 draw fullcircle scaled 2inv_rad shifted z1;
135 pickup pensquare scaled normalline;
136 draw z0--z4;
137 endchar;
138 beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp);
139 pickup pensquare scaled thickline;
140 segment
141 draw z6--z8;
142 pickup pensquare scaled normalline;
143 draw z0--z1;
144 pickup pencircle scaled normalline;
145 draw z3--z2--z5;
146 endchar;
147 enddef;
148
149 "obere Segmente Eing"&ditto&"ange";
150 topbotsegs(0,out_spc#,.5pin_spc#);
151
152 "obere Segmente Ausg"&ditto&"ange";
153 {{
154 addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
155 topbotsegs(16,out_spc#,.5pin_spc#);
156 }}
157
158 "mittlere Segmente Eing"&ditto&"ange";
159 midsegs(32,.5pin_spc#,.5pin_spc#);
160
161 "mittlere Segmente Eing"&ditto&"ange";
162 {{
163 addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
164 midsegs(48,.5pin_spc#,.5pin_spc#);
165 }}
166
167 "untere Segmente Eing"&ditto&"ange";
168 {{
169 addTF(reflectedabout(left,right));
170 topbotsegs(64,.5pin_spc#,out_spc#);
171 }}
172
173 "untere Segmente Ausg"&ditto&"ange";
174 {{
175 addTF(reflectedabout(left,right));
176 addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1)));
177 topbotsegs(80,.5pin_spc#,out_spc#);
178 }}
179
180 "oberes Zwischensegment";
181 beginchar(96,mid_wd#,out_spc#,.5pin_spc#);
182 pickup pensquare scaled thickline;
183 draw (0,out_spc)--(mid_wd,out_spc);
184 endchar;
185
186 "Zwischensegment";
187 beginchar(97,mid_wd#,.5pin_spc#,.5pin_spc#);
188 endchar;
189
190 "unteres Zwischensegment";
191 beginchar(98,mid_wd#,.5pin_spc#,out_spc#);
192 pickup pensquare scaled thickline;
193 draw (0,-out_spc)--(mid_wd,-out_spc);
194 endchar;
195
196 "Gatter: Eingang, Ausgang";
197 beginchar(128,gat_lt#,.5gat_ht#,.5gat_ht#);
198 gate;
199 pickup pensquare scaled thickline;
200 draw z6--z8--z9--z7--cycle;
201 pickup pensquare scaled normalline;
202 draw z0--z1;
203 draw z10--z25;
204 endchar;
205
206 "Gatter: Eingang negiert, Ausgang";
207 beginchar(129,gat_lt#,.5gat_ht#,.5gat_ht#);
208 gate;
209 pickup pensquare scaled thickline;
210 draw z3--z6--z8--z9--z7--z5;
211 pickup pencircle scaled thickline;
212 draw fullcircle scaled 2inv_rad shifted z1;
213 pickup pensquare scaled normalline;
214 draw z0--z4;
215 draw z10--z25;
216 endchar;
217
218 "Gatter: Eingang, Ausgang negiert";
219 beginchar(130,gat_lt#,.5gat_ht#,.5gat_ht#);
220 gate;
221 pickup pensquare scaled thickline;
222 draw z14--z9--z7--z6--z8--z12;
223 pickup pencircle scaled thickline;
224 draw fullcircle scaled 2inv_rad shifted z10;
225 pickup pensquare scaled normalline;
226 draw z0--z1;
227 draw z11--z25;
228 endchar;
229
230 "Gatter: zwei Eing"&ditto&"ange, Ausgang";
231 beginchar(131,gat_lt#,.5gat_ht#,.5gat_ht#);
232 gate;
233 pickup pensquare scaled thickline;
234 draw z6--z8--z9--z7--cycle;
235 pickup pensquare scaled normalline;
236 draw z15--z26;
237 draw z20--z27;
238 draw z10--z25;
239 endchar;
240
241 "Gatter: zwei Eing"&ditto&"ange, Ausgang negiert";
242 beginchar(132,gat_lt#,.5gat_ht#,.5gat_ht#);
243 gate;
244 pickup pensquare scaled thickline;
245 draw z14--z9--z7--z6--z8--z12;
246 pickup pencircle scaled thickline;
247 draw fullcircle scaled 2inv_rad shifted z10;
248 pickup pensquare scaled normalline;
249 draw z15--z26;
250 draw z20--z27;
251 draw z11--z25;
252 endchar;
253
254 "Gatter alt AND: zwei Eing"&ditto&"ange, Ausgang";
255 beginchar(133,gat_lt#,.5gat_ht#,.5gat_ht#);
256 gate;
257 pickup pensquare scaled thickline;
258 draw z1--z6{right}..z10{down}..{left}z7--cycle;
259 pickup pensquare scaled normalline;
260 draw z15--z26;
261 draw z20--z27;
262 draw z10--z25;
263 endchar;
264
265 "Gatter alt NAND: zwei Eing"&ditto&"ange, Ausgang";
266 beginchar(134,gat_lt#,.5gat_ht#,.5gat_ht#);
267 gate;
268 pickup pensquare scaled thickline;
269 draw z1--z6{right}..z10{down}..{left}z7--cycle;
270 pickup pensquare scaled normalline;
271 draw z15--z26;
272 draw z20--z27;
273 draw z10--z25;
274 pickup pencircle scaled 2inv_rad;
275 drawdot z10;
276 endchar;
277
278 "Gatter alt OR: zwei Eing"&ditto&"ange, Ausgang";
279 beginchar(135,gat_lt#,.5gat_ht#,.5gat_ht#);
280 gate;
281 z30=5[z26,z15];
282 z31=5[z27,z20];
283 z32= (z26--z30) intersectionpoint (z6{right}..{down}z10);
284 z33= (z27--z31) intersectionpoint (z10{down}..{left}z7);
285 pickup pensquare scaled thickline;
286 draw z1--z6{right}..z10{down}..{left}z7--cycle;
287 pickup pensquare scaled normalline;
288 draw z26--z32;
289 draw z27--z33;
290 draw z10--z25;
291 endchar;
292
293 "Gatter alt NOR: zwei Eing"&ditto&"ange, Ausgang";
294 beginchar(136,gat_lt#,.5gat_ht#,.5gat_ht#);
295 gate;
296 z30=5[z26,z15];
297 z31=5[z27,z20];
298 z32= (z26--z30) intersectionpoint (z6{right}..{down}z10);
299 z33= (z27--z31) intersectionpoint (z10{down}..{left}z7);
300 pickup pensquare scaled thickline;
301 draw z1--z6{right}..z10{down}..{left}z7--cycle;
302 pickup pensquare scaled normalline;
303 draw z26--z32;
304 draw z27--z33;
305 draw z10--z25;
306 pickup pencircle scaled 2inv_rad;
307 drawdot z10;
308 endchar;
309
310 "Gatter alt EQ: zwei Eing"&ditto&"ange, Ausgang";
311 beginchar(137,gat_lt#,.5gat_ht#,.5gat_ht#);
312 gate;
313 pickup pensquare scaled thickline;
314 draw z1--z6{right}..z10{down}..{left}z7--cycle;
315 pickup pensquare scaled normalline;
316 draw z15--z26;
317 draw z20--z27;
318 draw z10--z25;
319 x30=x31=x34=.2[x2,x13];
320 y30=.7[y16,y2]; y30=y32;
321 y31=.7[y21,y2]; y31=y33;
322 x32=x33=x35=.8[x2,x13];
323 y35=y34=y2;
324 pickup pencircle scaled normalline;
325 draw z30--z32;
326 draw z31--z33;
327 draw z34--z35;
328 endchar;
329
330 "box symbol empty";
331 beginchar(250,box_wd#,.5box_wd#,.5box_wd#);
332 z0=(0,0);
333 x0=x1=x2; x3=x4;
334 y0=.5[y2,y1];
335 y1=y3; y2=y4;
336 y2-y1=x3-x1=box_wd;
337 pickup pensquare scaled thickline;
338 draw z1--z2--z4--z3--cycle;
339 endchar;
340
341 "box symbol cutted by line";
342 beginchar(251,box_wd#,.5box_wd#,.5box_wd#);
343 z0=(0,0);
344 x0=x1=x2; x3=x4;
345 y0=.5[y2,y1];
346 y1=y3; y2=y4;
347 y2-y1=x3-x1=box_wd;
348 pickup pensquare scaled thickline;
349 draw z1--z2--z4--z3--cycle;
350 pickup pencircle scaled normalline;
351 draw z1--z4;
352 endchar;
353
354 "Black Box analog";
355 beginchar(252,bba_wd#,.5bba_ht#,.5bba_ht#);
356 z0=(0,0); x1=x0=x2;
357 z0=.5[z1,z2];
358 y1-y2=y3-y4=bba_ht; y1=y3;
359 x3=x4=x0+bba_wd;
360 pickup pensquare scaled thickline;
361 draw z1--z2--z4--z3--cycle;
362 endchar;
363
364 "Black Box digital";
365 beginchar(253,bbd_wd#,.5bbd_ht#,.5bbd_ht#);
366 z0=(0,0); x1=x0=x2;
367 z0=.5[z1,z2];
368 y1-y2=y3-y4=bbd_ht; y1=y3;
369 x3=x4=x0+bbd_wd;
370 pickup pensquare scaled thickline;
371 draw z1--z2--z4--z3--cycle;
372 endchar;
373
374 "OPV";
375 beginchar(254,opv_lt#,opv_ht#,opv_ht#);
376 charic:=opv_dis#;
377 numeric pl;
378 pl:=pin_lt;
379 z0=(0,0);
380 z1=z0+(pl,opv_dis);
381 z2=z0+(pl,opv_ht);
382 z3=z0+(pl+opv_frc*2opv_ht,0);
383 x4=x2; y4=-y2;
384 x5=x1; y5=-y1;
385 z6=z1-(pl,0);
386 z7=z5-(pl,0);
387 z8=z0+(opv_lt,0);
388 z9=z5+(3pt,0);
389 z10=z9+(4pt,0);
390 z11=z1+(3pt,0);
391 z12=z11+(4pt,0);
392 z13=z11+(2pt,2pt);
393 z14=z11+(2pt,-2pt);
394 pickup pensquare scaled thickline;
395 draw z2--z3--z4--cycle;
396 pickup pensquare scaled normalline;
397 draw z9--z10;
398 draw z11--z12;
399 draw z13--z14;
400 draw z6--z1;
401 draw z7--z5;
402 draw z3--z8;
403 endchar;
404
405 "OPV";
406 beginchar(255,opv_lt#,opv_ht#,opv_ht#);
407 charic:=opv_dis#;
408 numeric pl;
409 pl:=pin_lt;
410 z0=(0,0);
411 z1=z0+(pl,opv_dis);
412 z2=z0+(pl,opv_ht);
413 z3=z0+(pl+opv_frc*2opv_ht,0);
414 x4=x2; y4=-y2;
415 x5=x1; y5=-y1;
416 z6=z1-(pl,0);
417 z7=z5-(pl,0);
418 z8=z0+(opv_lt,0);
419 z9=z1+(3pt,0);
420 z10=z9+(4pt,0);
421 z11=z5+(3pt,0);
422 z12=z11+(4pt,0);
423 z13=z11+(2pt,2pt);
424 z14=z11+(2pt,-2pt);
425 pickup pensquare scaled thickline;
426 draw z2--z3--z4--cycle;
427 pickup pensquare scaled normalline;
428 draw z9--z10;
429 draw z11--z12;
430 draw z13--z14;
431 draw z6--z1;
432 draw z7--z5;
433 draw z3--z8;
434 endchar;
435
436 end;
437 %%
438 %%
439 %% End of file `cicirc.mf'.