| 1 |
%% |
| 2 |
%% This is file `ciwidko.mf', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% circ.dtx (with options: `csywidko') |
| 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 |
designsize:=.5lLE#; |
| 30 |
|
| 31 |
def resistor = |
| 32 |
numeric pl; |
| 33 |
pl:=.5(res_lt-res_wd); |
| 34 |
z0=(0,0); |
| 35 |
z1=z0+(pl,0); |
| 36 |
z2=z1+(res_wd,0); |
| 37 |
z3=z2+(pl,0); |
| 38 |
z4-z5=z6-z7=(0,res_ht); |
| 39 |
z1=.5[z4,z5]; |
| 40 |
z2=.5[z6,z7]; |
| 41 |
z8=z0+(res_x,-res_y); |
| 42 |
pickup pensquare scaled normalline; |
| 43 |
draw z0--z1; |
| 44 |
draw z2--z3; |
| 45 |
draw z4--z6--z7--z5--cycle; |
| 46 |
enddef; |
| 47 |
|
| 48 |
usR_iwd# = 3lLE#; |
| 49 |
usR_iht# = 1lLE#; |
| 50 |
usR_wd# = 4lLE#; |
| 51 |
usR_f = .25; |
| 52 |
define_pixels(usR_iwd, usR_iht, usR_wd); |
| 53 |
|
| 54 |
vardef usR = |
| 55 |
z0=(0,0); |
| 56 |
z1=z0; |
| 57 |
y1=y2=y3=y4; |
| 58 |
x2-x1=usR_wd; |
| 59 |
x4-x3=usR_iwd; |
| 60 |
.5[x1,x2]=.5[x3,x4]; |
| 61 |
y5=y7=y9; |
| 62 |
y6=y8=y10; |
| 63 |
y5-y6=usR_iht; |
| 64 |
.5[y5,y6]=y1; |
| 65 |
x7-x5=x9-x7=x11-x9=x8-x6=x10-x8; |
| 66 |
x6=.5[x5,x7]; |
| 67 |
x8-x6=(usR_wd-usR_iwd); |
| 68 |
x5-x3=usR_f*(x8-x6); |
| 69 |
pickup pensquare scaled normalline; |
| 70 |
draw z1--z3--z5--z6--z7--z8--z9--z10--z4--z2; |
| 71 |
enddef; |
| 72 |
|
| 73 |
vardef usR_var = |
| 74 |
{{ |
| 75 |
addxTF(shifted -z6 rotated -90); |
| 76 |
usR; |
| 77 |
pickup pensquare scaled normalline; |
| 78 |
arrow(z6,.8res_ara,.5usR_iht,res_phi,arr_lt,arr_phi) |
| 79 |
(pickup pencircle scaled normalline); |
| 80 |
}} |
| 81 |
enddef; |
| 82 |
|
| 83 |
def resistor_var = |
| 84 |
{{ |
| 85 |
addxTF(shifted -z8 rotated -90); |
| 86 |
resistor; |
| 87 |
pickup pensquare scaled normalline; |
| 88 |
arrow(z8,res_ara,0,res_phi,arr_lt,arr_phi) |
| 89 |
(pickup pencircle scaled normalline); |
| 90 |
}} |
| 91 |
enddef; |
| 92 |
|
| 93 |
def capacitor = |
| 94 |
pickup pensquare scaled normalline; |
| 95 |
numeric pl; |
| 96 |
pl:=.5(cap_lt-cap_spc); |
| 97 |
z0=(0,0); |
| 98 |
z1=z0+(pl,0); |
| 99 |
z2=z1+(cap_spc,0); |
| 100 |
z3=z2+(pl,0); |
| 101 |
z4-z5=z6-z7=(0,cap_ht); |
| 102 |
z1=.5[z4,z5]; |
| 103 |
z2=.5[z6,z7]; |
| 104 |
draw z0--z1; |
| 105 |
draw z2--z3; |
| 106 |
draw z4--z5; |
| 107 |
draw z6--z7; |
| 108 |
enddef; |
| 109 |
|
| 110 |
def capacitor_var = |
| 111 |
capacitor; |
| 112 |
noarrowTF; |
| 113 |
pickup pencircle scaled thinline; |
| 114 |
arrow(.5[z1,z2],cap_ara,cap_arb,cap_phi,arr_lt,arr_phi)(); |
| 115 |
enddef; |
| 116 |
|
| 117 |
def electrolytic_capacitor = |
| 118 |
pickup pensquare scaled normalline; |
| 119 |
numeric pl; |
| 120 |
pl:=.5(cap_lt-cap_spc-cap_wd); |
| 121 |
z0=(0,0); |
| 122 |
z1=z0+(pl,0); |
| 123 |
z2=z1+(cap_spc,0); |
| 124 |
z3=z2+(cap_wd,0); |
| 125 |
z4=z3+(pl,0); |
| 126 |
z5-z6=z7-z8=z9-z10=(0,cap_ht); |
| 127 |
z1=.5[z5,z6]; |
| 128 |
z2=.5[z7,z8]; |
| 129 |
z3=.5[z9,z10]; |
| 130 |
draw z0--z1; |
| 131 |
draw z3--z4; |
| 132 |
draw z5--z6; |
| 133 |
draw z7--z9--z10--z8--cycle; |
| 134 |
enddef; |
| 135 |
|
| 136 |
"Widerstand"; |
| 137 |
twochars(0)(resistor)(.5res_ht#,res_lt#,.5res_ht#); |
| 138 |
|
| 139 |
"US Widerstand"; |
| 140 |
twochars(24)(usR)(.5res_ht#,res_lt#,.5res_ht#); |
| 141 |
|
| 142 |
"Widerstand variabel"; |
| 143 |
eightchars(8)(resistor_var)(res_y#,res_lt#-res_x#,res_x#,res_o#); |
| 144 |
|
| 145 |
"US Widerstand variabel"; |
| 146 |
eightchars(32)(usR_var)(res_y#,res_lt#-res_x#,res_x#,res_o#); |
| 147 |
|
| 148 |
"Kondensator"; |
| 149 |
twochars(128)(capacitor)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 150 |
|
| 151 |
"Kondensator variabel"; |
| 152 |
twochars(130)(capacitor_var)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 153 |
|
| 154 |
"Elektrolyt-Kondensator"; |
| 155 |
fourchars(136)(electrolytic_capacitor)(z4)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 156 |
|
| 157 |
end; |
| 158 |
%% |
| 159 |
%% |
| 160 |
%% End of file `ciwidko.mf'. |