summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/circ/ciwidko.mf
blob: d82dd1770a76906bb4dc49bf8062aac5fdf30e59 (plain)
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
%%
%% This is file `ciwidko.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% circ.dtx  (with options: `csywidko')
%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
%% Copyright (C) 1997,1998,2003  Sebastian Tannert and Andreas Tille
%% 
%%   This program is free software; you can redistribute it and/or modify
%%   it under the terms of the GNU General Public License as published by
%%   the Free Software Foundation; either version 2 of the License, or
%%   (at your option) any later version.
%% 
%%   This program is distributed in the hope that it will be useful,
%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%   GNU General Public License for more details.
%% 
%%   You should have received a copy of the GNU General Public License
%%   along with this program; if not, write to the Free Software
%%   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
%% 
%% For error reports concerning UNCHANGED versions of this file no
%% more than one year old, see CIRC.DVI after installation.
%% If installation fails search thru this file for 'bug'.
input csym;
designsize:=.5lLE#;

def resistor =
  numeric pl;
  pl:=.5(res_lt-res_wd);
  z0=(0,0);
  z1=z0+(pl,0);
  z2=z1+(res_wd,0);
  z3=z2+(pl,0);
  z4-z5=z6-z7=(0,res_ht);
  z1=.5[z4,z5];
  z2=.5[z6,z7];
  z8=z0+(res_x,-res_y);
  pickup pensquare scaled normalline;
  draw z0--z1;
  draw z2--z3;
  draw z4--z6--z7--z5--cycle;
enddef;

usR_iwd# = 3lLE#;
usR_iht# = 1lLE#;
usR_wd# = 4lLE#;
usR_f   = .25;
define_pixels(usR_iwd, usR_iht, usR_wd);

vardef usR =
  z0=(0,0);
  z1=z0;
  y1=y2=y3=y4;
  x2-x1=usR_wd;
  x4-x3=usR_iwd;
  .5[x1,x2]=.5[x3,x4];
  y5=y7=y9;
  y6=y8=y10;
  y5-y6=usR_iht;
  .5[y5,y6]=y1;
  x7-x5=x9-x7=x11-x9=x8-x6=x10-x8;
  x6=.5[x5,x7];
  x8-x6=(usR_wd-usR_iwd);
  x5-x3=usR_f*(x8-x6);
  pickup pensquare scaled normalline;
  draw z1--z3--z5--z6--z7--z8--z9--z10--z4--z2;
enddef;

vardef usR_var =
  {{
  addxTF(shifted -z6 rotated -90);
  usR;
  pickup pensquare scaled normalline;
  arrow(z6,.8res_ara,.5usR_iht,res_phi,arr_lt,arr_phi)
    (pickup pencircle scaled normalline);
  }}
enddef;

def resistor_var =
  {{
  addxTF(shifted -z8 rotated -90);
  resistor;
  pickup pensquare scaled normalline;
  arrow(z8,res_ara,0,res_phi,arr_lt,arr_phi)
    (pickup pencircle scaled normalline);
  }}
enddef;

def capacitor =
  pickup pensquare scaled normalline;
  numeric pl;
  pl:=.5(cap_lt-cap_spc);
  z0=(0,0);
  z1=z0+(pl,0);
  z2=z1+(cap_spc,0);
  z3=z2+(pl,0);
  z4-z5=z6-z7=(0,cap_ht);
  z1=.5[z4,z5];
  z2=.5[z6,z7];
  draw z0--z1;
  draw z2--z3;
  draw z4--z5;
  draw z6--z7;
enddef;

def capacitor_var =
  capacitor;
  noarrowTF;
  pickup pencircle scaled thinline;
  arrow(.5[z1,z2],cap_ara,cap_arb,cap_phi,arr_lt,arr_phi)();
enddef;

def electrolytic_capacitor =
  pickup pensquare scaled normalline;
  numeric pl;
  pl:=.5(cap_lt-cap_spc-cap_wd);
  z0=(0,0);
  z1=z0+(pl,0);
  z2=z1+(cap_spc,0);
  z3=z2+(cap_wd,0);
  z4=z3+(pl,0);
  z5-z6=z7-z8=z9-z10=(0,cap_ht);
  z1=.5[z5,z6];
  z2=.5[z7,z8];
  z3=.5[z9,z10];
  draw z0--z1;
  draw z3--z4;
  draw z5--z6;
  draw z7--z9--z10--z8--cycle;
enddef;

"Widerstand";
twochars(0)(resistor)(.5res_ht#,res_lt#,.5res_ht#);

"US Widerstand";
twochars(24)(usR)(.5res_ht#,res_lt#,.5res_ht#);

"Widerstand variabel";
eightchars(8)(resistor_var)(res_y#,res_lt#-res_x#,res_x#,res_o#);

"US Widerstand variabel";
eightchars(32)(usR_var)(res_y#,res_lt#-res_x#,res_x#,res_o#);

"Kondensator";
twochars(128)(capacitor)(.5cap_ht#,cap_lt#,.5cap_ht#);

"Kondensator variabel";
twochars(130)(capacitor_var)(.5cap_ht#,cap_lt#,.5cap_ht#);

"Elektrolyt-Kondensator";
fourchars(136)(electrolytic_capacitor)(z4)(.5cap_ht#,cap_lt#,.5cap_ht#);

end;
%% 
%%
%% End of file `ciwidko.mf'.