| 1 |
%^^A last update: Fri 03-13-1998 |
| 2 |
%\iffalse |
| 3 |
%******************************************************************* |
| 4 |
%*** Please run tex circ.dtx to install the CIRC package *** |
| 5 |
%*** or run latex circ.dtx to generate a documentation. *** |
| 6 |
%******************************************************************* |
| 7 |
%<*installation> |
| 8 |
% Hint: Comment the next line out to force installation under LaTeX. |
| 9 |
% \let\documentclass\relax |
| 10 |
\expandafter\ifx\csname documentclass\endcsname\relax \input docstrip |
| 11 |
\askforoverwritefalse\maxoutfiles{10} %<-- change this if you have problems |
| 12 |
% CIRC is a LaTeX package to typeset circuit and optics diagrams. |
| 13 |
% Copyright (C) 1997,1998,2003,2009 Sebastian Tannert and Andreas Tille |
| 14 |
% |
| 15 |
% This program is free software; you can redistribute it and/or modify |
| 16 |
% it under the terms of the GNU General Public License as published by |
| 17 |
% the Free Software Foundation; either version 2 of the License, or |
| 18 |
% (at your option) any later version. |
| 19 |
% |
| 20 |
% This program is distributed in the hope that it will be useful, |
| 21 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 |
% GNU General Public License for more details. |
| 24 |
% |
| 25 |
% You should have received a copy of the GNU General Public License |
| 26 |
% along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 27 |
% |
| 28 |
% For error reports concerning UNCHANGED versions of this file no |
| 29 |
% more than one year old, see CIRC.DVI after installation. |
| 30 |
% If installation fails search thru this file for 'bug'. |
| 31 |
% |
| 32 |
% |
| 33 |
\preamble |
| 34 |
CIRC is a LaTeX package to typeset circuit and optics diagrams. |
| 35 |
Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille |
| 36 |
|
| 37 |
This program is free software; you can redistribute it and/or modify |
| 38 |
it under the terms of the GNU General Public License as published by |
| 39 |
the Free Software Foundation; either version 2 of the License, or |
| 40 |
(at your option) any later version. |
| 41 |
|
| 42 |
This program is distributed in the hope that it will be useful, |
| 43 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 44 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 45 |
GNU General Public License for more details. |
| 46 |
|
| 47 |
You should have received a copy of the GNU General Public License |
| 48 |
along with this program; if not, write to the Free Software |
| 49 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 50 |
|
| 51 |
For error reports concerning UNCHANGED versions of this file no |
| 52 |
more than one year old, see CIRC.DVI after installation. |
| 53 |
If installation fails search thru this file for 'bug'. |
| 54 |
\endpreamble |
| 55 |
|
| 56 |
\keepsilent |
| 57 |
\generate{ |
| 58 |
\file{circ.sty} {\from{circ.dtx}{code}} |
| 59 |
\file{ic.def} {\from{circ.dtx}{ic}} |
| 60 |
\file{gate.def} {\from{circ.dtx}{gate}} |
| 61 |
\file{oldgate.def} {\from{circ.dtx}{oldgate}} |
| 62 |
\file{box.def} {\from{circ.dtx}{box}} |
| 63 |
\file{basic.def} {\from{circ.dtx}{basic}} |
| 64 |
\file{optics.def} {\from{circ.dtx}{optics}} |
| 65 |
\file{physics.def} {\from{circ.dtx}{ciphysic}} |
| 66 |
\file{cisyms.tex} {\from{circ.dtx}{doc}} |
| 67 |
\file{cidoc.tex} {\from{circ.dtx}{docsty}} |
| 68 |
\file{circ.drv} {\from{circ.dtx}{driver}} |
| 69 |
} |
| 70 |
\postamble |
| 71 |
\endpostamble |
| 72 |
\generate{ |
| 73 |
\file{defcirc.mf} {\from{circ.dtx}{defcircmf}} |
| 74 |
\file{csym.mf} {\from{circ.dtx}{csym}} |
| 75 |
\file{cioptic.mf} {\from{circ.dtx}{optic}} |
| 76 |
\file{ciphysic.mf} {\from{circ.dtx}{ciphysicmf}} |
| 77 |
\file{ciwidko.mf} {\from{circ.dtx}{csywidko}} |
| 78 |
\file{cidiod.mf} {\from{circ.dtx}{csydiod}} |
| 79 |
\file{cirest.mf} {\from{circ.dtx}{csyrest}} |
| 80 |
\file{cicirc.mf} {\from{circ.dtx}{csycirc}} |
| 81 |
\file{cibimos.mf} {\from{circ.dtx}{csybimos}} |
| 82 |
\file{cisym.mf} {\from{circ.dtx}{csysym}} |
| 83 |
\file{index.hlp} {\from{circ.dtx}{indexhlp}} |
| 84 |
} |
| 85 |
\message{*********************************************************************} |
| 86 |
\message{^^JNow you should copy all *.def *.sty-files to your TEXINPUT-directory.} |
| 87 |
\message{^^JPlease run "latex circ.drv" and read the section installation.} |
| 88 |
\message{^^JAfter generating the fonts, please rerun "latex circ.drv".} |
| 89 |
\message{^^JThen you will get a complete documentation.} |
| 90 |
\message{^^JFor generating an index please read the file index.hlp.} |
| 91 |
\message{*********************************************************************} |
| 92 |
\csname fi\endcsname\end\endinput\fi |
| 93 |
%</installation> end-metacomment \fi |
| 94 |
% \def\filedate{2003/06/13} |
| 95 |
%^^A last update: Fri 03-13-1998 |
| 96 |
% \def\fileversion{v1.0f} |
| 97 |
% |
| 98 |
% \title{Package |
| 99 |
% \raise8mm\hbox{\expandafter\ifx\csname circfonts\endcsname\relax\else |
| 100 |
% \circuit2 \CIRCLogo \endcircuit\fi}\\[5mm] |
| 101 |
% \fileversion\ last revised \filedate} |
| 102 |
% { |
| 103 |
% \def\thefootnote{\fnsymbol{footnote}} |
| 104 |
% \author{Sebastian Tannert\footnote{macro code}\\ |
| 105 |
% Andreas Tille\footnote{documentation, optics}}}% |
| 106 |
% \parskip 1mm\parindent0pt |
| 107 |
% |
| 108 |
% \font\manual=logo10 |
| 109 |
% \def\MF{{\manual METAFONT}\xspace} |
| 110 |
% \def\MP{{\manual METAPOST}\xspace} |
| 111 |
% \def\META{{\manual META}\xspace} |
| 112 |
% \def\CIRC{{\sf CIRC}\xspace} |
| 113 |
% \def\CB#1{{\tt\char'134 #1}\index{#1@\string\texttt{\string\char'134 #1}}} |
| 114 |
% \def\warp#1{{\tt\char'134 #1}} |
| 115 |
% \def\Blank{{\tt\char32}} |
| 116 |
% \def\einruck{\hspace*{1cm}} |
| 117 |
% \def\example#1{\par\medskip\einruck#1\par\medskip} |
| 118 |
% \def\kohm{$\,$k$\Omega$} |
| 119 |
% \newcommand{\Descriptionlabel}[1]{\mbox{\textsf{#1}}\hfil} |
| 120 |
% \newenvironment{Description}[1]% |
| 121 |
% {\begin{list}{}% |
| 122 |
% {\renewcommand{\makelabel}{\Descriptionlabel}% |
| 123 |
% \setlength{\parsep}{0pt}% |
| 124 |
% \setlength{\itemsep}{0pt}% |
| 125 |
% \setlength{\itemindent}{0pt}% |
| 126 |
% \setlength{\topsep}{0pt}% |
| 127 |
% \setbox0=\hbox{\Descriptionlabel{#1}}% |
| 128 |
% \setlength{\labelwidth}{\wd0}% |
| 129 |
% \dimen0=\labelwidth\advance\dimen0 by \labelsep% |
| 130 |
% \setlength{\leftmargin}{\dimen0}}}% |
| 131 |
% {\end{list}} |
| 132 |
% |
| 133 |
% \batchmode |
| 134 |
% \iffalse First we have to check the fonts. \fi |
| 135 |
% \font\checkcircfonts=cirest |
| 136 |
% \dimen0=\fontdimen6\checkcircfonts |
| 137 |
% \ifdim\dimen0>0pt \def\circfonts{exist}\fi |
| 138 |
% \errorstopmode |
| 139 |
% \maketitle |
| 140 |
% |
| 141 |
% \begin{abstract} |
| 142 |
% \noindent |
| 143 |
% The package \CIRC is a tool for typesetting circuit diagrams |
| 144 |
% and block schematics. |
| 145 |
% It defines several electrical symbols such as resistors, capacitors, |
| 146 |
% transistors etc. These symbols can be connected with wires in a |
| 147 |
% very easy way. |
| 148 |
% |
| 149 |
% To use \CIRC you only need \MF and \LaTeXe{}. You do not need |
| 150 |
% PostScript or any drawing tool. You can expand \CIRC easily with |
| 151 |
% your own symbols, written in \MF. |
| 152 |
% \end{abstract} |
| 153 |
% |
| 154 |
% \vskip 15mm |
| 155 |
% \expandafter\ifx\csname circfonts\endcsname\relax\else |
| 156 |
%\begin{circuit}{0} |
| 157 |
%\.1 \- 1 r \nl\cc\R1 {R} r |
| 158 |
%\frompin .1 \- 3 l \- 2 d \nl\R9 {2R} d |
| 159 |
%\- 10 d \.7 |
| 160 |
%\frompin .7 \- 3 l \cc\U0 {} - u |
| 161 |
%\frompin .1 \- 2 d \nl\cc\R2 {2\,R} d \nl\SW1 {} s U |
| 162 |
%\frompin SW1c \vtopin U0+ \.8 |
| 163 |
%\frompin SW1o \vtopin U0- \.9 |
| 164 |
%\frompin R1r \- 1 r |
| 165 |
%\.3 \- 1 r \nl\cc\R5 {R} r |
| 166 |
%\frompin .3 \- 2 d \nl\cc\R6 {2\,R} d \nl\SW3 {} s u |
| 167 |
%\frompin SW3c \vtopin U0- \.12 |
| 168 |
%\frompin SW3o \vtopin U0+ \.13 |
| 169 |
%\frompin R5r \- 1 r |
| 170 |
%\.4 \- 2 r \nl\cc\R7 {R$_1$= 2R} r |
| 171 |
%\frompin .4 \- 2 d \nl\cc\R8 {2\,R} d \nl\SW4 {} s U |
| 172 |
%\frompin SW4c \vtopin U0+ \htopin U0+ |
| 173 |
%\frompin SW4o \vtopin U0- \.15 |
| 174 |
%\frompin R7r \- 1 r \nl\whatI1 {I} s r |
| 175 |
%\- 1 r \.5 \- 1 r \nl\OV1 {} - {} {} {} |
| 176 |
%\frompin .5 \- 3 u \centerto OV1 \nl\cc\R10 {R$_2$} r |
| 177 |
%\frompin R10l \htopin .5 |
| 178 |
%\atpin OV1O \.6 \vtopin R10r \htopin R10r |
| 179 |
%\frompin .6 \- 1 r \connection1 {$U_a$} c r |
| 180 |
%\frompin OV1+ \- 1 l \- 3 d \nl\cc\R11 {R$_3$} d |
| 181 |
%\frompin R11b \vtopin .7 \.8 \GND1 \frompin .7 \htopin .8 |
| 182 |
%\end{circuit}\fi |
| 183 |
% \clearpage |
| 184 |
% \tableofcontents |
| 185 |
% \enlargethispage{.5cm} |
| 186 |
% \section{Introduction} |
| 187 |
% |
| 188 |
% In several sciences circuit diagrams are necessary in publications. |
| 189 |
% Perhaps there are some PostScript tools for typesetting them or |
| 190 |
% a drawing program has to be used. |
| 191 |
% With \CIRC it is now possible to typeset circuit diagrams using |
| 192 |
% \TeX\ commands. The commands |
| 193 |
% describe the logical structure of the wiring scheme and \TeX\ |
| 194 |
% builds the connections according to this structure. |
| 195 |
% |
| 196 |
% \CIRC defines several electrical symbols such as resistors, capacitors, |
| 197 |
% transistors etc. These symbols can be connected with wires in a |
| 198 |
% very easy way. |
| 199 |
% |
| 200 |
% To use \CIRC you only need \MF and \LaTeXe{}. You do not need |
| 201 |
% PostScript or any drawing tool. You can expand \CIRC with |
| 202 |
% your own symbols, written in \MF. |
| 203 |
% |
| 204 |
% \CIRC has been implemented as a turtle system. That means, there is |
| 205 |
% a current position from where the symbols and wires are drawn. |
| 206 |
% It is possible to choose the drawing direction and drawing position. |
| 207 |
% |
| 208 |
% \CIRC consists of commands in order to |
| 209 |
% \begin{Description}{position} |
| 210 |
% \item[draw] symbols and wires into the scheme, |
| 211 |
% \item[justify] symbols within the scheme, |
| 212 |
% \item[link] symbols with wires, |
| 213 |
% \item[position] symbols absolutely or relatively. |
| 214 |
% \end{Description} |
| 215 |
% |
| 216 |
% \section{Installation} |
| 217 |
% |
| 218 |
% Run |circ.ins| through \LaTeX. You will get a couple of |
| 219 |
% |*.mf| files. Use \MF to create |*.pk| fonts from all these files. |
| 220 |
% These steps depend on your installation. |
| 221 |
% For example, type: |
| 222 |
% \begin{verbatim} |
| 223 |
% mf \mode=localfont; input ciwidko.mf |
| 224 |
% gftopk ciwidko.300 |
| 225 |
% \end{verbatim} |
| 226 |
% Do this with all the |*.mf| sources. Copy the resulting |*.tfm| |
| 227 |
% and |*.pk| files into appropriate directories. |
| 228 |
% |
| 229 |
% Copy the |*.sty|, |*.def| files, obtained from |circ.ins| into appropriate |
| 230 |
% directories in your |TEXINPUT| path. |
| 231 |
% |
| 232 |
% Read the documentation carefully. |
| 233 |
% |
| 234 |
% Enjoy \CIRC. |
| 235 |
% |
| 236 |
% We added a Makefile which is tested only under |Debian\GNU Linux| |
| 237 |
% (running |teTeX|). We would like to get comments whether it works |
| 238 |
% under other environments. {\bf Use it at your own risk!}. Type |
| 239 |
% \begin{verbatim} |
| 240 |
% make |
| 241 |
% \end{verbatim} |
| 242 |
% to get all files used by \CIRC. Before you type |
| 243 |
% \begin{verbatim} |
| 244 |
% make install |
| 245 |
% \end{verbatim} |
| 246 |
% you should check the correct PATH names in the Makefile. (Make sure |
| 247 |
% you run |make install| as root.) This will do the the following: |
| 248 |
% \begin{enumerate} |
| 249 |
% \item Delete old \CIRC files in |TEXINPUT| and |MFINPUT|. |
| 250 |
% \item Move the new |TEXINPUT| and |MFINPUT| to the appropriate |
| 251 |
% directories |
| 252 |
% \item Check the special.map file in the |Fontname| directory |
| 253 |
% whether there ary \CIRC related entries and create them |
| 254 |
% if failed. (This will ensure that \CIRC fonts will be |
| 255 |
% copied into reasonable directories when using |MakeTeXPK| |
| 256 |
% or |MakeTeXTFM|.) |
| 257 |
% \item Delete old PK and TFM files from \CIRC. (Using old TFM or |
| 258 |
% PK files is one of the "Top ten reasons" why failing \CIRC.) |
| 259 |
% \end{enumerate} |
| 260 |
% To get the documentation type |
| 261 |
% \begin{verbatim} |
| 262 |
% make doc |
| 263 |
% \end{verbatim} |
| 264 |
% (generally this is a good idea to create the needed fonts on the |
| 265 |
% fly). |
| 266 |
% |
| 267 |
% Once more: Please report any bug concerning this Makefile, because |
| 268 |
% this is the first test and not reliable at all. |
| 269 |
% |
| 270 |
% |
| 271 |
% \section{System requirements} |
| 272 |
% |
| 273 |
% \CIRC requires \LaTeXe\ and \MF. |
| 274 |
% |
| 275 |
%\section{Changes} |
| 276 |
% Unfortunately a change of the parameters for symbol drawing |
| 277 |
% commands had to be made. But now the rules are more consistent and |
| 278 |
% easier to remember. Please have a look at section~\ref{pars}. |
| 279 |
% Some new symbols were added and the font selection was modified |
| 280 |
% to work together with the slides class. |
| 281 |
% The appendix has a new design to be clearly arranged. |
| 282 |
% Font names have changed too. |
| 283 |
% |
| 284 |
% The |\<| command is obsolete now and should NOT used anymore. |
| 285 |
% A new |\_| command was defined, see section~\ref{position}. |
| 286 |
% |
| 287 |
% \section{Usage} |
| 288 |
% |
| 289 |
% \subsection{Preambel} |
| 290 |
% |
| 291 |
% \CIRC is divided into several parts. To use a part put the suitable |
| 292 |
% option in the |\usepackage| command. All parts are included |
| 293 |
% in the following example: |
| 294 |
%\example{\warp{usepackage[basic,box,gate,oldgate,ic,optics,physics]}\{|circ|\}} |
| 295 |
% |
| 296 |
% The parts contain: |
| 297 |
% \begin{Description}{physics\,:} |
| 298 |
% \item[basic\,:] a lot of symbols such as resistors, capacitors, switches, |
| 299 |
% diodes, transistors, etc., |
| 300 |
% \item[box\,:] blackbox, oscilloscope, generator and amplifier, |
| 301 |
% \item[gate\,:] several logical circuits, |
| 302 |
% \item[oldgate\,:] old style logical gates, |
| 303 |
% \item[ic\,:] integrated circuits (flip flops, etc.) and |
| 304 |
% \item[optics\,:] the optical stuff with lenses, mirrors, etc. |
| 305 |
% (see section \ref{optic}), |
| 306 |
% \item[physics\,:] some mechanics stuff. |
| 307 |
% \end{Description} |
| 308 |
% A complete list of available symbols is given in the appendix. |
| 309 |
% |
| 310 |
% \subsection{Starting a circuit diagram} |
| 311 |
% |
| 312 |
% It is recommended to draw a sketch with pen and paper before using |
| 313 |
% \CIRC. |
| 314 |
% |
| 315 |
% Every circuit diagram is enclosed in the |
| 316 |
% |circuit| environment |
| 317 |
% \example{\CB{begin\{circuit\}}{\em size}} |
| 318 |
% where {\em size} is an integer |
| 319 |
% between 0 and 4 giving the size of symbols and describing text. A size |
| 320 |
% of 4 is useful for overhead foils. |
| 321 |
% |
| 322 |
% All \CIRC macros and the necessary parameters are separated by |
| 323 |
% spaces (\Blank). For a clearly arranged \CIRC diagram it is |
| 324 |
% advisable to put every command in a separate line (a linebreak |
| 325 |
% is interpreted as a blank as it is used in \TeX). |
| 326 |
% |
| 327 |
% \subsection{Drawing symbols} |
| 328 |
% \label{pars} |
| 329 |
% The table in the appendix contains a complete list of all |
| 330 |
% \CIRC symbols available and corresponding drawing commands. |
| 331 |
% The syntax of drawing commands is: |
| 332 |
% \example{\warp{}{\sf symbolname}{\em number\Blank |
| 333 |
% inscription\Blank{\tt[}specification\_parameter{\tt]}\Blank direction}} |
| 334 |
% or for more complex symbols: |
| 335 |
% \example{\warp{}{\sf symbolname}{\em number\Blank {\tt[}further\_parameters\tt ]}} |
| 336 |
% Note that you can leave out the blank between the symbol-command |
| 337 |
% and the following {\em number} parameter. This parameter has to |
| 338 |
% be unique in one drawing and is necessary for correct referring |
| 339 |
% (see |\atpin| in section \ref{poscmd}). |
| 340 |
% |
| 341 |
% The symbols can be classified into a lot of different symmetries |
| 342 |
% which are summarized in the appendix. There you will find more |
| 343 |
% detailed information about the parameters you have to use. |
| 344 |
% Generally the drawing direction of the symbol is given with the |
| 345 |
% {\em direction} parameter which is |l| (left), |r| (right), |
| 346 |
% |u| (up) or |d| (down). |
| 347 |
% If there exist 2 different alignments of a symbol for one |
| 348 |
% direction (e.g. if the LED-arrows show up or down) the second |
| 349 |
% alignment is chosen by capitalization of the {\em direction} |
| 350 |
% parameter (|L|, |R|, |U| or |D|). |
| 351 |
% |
| 352 |
%\iffalse |
| 353 |
% Due to the fact, that there are different symbols for different |
| 354 |
% drawing directions the right {\em direction} parameter is important. |
| 355 |
% The table in the appendix contains valid {\em direction} parameters |
| 356 |
% for every drawing command. This may be |h| (horizontal) or |v| |
| 357 |
% (vertical) for symbols with the symmetry two; |l| (left), |r| (right), |
| 358 |
% |u| (up) and |d| (down) for symbols with the symmetry four or |
| 359 |
% for symbols with the symmetry eight |l|, |L|, |r|, |R|, |u|, |U|, |
| 360 |
% |d| or |D|. The latter may need further {\em specification} parameter |
| 361 |
% in front of the {\em direction} parameter. |
| 362 |
% \fi |
| 363 |
% Symbols having two dissimilar or more connections may need |
| 364 |
% a further {\em specification} parameter in front of the {\em |
| 365 |
% direction} parameter. |
| 366 |
% This {\em specification} parameter marks the pin |
| 367 |
% that should be on the current drawing position (see variable resistor and |
| 368 |
% several transistors). |
| 369 |
% |
| 370 |
% In the appendix {\tt text} was used for the {\em inscription} and the |
| 371 |
% necessary {\em number} was set to {\tt n}. Note the position |
| 372 |
% at the symbol where the inscription is set. |
| 373 |
% The inscription can be suppressed by the \CB{nv} command in front |
| 374 |
% of the symbol-command. |
| 375 |
% |
| 376 |
% By default every \CIRC symbol is marked by a label. |
| 377 |
% This label consists of an abbreviation of the symbol indexed by |
| 378 |
% the {\em number}. To suppress |
| 379 |
% this labeling use \CB{nl} in front of the symbol-command. |
| 380 |
% |
| 381 |
% Another command affecting the inscription of a symbol is |
| 382 |
% \CB{cc}. It is also used in front of a symbol-command and causes the |
| 383 |
% change of label-position and inscription-position. By default the |
| 384 |
% inscription is typeset left or over the symbol while the labeling |
| 385 |
% is done right or under the symbol depending on the vertical or |
| 386 |
% horizontal orientation of the symbol. |
| 387 |
% |
| 388 |
% Some symbols need {\em further\_parameter}s. The usage |
| 389 |
% is selfdocumenting in the appendix table. |
| 390 |
% |
| 391 |
% Junctions can be made by the \CB{.} command |
| 392 |
% (\CB{junction})\footnote{Commands within |
| 393 |
% parenthesis are synonyms for the last introduced command.}. |
| 394 |
% The syntax is: |
| 395 |
% \example{\warp{.}{\em number}} |
| 396 |
% Every junction needs a {\em number} argument for further referencing. |
| 397 |
% |
| 398 |
% \subsection{Referencing symbols and pins} |
| 399 |
% |
| 400 |
% Some commands use reference parameters |
| 401 |
% to mark symbols or connections of symbols drawn before. |
| 402 |
% |
| 403 |
% The {\em symbol\_reference} parameters consist of two parts: |
| 404 |
% \example{{\sf symbolname}$\;${\em number}} |
| 405 |
% |
| 406 |
% The {\em pin\_reference} parameters consist of three parts: |
| 407 |
% \example{{\sf symbolname}$\;${\em number}$\;${\sf pinname}} |
| 408 |
% These three parts form the {\em reference} parameter. |
| 409 |
% |
| 410 |
% See the appendix for the pinnames, they are drawn nearby the pins. |
| 411 |
% If the symbol has no pregiven ones the standard names |l| for |
| 412 |
% the left connection, |r| for the right, |t| for the top and |
| 413 |
% |b| for the bottom one will be chosen. |
| 414 |
% |
| 415 |
% {\em Note that there is no blank between the parts!} |
| 416 |
% |
| 417 |
% For example, to refer to the \underline{l}eft connection of the |
| 418 |
% resistor with the {\em number} 1 the {\em pin\_reference} parameter |
| 419 |
% would be |
| 420 |
% \example{{\tt R1l}} |
| 421 |
% or to refer to the whole symbol the {\em symbol\_reference} is |
| 422 |
% \example{{\tt R1}\quad.} |
| 423 |
% |
| 424 |
% |
| 425 |
% At least it is possible to set markers which work like pin references. |
| 426 |
% \example{\CB{P}{\em number}} |
| 427 |
% sets a marker which can be referred to by |P|{\em number}. |
| 428 |
% |
| 429 |
% \subsection{Connecting symbols} |
| 430 |
% |
| 431 |
% Simple connections between the symbols can be made with the |
| 432 |
% \CB{-} command, which is an abbreviation of the \CB{wire} |
| 433 |
% command (see appendix). The syntax is |
| 434 |
% \example{\warp{-}\Blank{\em length}\Blank{\em direction}.} |
| 435 |
% The parameter {\em length} is an integer giving the number of |
| 436 |
% lengthsteps. In \CIRC wires are build as a queue of characters |
| 437 |
% 2.5\,mm each. Thus the length of wire is measured in multiples |
| 438 |
% of this length. |
| 439 |
% |
| 440 |
% The parameter {\em direction} determines the direction. Valid |
| 441 |
% values are |l| for left, |r| for right, |u| for up and |d| for |
| 442 |
% down. For instance, a wire is drawn to the left with a length of |
| 443 |
% 1\,cm (4 units) by typing |
| 444 |
% \example{\warp{-\Blank 4\Blank l}} |
| 445 |
% |
| 446 |
% There are some other line types to connect symbols. The command |
| 447 |
% \example{\CB{dashed}\Blank{\em length\Blank direction}} |
| 448 |
% draws a dashed line. It is written as the \warp{-} command. |
| 449 |
% With |
| 450 |
% \example{\CB{bundle}\Blank{\em text\Blank length\Blank direction} \\ |
| 451 |
% \einruck\CB{wwire}\Blank{\em text\Blank length\Blank direction}} |
| 452 |
% a bundle of wire could be drawn or a pair of wire, respectively. |
| 453 |
% You can use \CB{=} as an abbreviation of |\wwire|. |
| 454 |
% The {\em text} may contain any comments. |
| 455 |
% |
| 456 |
% To connect the drawing position horizontally or vertically with |
| 457 |
% a certain pin of a symbol by using a reference, the useful |
| 458 |
% commands \CB{htopin} and \CB{vtopin} exist. |
| 459 |
% The syntax is: |
| 460 |
% \example{\warp{htopin}\Blank{\em pin\_reference} \\ |
| 461 |
% \einruck\warp{vtopin}\Blank{\em pin\_reference}} |
| 462 |
% Provided that the resistor |R1| defined before by a |\R| command, |
| 463 |
% the command |
| 464 |
% \example{\warp{vtopin\Blank R1l}} |
| 465 |
% draws a vertical wire up to this height, where the resistor numbered |
| 466 |
% with |1| (|R1|) is situated. |\htopin| does the same but horizontally. |
| 467 |
% |
| 468 |
% The connection will be done by default with the \CB{wire} command. |
| 469 |
% To change the type of the connection use the \CB{by} command. |
| 470 |
% The syntax is: |
| 471 |
% \example{\warp{by\{}{\em command\/}|\}|} |
| 472 |
% where {\em command} can be one of the following: \CB{wire} (\CB{-}), \CB{dashed}, |
| 473 |
% \mbox{\CB{bundle}\Blank{\em text}}, \mbox{\CB{wwire}\Blank{\em text}} |
| 474 |
% or \CB{oa} (which is declared in the optics part, see section \ref{optic}). |
| 475 |
% |
| 476 |
% For example, the command |
| 477 |
% \example{\warp{by\{}\warp{dashed\}}} |
| 478 |
% changes the drawing style from \warp{[hv]topin} to a dashed lines. |
| 479 |
% Do not forget to switch back to wires using |
| 480 |
% \example{\warp{by\{}\warp{wire\}}} |
| 481 |
% to end the dashed lines. |
| 482 |
% |
| 483 |
% Note that it is usually necessary to combine the |htopin|- and |
| 484 |
% |vtopin| commands, because these commands draw {\em only} horizontally |
| 485 |
% or vertically to the x- or the y-coordinates |
| 486 |
% of the given pin. |
| 487 |
% |
| 488 |
% \subsection{\label{poscmd}Positioning commands} |
| 489 |
% \label{position} |
| 490 |
% Positioning commands are used to change the current |
| 491 |
% drawing position. |
| 492 |
% |
| 493 |
% The direct positioning command \CB{at} (\CB{from}) sets the drawing position |
| 494 |
% to an absolute coordinate. |
| 495 |
% \example{\warp{at\{{\em x}\}\Blank\{{\em y}\}\Blank}} |
| 496 |
% sets the drawing position to the point ({\em x},{\em y}) in the coordinate |
| 497 |
% system, where {\em x} and {\em y} are integers counting the number of |
| 498 |
% arbitrary units (2.5\,mm). \CIRC starts drawing at $(0,0)$. |
| 499 |
% |
| 500 |
% It is recommended to avoid the absolute positioning of symbols, because |
| 501 |
% it tends to destroy the logical structure of the circuit diagram. |
| 502 |
% |
| 503 |
% The drawing position can be changed in relation to the current position |
| 504 |
% with the indirect positioning command \CB{moverel} (\CB{shift}). |
| 505 |
% \example{\warp{moverel\{{\em x}\}\Blank\{{\em y}\}\Blank}} |
| 506 |
% moves the drawing position {\em x} units to the right |
| 507 |
% and {\em y} units upwards. |
| 508 |
% |
| 509 |
% The command \CB{atpin} (\CB{frompin}) sets the drawing |
| 510 |
% position to a reference pin. |
| 511 |
% \example{\warp{atpin}\Blank{\em pin\_reference}} |
| 512 |
% allows further drawing starting from the reference pin. For example, |
| 513 |
% \example{\warp{atpin C2r}} |
| 514 |
% sets the drawing position to the right pin of the capacitor numbered 2. |
| 515 |
% |
| 516 |
% In a lot of cases a command like |\-| is useful, but it should |
| 517 |
% not draw the line. |\_| satisfy this need. As you know from |
| 518 |
% |\-| a {\em length} and a {\em direction} must be specified. |
| 519 |
% |
| 520 |
% \subsection{Justify commands} |
| 521 |
% |
| 522 |
% The command \CB{hcenterto} forces horizontal centering |
| 523 |
% according to a symbol referred to. The command \CB{vcenterto} does the |
| 524 |
% same but vertically. |
| 525 |
% The command \CB{centerto} centers the following symbol according to the |
| 526 |
% reference symbol |
| 527 |
% horizontally or vertically depending on the drawing direction of |
| 528 |
% the symbol beeing drawn. |
| 529 |
% |
| 530 |
% The syntax is: |
| 531 |
% \example{\warp{hcenterto}\Blank{\em symbol\_reference} \\ |
| 532 |
% \einruck\warp{vcenterto}\Blank{\em symbol\_reference} \\ |
| 533 |
% \einruck\warp{centerto}\Blank{\em symbol\_reference}} |
| 534 |
% For example, |
| 535 |
% \example{\warp{hcenterto L4}} |
| 536 |
% would force horizontal centering according to the coil numbered 4. |
| 537 |
% |
| 538 |
% \subsection{Text commands} |
| 539 |
% |
| 540 |
% The command |
| 541 |
% \example{\CB{put}|\{|{\em text}|\}|} |
| 542 |
% puts {\em text} at the current drawing position. |
| 543 |
% It can be used in the same way as the \warp{put} command of the |
| 544 |
% \LaTeX |picture| environment, but the coordinates have to be omitted |
| 545 |
% (because they are given by the current drawing position). |
| 546 |
% |
| 547 |
% To comment something the commands |
| 548 |
% \example{\CB{Utext}\Blank{\em text\Blank{\tt from}\Blank pin\_reference1\Blank{\tt to}\Blank pin\_reference2} \\ |
| 549 |
% \einruck\CB{centertext}\Blank{\em text\Blank{\tt from}\Blank pin\_reference1\Blank{\tt to}\Blank pin\_reference2}} |
| 550 |
% can be used. \warp{centertext} prints {\em text} centered between |
| 551 |
% {\em pin\_reference1} and {\em pin\_reference2}. |
| 552 |
% \warp{Utext} additionally draws an arrow from |
| 553 |
% {\em pin\_reference1} to {\em pin\_reference2}. |
| 554 |
% Note that the reference pins must have the same x- or y-coordinate. |
| 555 |
% |
| 556 |
% To write overlapping information like the \TeX\ commands |
| 557 |
% \warp{rlap} and \warp{llap} the following commands are used: |
| 558 |
% \example{\CB{blap}|\{|{\em text}|\}| \\ |
| 559 |
% \einruck\CB{tlap}|\{|{\em text}|\}|} |
| 560 |
% They put {\em text} which overlap to the bottom or the top, respectively. |
| 561 |
% |
| 562 |
% \expandafter\ifx\csname circfonts\endcsname\relax |
| 563 |
% \LARGE Please generate the fonts now. Then you will get a |
| 564 |
% complete documentation.\stop\fi |
| 565 |
% |
| 566 |
% \subsection{Example} |
| 567 |
% |
| 568 |
%A simple example is the diagram showing a circuit which is used for measuring |
| 569 |
%the amplification of current by a transistor. |
| 570 |
%\vskip 4mm |
| 571 |
%\begin{circuit}0 |
| 572 |
%\npn1 {?} B l |
| 573 |
%\frompin npn1C |
| 574 |
%\- 1 u |
| 575 |
%\nl\A1 {$I_C$} u |
| 576 |
%\atpin npn1B |
| 577 |
%\- 1 l |
| 578 |
%\R1 {510\kohm} l |
| 579 |
%\- 1 l |
| 580 |
%\centerto A1 |
| 581 |
%\nl\A2 {$I_B$} u |
| 582 |
%\frompin A2b |
| 583 |
%\vtopin R1l |
| 584 |
%\frompin A1t |
| 585 |
%\- 1 u \.1 |
| 586 |
%\frompin A2t |
| 587 |
%\vtopin .1 |
| 588 |
%\htopin .1 |
| 589 |
%\- 1 u |
| 590 |
%\cc\connection1 {$U_b$} c u |
| 591 |
%\frompin npn1E |
| 592 |
%\- 1 d |
| 593 |
%\GND1 |
| 594 |
%\end{circuit} |
| 595 |
%\vskip 4mm |
| 596 |
% |
| 597 |
%How to cope with such sketches? |
| 598 |
% |
| 599 |
%First of all, it is necessary to decide, which symbol should be the |
| 600 |
%first one. |
| 601 |
%The transistor seems to be a good choice to begin with in this |
| 602 |
%special case. The command \CB{npn} produces a npn-transistor |
| 603 |
%(see appendix); so the first line is |
| 604 |
%\example{\warp{npn1 {?} B l}} |
| 605 |
%which names the transistor |npn1| for further reference. |
| 606 |
%Instead of |{?}| any text describing the specific transistor |
| 607 |
%may be written. (Unfortunately this doesn't work today. See |
| 608 |
%future plans.) The third parameter |B| means, that the |
| 609 |
%\underline{b}ase of the transistor should be on the current |
| 610 |
%drawing position. Further more |C| for \underline{c}ollector |
| 611 |
%or |E| for the \underline{e}mitter contact would be possible. |
| 612 |
%The last parameter gives the direction, in this case the |
| 613 |
%base contact points to the \underline{l}eft (|l|). |
| 614 |
% |
| 615 |
%Use |
| 616 |
%\example{\warp{frompin npn1C}} |
| 617 |
%to continue drawing from the collector, and type |
| 618 |
%\example{\warp{- 1 u}} |
| 619 |
%to draw the needed wire \underline{u}pwards |
| 620 |
%to connect the amperemeter to measure $I_C$ which is created by the command |
| 621 |
%\example{\warp{nl}\warp{A1 \{\$I\_C\$\} u}}\qquad . |
| 622 |
% |
| 623 |
%The command \CB{nl} in front of the amperemeter avoids the default |
| 624 |
%inscription of "$I_1$" because this would not make any sense in this |
| 625 |
%case. Instead, the labeling is $I_C$. The last parameter {\tt u} |
| 626 |
%marks the direction (\underline{u}p). |
| 627 |
% |
| 628 |
%To draw the resistor connected with the base of the transistor |
| 629 |
%the proceeding is the same: use |
| 630 |
% |
| 631 |
%|\atpin npn1B | |
| 632 |
%to set drawing position (different from the current position), |
| 633 |
% |
| 634 |
%|\- 1 l | |
| 635 |
%to draw a piece of wire to the left and |
| 636 |
% |
| 637 |
%|\R1 {510\kohm} l | |
| 638 |
%for the resistor itself. |
| 639 |
% |
| 640 |
%A further horizontal piece of wire connects the resistor with the |
| 641 |
%second amperemeter: |\- 1 l |. |
| 642 |
% |
| 643 |
%The second amperemeter, measuring the current of the base ($I_B$), |
| 644 |
%would look nice at if drawn the same height as the first one, |
| 645 |
%measuring ($I_C$). |
| 646 |
%Measuring the length of wire needed to match the same height would be |
| 647 |
%difficult and a change of the diagram would cause further changes in |
| 648 |
%order to maintain the desired position. |
| 649 |
%Therefore it is advisable to use |
| 650 |
%\example{\CB{centerto} {\tt A1}\quad \warp{nl}\warp{A2 \{\$I\_B\$\} u}} |
| 651 |
%which leeds to the intended centering automatically. Because of the |
| 652 |
%\underline{u}p orientation of {\tt A2}, the centering is the same as |
| 653 |
%in the vertical direction. |
| 654 |
% |
| 655 |
%A vertical connection is needed to connect the amperemeter |
| 656 |
%with {$R_1$}. This may be done by |
| 657 |
%\example{\warp{frompin A2b} \\ |
| 658 |
% \einruck\warp{vtopin R1l}} |
| 659 |
%which draw a wire down to the horizontal wire, starting at |
| 660 |
%|A2b|. Instead of the second line |\vtopin npn1B| would do the same job |
| 661 |
%because the horizontal position is irrelevant for \CB{vtopin}. |
| 662 |
% |
| 663 |
%To connect the two amperemeters the drawing position is set to |A1t|, |
| 664 |
%from where a wire is drawn upwards and a junction point is marked |
| 665 |
%at that point by using |
| 666 |
%\example{\warp{frompin A1t} \\ |
| 667 |
% \einruck\warp{- 1 u} \\ |
| 668 |
% \einruck\warp{.1}} |
| 669 |
%The commands for connecting the second amperemeter are: |
| 670 |
%\example{\warp{frompin A2t} \\ |
| 671 |
% \einruck\warp{vtopin .1} \\ |
| 672 |
% \einruck\warp{htopin .1}} |
| 673 |
%The combination of \CB{htopin} and \CB{vtopin} is very useful |
| 674 |
%to connect two points with an edge of wire. |
| 675 |
%The driving voltage is typeset by |
| 676 |
%\example{\warp{- 1 u} \\ |
| 677 |
% \einruck\warp{cc}\warp{connection1 \{\$U\_b\$\} c u}} |
| 678 |
%because it looks better to put the inscription of the voltage on the |
| 679 |
%right. That is why the prefix \CB{cc} is used in front of |
| 680 |
%the \warp{connection} command. |
| 681 |
% |
| 682 |
%Finally the emitter contact leads to the ground: |
| 683 |
%\example{\warp{frompin npn1E} \\ |
| 684 |
% \einruck\warp{- 1 d} \\ |
| 685 |
% \einruck\warp{GND1}} |
| 686 |
% |
| 687 |
%The whole example once more in an overview: |
| 688 |
%\begin{verbatim} |
| 689 |
%\begin{circuit}0 |
| 690 |
%\npn1 {?} B l % transistor |
| 691 |
%\frompin npn1C % draw from collector |
| 692 |
%\- 1 u % some wire |
| 693 |
%\nl\A1 {$I_C$} u % amperemeter for current of collector |
| 694 |
%\atpin npn1B % continue drawing from base |
| 695 |
%\- 1 l % some wire |
| 696 |
%\R1 {510\kohm} l % resistor |
| 697 |
%\- 1 l % some wire to the edge |
| 698 |
%\centerto A1 % draw centered to amperemeter 1 |
| 699 |
%\nl\A2 {$I_B$} u % amperemeter 2 |
| 700 |
%\frompin A2b % link amperemeter 2 with resistor |
| 701 |
%\vtopin R1l |
| 702 |
%\frompin A1t |
| 703 |
%\- 1 u |
| 704 |
%\.1 % junction |
| 705 |
%\frompin A2t % wire to amperemeter 2 |
| 706 |
%\vtopin .1 |
| 707 |
%\htopin .1 |
| 708 |
%\- 1 u |
| 709 |
%\cc\connection1 {$U_b$} c u % driving voltage |
| 710 |
%\frompin npn1E |
| 711 |
%\- 1 d |
| 712 |
%\GND1 % ground |
| 713 |
%\end{circuit} |
| 714 |
%\end{verbatim} |
| 715 |
% |
| 716 |
% |
| 717 |
% \section{\label{optic}Optics} |
| 718 |
% |
| 719 |
% If the |optics| option is given in the |\usepackage| command, the |
| 720 |
% creation of simple optical diagrams is possible. |
| 721 |
% |
| 722 |
% The optical axis can be drawn with the \CB{oa} command, which |
| 723 |
% creates a dashed line. |
| 724 |
% The optical symbols |
| 725 |
% which are available are listed at the end of the appendix. |
| 726 |
% |
| 727 |
% Here is an example for using |optics|. With the knowledge |
| 728 |
% of drawing circuits the following code will speak for itself. |
| 729 |
% \vskip 4mm |
| 730 |
% \begin{circuit}{0} |
| 731 |
% \nl\Laser1 {} r |
| 732 |
% \oa 2 r |
| 733 |
% \Polar1 {} r |
| 734 |
% \oa 2 r |
| 735 |
% \nl\OM1 P1 {} {} {} {} h |
| 736 |
% \atpin OM1P3 |
| 737 |
% \oa 4 r |
| 738 |
% \cc\BLens1 {} r |
| 739 |
% \oa 2 r |
| 740 |
% \nl\Pinhole1 {} r |
| 741 |
% \oa 7 r |
| 742 |
% \cc\SLens2 {} r |
| 743 |
% \oa 1 r |
| 744 |
% \Polar2 {} r |
| 745 |
% \oa 3 r |
| 746 |
% \oa 3 r |
| 747 |
% \nl\BSplit1 {} + d |
| 748 |
% \atpin BSplit1+ |
| 749 |
% \oa 2 r |
| 750 |
% \nl\Cam1 {camera} . r |
| 751 |
% \atpin BLens1: \shift 0 2 \P3 |
| 752 |
% \atpin Pinhole1: \shift 0 2 \P4 |
| 753 |
% \atpin SLens2: \shift 0 2 \P5 |
| 754 |
% \Dtext{\small $f_1$} from P3 to P4 |
| 755 |
% \Dtext{\small $f_2$} from P4 to P5 |
| 756 |
% \atpin BSplit1. |
| 757 |
% \oa 5 d |
| 758 |
% \Mirror1 {} * R |
| 759 |
% \oa 2 r |
| 760 |
% \nl\ScrL1 {screen} h |
| 761 |
% \end{circuit} |
| 762 |
% Here is the code: |
| 763 |
% |
| 764 |
% \begin{verbatim} |
| 765 |
% \begin{circuit}{0} |
| 766 |
% \nl\Laser1 {} r % laser |
| 767 |
% \oa 2 r % optical axis |
| 768 |
% \Polar1 {} r % polarizer |
| 769 |
% \oa 2 r |
| 770 |
% \nl\OM1 P1 {} {} {} {} h % optical modulator |
| 771 |
% \atpin OM1P3 |
| 772 |
% \oa 4 r |
| 773 |
% \cc\BLens1 {} r % 1st lens |
| 774 |
% \oa 2 r |
| 775 |
% \nl\Pinhole1 {} r % pinhole |
| 776 |
% \oa 7 r |
| 777 |
% \cc\SLens2 {} r % 2nd lens |
| 778 |
% \oa 1 r |
| 779 |
% \Polar2 {} r % analyzer |
| 780 |
% \oa 3 r |
| 781 |
% \oa 3 r |
| 782 |
% \nl\BSplit1 {} + d % beam splitter |
| 783 |
% \atpin BSplit1+ % continue drawing right |
| 784 |
% \oa 2 r |
| 785 |
% \nl\Cam1 {camera} . r % camera |
| 786 |
% \atpin BLens1: \shift 0 2 \P3 % mark middle of 1st lens |
| 787 |
% \atpin Pinhole1: \shift 0 2 \P4 % mark middle of pinhole |
| 788 |
% \atpin SLens2: \shift 0 2 \P5 % mark middle of 2nd lens |
| 789 |
% \Dtext{\small $f_1$} from P3 to P4 % f_1 |
| 790 |
% \Dtext{\small $f_2$} from P4 to P5 % f_2 |
| 791 |
% \atpin BSplit1. % second part of beam down |
| 792 |
% \oa 5 d |
| 793 |
% \Mirror1 {} * R % mirror |
| 794 |
% \oa 2 r |
| 795 |
% \nl\ScrL1 {screen} h % white screen |
| 796 |
% \end{circuit} |
| 797 |
% \end{verbatim} |
| 798 |
% |
| 799 |
% |
| 800 |
% \section{Some hints for \CIRC programmers} |
| 801 |
% |
| 802 |
% Here are some hints to add further symbols to \CIRC. |
| 803 |
% |
| 804 |
% Before creating any new symbol consult very carefully the file |csym.mf|. |
| 805 |
% It contains a lot of very useful definitions to simplify writing new symbols. |
| 806 |
% Examples for the use of these definitions are given in the files |
| 807 |
% |ciwidko.mf| and |optic.mf|. |
| 808 |
% When possible it is strongly recommended to use the \MF commands |
| 809 |
% \begin{Description}{|fourfourchars|} |
| 810 |
% \item[|twochars|] for symbols with the symmetry two, |
| 811 |
% \item[|fourchars|] for symmetry four and |
| 812 |
% \item[|fourfourchars|] for symmetry eight, |
| 813 |
% \end{Description} |
| 814 |
% because the definition of the corresponding \TeX\ command |
| 815 |
% will need only one line! If there are any problems with \MF{} |
| 816 |
% do not hesitate to contact the authors. |
| 817 |
% |
| 818 |
% A new option file with the extension |def|, |
| 819 |
% for instance |newcirc.def|, has to be created to include |
| 820 |
% the written symbols. To include the new definitions add |
| 821 |
% |newcirc| to the options in the \warp{usepackage} command: |
| 822 |
% \example{\warp{usepackage[basic,newcirc]\{circ\}}\qquad .} |
| 823 |
% |
| 824 |
% The \CIRC-command \CB{freecirc} has to be used to start the |
| 825 |
% definitions of new commands in the file |newcirc.def|. |
| 826 |
% This ensures, that the asterix (`*') becomes active, because |
| 827 |
% all internal \CIRC commands contain the asterix. It is comparable to |
| 828 |
% \LaTeX 's \warp{makeatletter}. The \CIRC-command \CB{protectcirc} |
| 829 |
% has to be used at the end of the file |newcirc.def| |
| 830 |
% in order to restore the former |
| 831 |
% behaviour (comparable to \warp{makeatother}). |
| 832 |
% |
| 833 |
% The \CB{cdef*} commands are strongly recommended to declare commands |
| 834 |
% with the new symbols, because only one line is needed for the definition. |
| 835 |
% The files |basic.def| or |optics.def| contain examples for \warp{cdef} and |
| 836 |
% related commands, which are defined in |circ.sty|. |
| 837 |
% |
| 838 |
% To ensure that the new symbols are inserted in the right |
| 839 |
% magnification the command \CB{extracircinit} may be used. |
| 840 |
% It can be used in the same way as \warp{opticfontinit} is used |
| 841 |
% in |optics.def|. Both are defined in |circ.sty| as \warp{relax} |
| 842 |
% and are called when a new diagram is initialized. If it is necessary |
| 843 |
% to do any operations before starting a circuit diagram, then |
| 844 |
% it is possible to redefine \warp{extracircinit} to do the job. |
| 845 |
% |
| 846 |
% \section{Future plans} |
| 847 |
% \CIRC is still under development. A lot of users need |
| 848 |
% additional symbols or have other wishes. In most of the cases there is |
| 849 |
% a quick solution, but to give \CIRC the ability to be an easy |
| 850 |
% extendable tool (and to add more potentiality) it has to be rewritten. |
| 851 |
% Until this is done there could happen the following steps: |
| 852 |
%\begin{itemize} |
| 853 |
%\item solve the problem of inscriptions for transistors |
| 854 |
%\item redesign some symbols and reimplement the \MF sources |
| 855 |
%\item rewrite the font selection to fix some ugly effects |
| 856 |
%\item add color support and build a \MP port |
| 857 |
%\item use the NFSS2 to make different linethicknesses available |
| 858 |
%\item describe the link between \TeX\ and \META |
| 859 |
%\item update the documentation every time |
| 860 |
%\end{itemize} |
| 861 |
% |
| 862 |
% |
| 863 |
% \section{Contacting the authors} |
| 864 |
% Any bug reports, remarks, proposals for new options and symbols, |
| 865 |
% any improvements to both the code or the documentation |
| 866 |
% as well as some nice postcards are welcome. |
| 867 |
% |
| 868 |
% \medskip |
| 869 |
% \begin{tabular}{@{}p{.5\hsize}@{}p{.5\hsize}@{}} |
| 870 |
% Sebastian Tannert & Andreas Tille \\ |
| 871 |
% WEN 67.02.01.06 & Gartenstra\ss e 8 \\ |
| 872 |
% Harbigstra\ss e 14 & D-38855 Wernigerode \\ |
| 873 |
% D-14055 Berlin & \\ |
| 874 |
% &\\ |
| 875 |
% [email protected] & [email protected] |
| 876 |
% \end{tabular} |
| 877 |
% \iffalse Some changes to the layout for the appendix. \fi |
| 878 |
%\advance\textheight\topmargin |
| 879 |
%\advance\textheight60pt |
| 880 |
%\advance\textheight\headsep |
| 881 |
%\advance\textheight\headheight |
| 882 |
%\newpage |
| 883 |
%\topmargin-30pt |
| 884 |
%\headsep0pt |
| 885 |
%\headheight0pt |
| 886 |
%\oddsidemargin10pt |
| 887 |
%\parindent 0pt |
| 888 |
%\lineskip4mm |
| 889 |
%^^A last update: Fri 03-13-1998 |
| 890 |
% \section{\appendixname} |
| 891 |
%\def\spc{\,\texttt{\char'40}\,} |
| 892 |
%\def\num{\textit{number}} |
| 893 |
%\def\len{\textit{length}} |
| 894 |
%\def\dir{\textit{direction}} |
| 895 |
%\def\txt{\textit{text}} |
| 896 |
%\def\lab#1{\textit{label} \textrm{#1}\spc} |
| 897 |
% The symmetries and there parameters:\\[1mm] |
| 898 |
% \catcode`\|=12 |
| 899 |
% \begin{tabular}{l|l} |
| 900 |
% symmetrie & parameter set \\[1mm]\hline |
| 901 |
% $\mathcal{OP}$ & \num\spc\\[1mm] |
| 902 |
% $\mathcal{LI}$ & \len\spc\dir\spc\\[1mm] |
| 903 |
% $\mathcal{LB}$ & \num\spc\txt\spc\dir\spc\\[1mm] |
| 904 |
% $\mathcal{TXT}$ & \txt\spc\texttt{from}\spc |
| 905 |
% \textit{pin\_reference1}\spc\texttt{to}\spc\textit{pin\_reference2}\spc\\[1mm] |
| 906 |
% $\mathcal{SO}$ & \num\spc\txt\spc\dir[l,r,u,d]\spc\\[1mm] |
| 907 |
% $\mathcal{SX}$ & \num\spc\txt\spc\dir[l,r,u,d,L,R,U,D]\spc\\[1mm] |
| 908 |
% $\mathcal{SXY}$ & \num\spc\txt\spc\dir[l,r,u,d]\spc\\[1mm] |
| 909 |
% $\mathcal{S\mathrm{3}P}$ & \num\spc\txt\spc\textit{pin\_name}\spc\dir[l,r,u,d,L,R,U,D]\spc\\[1mm] |
| 910 |
% $\mathcal{GI}$ & \num\spc\txt\spc\textit{pin\_name}\spc\lab a\lab b\\[1mm] |
| 911 |
% $\mathcal{GII}$ & \num\spc\txt\spc\textit{pin\_name}\spc\lab a\lab b\lab c\\[1mm] |
| 912 |
% $\mathcal{BX}$ & \num\spc\textit{pin\_name}\spc\lab a\lab b\lab c\lab d\\[1mm] |
| 913 |
% $\mathcal{BXT}$ & \num\spc\txt\spc\textit{pin\_name}\spc\lab a\lab b\lab c\lab d\\[1mm] |
| 914 |
% $\mathcal{IC}$ & \num\spc\txt\spc\textit{pin\_name}\spc\textit{style\footnote{Today this should be empty, like \{\}.}}\spc\\[1mm] |
| 915 |
% \end{tabular}\vskip 10mm |
| 916 |
% \MakePercentComment\input{cisyms}\MakePercentIgnore |
| 917 |
% \advance\hsize-4cm |
| 918 |
% \oddsidemargin35pt |
| 919 |
% \newpage |
| 920 |
% \PrintIndex |
| 921 |
% \iffalse DON'T process driver definitions! |
| 922 |
%<*driver> |
| 923 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 924 |
\begin{filecontents}{circ.ist} |
| 925 |
delim_0 "\\hfill " |
| 926 |
delim_t "\\hbox to 7mm{\\hss}" |
| 927 |
\end{filecontents} |
| 928 |
\documentclass{ltxdoc} |
| 929 |
\usepackage[basic,box,gate,oldgate,ic,optics,physics]{circ} |
| 930 |
\usepackage{t1enc} |
| 931 |
\usepackage{xspace} |
| 932 |
\IndexPrologue{\section{Index}} |
| 933 |
\makeindex |
| 934 |
\begin{document} |
| 935 |
\DocInput{circ.dtx} |
| 936 |
\end{document} |
| 937 |
%</driver> |
| 938 |
% \fi |
| 939 |
%^^A last update: Fri 03-13-1998 |
| 940 |
%\iffalse |
| 941 |
%<*docsty> |
| 942 |
%\fi |
| 943 |
\chardef\backslash="5C |
| 944 |
\catcode`\|=12 |
| 945 |
\parindent 2mm |
| 946 |
\lineskip 0pt |
| 947 |
\advance\textwidth by 39.4pt |
| 948 |
|
| 949 |
\def\lpin#1{\shift -1.1 0 \put{\tlap{\llap{\tt#1$\rfloor$}\vss}}} |
| 950 |
\def\bpin#1{\shift 0 -1.5 \put{\blap{\llap{\tt#1\hss}}}} |
| 951 |
\def\tpin#1{\shift 0 1.5 \put{\tlap{\llap{\tt#1\hss}}}} |
| 952 |
\def\rpin#1{\shift 1.1 0 \put{\tlap{\rlap{$\lfloor$\tt#1}\vss}}} |
| 953 |
|
| 954 |
\def\cdef#1 #2 #3#4 #5 {\noindent |
| 955 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 956 |
{\hsize 4.3cm \footnotesize #5\par} |
| 957 |
\vfill |
| 958 |
\hbox to 4.5cm{\hfill |
| 959 |
\begin{circuit}0 \csname #1\endcsname{n} {text} r \end{circuit} |
| 960 |
\hfill}\vfill |
| 961 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 962 |
\fbox{$\mathcal{SXY}$}\quad} |
| 963 |
\vskip 2mm |
| 964 |
\hrule width 4.5cm height .1pt}% |
| 965 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 966 |
|
| 967 |
\def\cwdef#1 #2 #3 {\noindent |
| 968 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 969 |
{\hsize 4.3cm \footnotesize #3\par} |
| 970 |
\vfill |
| 971 |
\hbox to 4.5cm{\hfill |
| 972 |
\begin{circuit}0 \csname #1\endcsname 6 r \end{circuit} |
| 973 |
\hfill}\vfill |
| 974 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 975 |
\fbox{$\mathcal{LI}$}\quad} |
| 976 |
\vskip 2mm |
| 977 |
\hrule width 4.5cm height .1pt}% |
| 978 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 979 |
|
| 980 |
|
| 981 |
|
| 982 |
\def\cwwdef#1 #2 {\noindent |
| 983 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 984 |
{\hsize 4.3cm \footnotesize #2\par} |
| 985 |
\vfill |
| 986 |
\hbox to 4.5cm{\hfill |
| 987 |
\begin{circuit}0 \csname #1\endcsname {text} 6 r \end{circuit} |
| 988 |
\hfill}\vfill |
| 989 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 990 |
\fbox{$\mathcal{LB}$}\quad} |
| 991 |
\vskip 2mm |
| 992 |
\hrule width 4.5cm height .1pt}% |
| 993 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 994 |
|
| 995 |
\def\NgateIIO#1 #2#3 #4 #5 {\noindent |
| 996 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 997 |
{\hsize 4.3cm \footnotesize #5\par} |
| 998 |
\vfill |
| 999 |
\hbox to 4.5cm{\hfill |
| 1000 |
\begin{circuit}0 \csname #1\endcsname{n} {text} : a b c |
| 1001 |
\atpin{#1nI1} \lpin{I1} \atpin{#1nI2} \lpin{I2} \atpin{#1nO} \rpin{O} |
| 1002 |
\end{circuit} |
| 1003 |
\hfill}\vfill |
| 1004 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1005 |
\fbox{$\mathcal{GII}$}\quad} |
| 1006 |
\vskip 2mm |
| 1007 |
\hrule width 4.5cm height .1pt}% |
| 1008 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1009 |
|
| 1010 |
\def\gateIIO#1 #2#3 #4#5 #6 #7 #8 {\noindent |
| 1011 |
\hbox{\vbox to 3.8cm{\vskip 2mm |
| 1012 |
{\hsize 4.8cm \footnotesize #8\par} |
| 1013 |
\vfill |
| 1014 |
\hbox to 5cm{\hfill |
| 1015 |
\begin{circuit}0 \csname #1\endcsname{n} {text} : a b c |
| 1016 |
\atpin{#1n#5} \lpin{#5} \atpin{#1n#7} \lpin{#7} \atpin{#1n#6} \rpin{#6} |
| 1017 |
\end{circuit} |
| 1018 |
\hfill}\vfill |
| 1019 |
\hbox to 5cm{~~{\tt\backslash#1}\quad\hfill |
| 1020 |
\fbox{$\mathcal{GII}$}\quad} |
| 1021 |
\vskip 2mm |
| 1022 |
\hrule width 5cm height .1pt}% |
| 1023 |
\vrule width.1pt height 3.8cm depth 0pt}\linebreak[1]} |
| 1024 |
|
| 1025 |
\def\NgateIO#1 #2#3 #4 #5 {\noindent |
| 1026 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1027 |
{\hsize 4.3cm \footnotesize #5\par} |
| 1028 |
\vfill |
| 1029 |
\hbox to 4.5cm{\hfill |
| 1030 |
\begin{circuit}0 \csname #1\endcsname{n} {text} : a b |
| 1031 |
\atpin{#1nI} \lpin{I} \atpin{#1nI} \atpin{#1nO} \rpin{O} |
| 1032 |
\end{circuit} |
| 1033 |
\hfill}\vfill |
| 1034 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1035 |
\fbox{$\mathcal{GI}$}\quad} |
| 1036 |
\vskip 2mm |
| 1037 |
\hrule width 4.5cm height .1pt}% |
| 1038 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1039 |
|
| 1040 |
\def\cdefiv#1 #2 #3#4 #5 #6 #7 {\noindent |
| 1041 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1042 |
{\hsize 4.3cm \footnotesize #7\par} |
| 1043 |
\vfill |
| 1044 |
\hbox to 4.5cm{\hfill |
| 1045 |
\begin{circuit}0 \csname #1\endcsname{n} {text} #5 r |
| 1046 |
\atpin {#1n#5} \lpin{#5} |
| 1047 |
\atpin {#1n#6} \rpin{#6} |
| 1048 |
\end{circuit} |
| 1049 |
\hfill}\vfill |
| 1050 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1051 |
\fbox{$\mathcal{SX}$}\quad} |
| 1052 |
\vskip 2mm |
| 1053 |
\hrule width 4.5cm height .1pt}% |
| 1054 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1055 |
|
| 1056 |
\def\cdefivNL#1 #2#3 #4 #5 #6 {\noindent |
| 1057 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1058 |
{\hsize 4.3cm \footnotesize #6\par} |
| 1059 |
\vfill |
| 1060 |
\hbox to 4.5cm{\hfill |
| 1061 |
\begin{circuit}0 \csname #1\endcsname{n} {text} #5 r |
| 1062 |
\atpin {#1n#4} \lpin{#4} |
| 1063 |
\atpin {#1n#5} \rpin{#5} |
| 1064 |
\end{circuit} |
| 1065 |
\hfill}\vfill |
| 1066 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1067 |
\fbox{$\mathcal{SX}$}\quad} |
| 1068 |
\vskip 2mm |
| 1069 |
\hrule width 4.5cm height .1pt}% |
| 1070 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1071 |
|
| 1072 |
\def\cdefiviv#1 #2 #3#4 #5 #6 #7 {\noindent |
| 1073 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1074 |
{\hsize4.3cm \footnotesize #7\par}% |
| 1075 |
\vfill |
| 1076 |
\hbox to 4.5cm{\hfill |
| 1077 |
\begin{circuit}0 \csname #1\endcsname{n} {text} #5 r |
| 1078 |
\atpin {#1n#5} \lpin{#5} |
| 1079 |
\atpin {#1n#6} \rpin{#6} |
| 1080 |
\end{circuit} |
| 1081 |
\hfill}\vfill |
| 1082 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1083 |
\fbox{$\mathcal{SO}$}\quad} |
| 1084 |
\vskip 2mm |
| 1085 |
\hrule width 4.5cm height .1pt}% |
| 1086 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1087 |
|
| 1088 |
\def\cdefivivNL#1 #2#3 #4 #5 #6 {\noindent |
| 1089 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1090 |
{\hsize4.3cm \footnotesize #6\par}% |
| 1091 |
\vfill |
| 1092 |
\hbox to 4.5cm{\hfill |
| 1093 |
\begin{circuit}0 \csname #1\endcsname{n} {text} #5 r |
| 1094 |
\atpin {#1n#4} \lpin{#4} |
| 1095 |
\atpin {#1n#5} \rpin{#5} |
| 1096 |
\end{circuit} |
| 1097 |
\hfill}\vfill |
| 1098 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1099 |
\fbox{$\mathcal{SO}$}\quad} |
| 1100 |
\vskip 2mm |
| 1101 |
\hrule width 4.5cm height .1pt}% |
| 1102 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1103 |
|
| 1104 |
\def\cdefo#1 #2 {\noindent |
| 1105 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1106 |
{\hsize 4.3cm \footnotesize #2\par} |
| 1107 |
\vfill |
| 1108 |
\hbox to 4.5cm{\hfill |
| 1109 |
\begin{circuit}0 \csname #1\endcsname{n} \end{circuit} |
| 1110 |
\hfill}\vfill |
| 1111 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1112 |
\fbox{$\mathcal{OP}$}\quad} |
| 1113 |
\vskip 2mm |
| 1114 |
\hrule width 4.5cm height .1pt}% |
| 1115 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1116 |
|
| 1117 |
\def\optionline#1 {\vskip3mm |
| 1118 |
{\large Symbols provided by the option \fbox{\tt#1.def}}\\[3mm]} |
| 1119 |
|
| 1120 |
\def\bbdef#1 #2#3 #4 {\noindent |
| 1121 |
\hbox{\vbox to 4.5cm{\vskip 2mm |
| 1122 |
{\hsize 4.3cm \footnotesize #4\par} |
| 1123 |
\vfill |
| 1124 |
\hbox to 4.5cm{\hfill |
| 1125 |
\begin{circuit}0 \csname #1\endcsname n {text} : a b c d |
| 1126 |
\atpin{#1nP1} \lpin{P1} |
| 1127 |
\atpin{#1nP2} \bpin{P2} |
| 1128 |
\atpin{#1nP4} \tpin{P4} |
| 1129 |
\atpin{#1nP3} \rpin{P3} |
| 1130 |
\end{circuit} |
| 1131 |
\hfill}\vfill |
| 1132 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1133 |
\fbox{$\mathcal{BXT}$}\quad} |
| 1134 |
\vskip 2mm |
| 1135 |
\hrule width 4.5cm height .1pt}% |
| 1136 |
\vrule width.1pt height 4.5cm depth 0pt}\linebreak[1]} |
| 1137 |
|
| 1138 |
\def\bbdefNeT#1 #2#3 #4 #5 {\noindent |
| 1139 |
\hbox{\vbox to 4.5cm{\vskip 2mm |
| 1140 |
{\hsize 4.3cm \footnotesize #5\par} |
| 1141 |
\vfill |
| 1142 |
\hbox to 4.5cm{\hfill |
| 1143 |
\begin{circuit}0 \csname #1\endcsname n : a b c d |
| 1144 |
\atpin{#1nP1} \lpin{P1} |
| 1145 |
\atpin{#1nP3} \rpin{P3} |
| 1146 |
\atpin{#1nP2} \bpin{P2} |
| 1147 |
\atpin{#1nP4} \tpin{P4} |
| 1148 |
\end{circuit} |
| 1149 |
\hfill}\vfill |
| 1150 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1151 |
\fbox{$\mathcal{BX}$}\quad} |
| 1152 |
\vskip 2mm |
| 1153 |
\hrule width 4.5cm height .1pt}% |
| 1154 |
\vrule width.1pt height 4.5cm depth 0pt}\linebreak[1]} |
| 1155 |
|
| 1156 |
\def\bbdefNeTii#1 #2#3 #4 #5 {\noindent |
| 1157 |
\hbox{\vbox to 4.5cm{\vskip 2mm |
| 1158 |
{\hsize 4.3cm \footnotesize #5\par} |
| 1159 |
\vfill |
| 1160 |
\hbox to 4.5cm{\hfill |
| 1161 |
\begin{circuit}0 \csname #1\endcsname n : a b c d h |
| 1162 |
\atpin{#1nP1} \lpin{P1} |
| 1163 |
\atpin{#1nP3} \rpin{P3} |
| 1164 |
\atpin{#1nP2} \bpin{P2} |
| 1165 |
\atpin{#1nP4} \tpin{P4} |
| 1166 |
\end{circuit} |
| 1167 |
\hfill}\vfill |
| 1168 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1169 |
\fbox{$\mathcal{BX}$}\quad} |
| 1170 |
\vskip 2mm |
| 1171 |
\hrule width 4.5cm height .1pt}% |
| 1172 |
\vrule width.1pt height 4.5cm depth 0pt}\linebreak[1]} |
| 1173 |
|
| 1174 |
\def\sbdef#1 #2#3 #4 #5 {\noindent |
| 1175 |
\hbox{\vbox to 4.5cm{\vskip 2mm |
| 1176 |
{\hsize 4.3cm \footnotesize #5\par} |
| 1177 |
\vfill |
| 1178 |
\hbox to 4.5cm{\hfill |
| 1179 |
\begin{circuit}0 \csname #1\endcsname n : a b c d h |
| 1180 |
\atpin{#1nP1} \lpin{P1} |
| 1181 |
\atpin{#1nP3} \rpin{P3} |
| 1182 |
\atpin{#1nP2} \bpin{P2} |
| 1183 |
\atpin{#1nP4} \tpin{P4} |
| 1184 |
\end{circuit} |
| 1185 |
\hfill}\vfill |
| 1186 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1187 |
\fbox{$\mathcal{BX}$}\quad} |
| 1188 |
\vskip 2mm |
| 1189 |
\hrule width 4.5cm height .1pt}% |
| 1190 |
\vrule width.1pt height 4.5cm depth 0pt}\linebreak[1]} |
| 1191 |
|
| 1192 |
\def\textdef#1 #2 {\noindent |
| 1193 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1194 |
{\hsize 4.3cm \footnotesize #2\par} |
| 1195 |
\vfill |
| 1196 |
\hbox to 4.5cm{\hfill |
| 1197 |
\begin{circuit}0 |
| 1198 |
\at 0 0 \P1 \at 6 0 \P2 |
| 1199 |
\csname #1\endcsname {text} from P1 to P2 \end{circuit} |
| 1200 |
\hfill}\vfill |
| 1201 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1202 |
\fbox{$\mathcal{TXT}$}\quad} |
| 1203 |
\vskip 2mm |
| 1204 |
\hrule width 4.5cm height .1pt}% |
| 1205 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1206 |
|
| 1207 |
\def\cdefviii#1 #2 #3#4 #5 #6 #7 #8 {\noindent |
| 1208 |
\hbox{\vbox to 3cm{\vskip 2mm |
| 1209 |
{\hsize4.3cm \footnotesize #8\par}% |
| 1210 |
\vfill |
| 1211 |
\hbox to 4.5cm{\hfill |
| 1212 |
\begin{circuit}0 \csname #1\endcsname{n} {text} : l |
| 1213 |
\atpin {#1n#5} \rpin{#5} |
| 1214 |
\atpin {#1n#6} \lpin{#6} |
| 1215 |
\atpin {#1n#7} \rpin{#7} |
| 1216 |
\end{circuit} |
| 1217 |
\hfill}\vfill |
| 1218 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1219 |
\fbox{$\mathcal{S\mathrm{3}P}$}\quad} |
| 1220 |
\vskip 2mm |
| 1221 |
\hrule width 4.5cm height .1pt}% |
| 1222 |
\vrule width.1pt height 3cm depth 0pt}\linebreak[1]} |
| 1223 |
|
| 1224 |
\def\Ccirc#1 #2 #3#4{\noindent |
| 1225 |
\def\Clpin##1{\atpin{#1n##1} \lpin{##1} } |
| 1226 |
\def\Crpin##1{\atpin{#1n##1} \rpin{##1} } |
| 1227 |
\hbox{\vbox to 4.5cm{\vskip 2mm |
| 1228 |
{\hsize 4.3cm \footnotesize #3\par} |
| 1229 |
\vfill |
| 1230 |
\hbox to 4.5cm{\hfill |
| 1231 |
\begin{circuit}0 \csname #1\endcsname n {text} #2 {} #4 |
| 1232 |
\end{circuit} |
| 1233 |
\hfill}\vfill |
| 1234 |
\hbox to 4.5cm{~~{\tt\backslash#1}\quad\hfill |
| 1235 |
\fbox{$\mathcal{IC}$}\quad} |
| 1236 |
\vskip 2mm |
| 1237 |
\hrule width 4.5cm height .1pt}% |
| 1238 |
\vrule width.1pt height 4.5cm depth 0pt}\linebreak[1]} |
| 1239 |
%\iffalse |
| 1240 |
%</docsty> |
| 1241 |
%\fi |
| 1242 |
%^^A last update: Fri 03-13-1998 |
| 1243 |
% \newpage |
| 1244 |
% {\Large\bf The code of \CIRC.}\\\vskip 1mm |
| 1245 |
% \begin{macrocode} |
| 1246 |
%<*code> |
| 1247 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 1248 |
\ProvidesClass{circ} |
| 1249 |
[1997/04/23 v1.0d for typeset circuit diagrams] |
| 1250 |
\DeclareOption*{\InputIfFileExists{\CurrentOption.def}{}% |
| 1251 |
{\PackageError{CIRC}{File \CurrentOption.def not found.}% |
| 1252 |
{Check spelling or think about the |
| 1253 |
location of file.\MessageBreak |
| 1254 |
I tried to load macros for the CIRC package.}}} |
| 1255 |
% \end{macrocode} |
| 1256 |
% |
| 1257 |
% Sorry, but it's better to stop here. |
| 1258 |
% The sourcecode is formatted worst. \endinput |
| 1259 |
% |
| 1260 |
% F"ur die interne Namensgebung m"ussen einige Zeichen |
| 1261 |
% in ihrem Kategoriekode als Buchstaben (11) eingetragen werden. |
| 1262 |
% Der jetzige Kode wird in Definitionen abgelegt. |
| 1263 |
% Das betrifft die Zeichen \verb+* [ ] @+. |
| 1264 |
% |
| 1265 |
% \begin{macrocode*} |
| 1266 |
\def\freecirc{\chardef\CIRCinternals\the\catcode`\*\catcode`\*=11 |
| 1267 |
\chardef\cc@lb\the\catcode`\[ |
| 1268 |
\chardef\cc@rb\the\catcode`\] |
| 1269 |
\chardef\cc@at\the\catcode`\@ |
| 1270 |
\catcode`\[=11\catcode`\]=11\catcode`\@=11 } |
| 1271 |
\def\protectcirc{\catcode`\[=\cc@lb\catcode`\]=\cc@rb\catcode`\@=\cc@at |
| 1272 |
\catcode`\*=\CIRCinternals\relax} |
| 1273 |
\freecirc |
| 1274 |
% \end{macrocode*} |
| 1275 |
%^^A last update: Fri 03-13-1998 |
| 1276 |
% Zu Testzwecken kann "uber \verb+\showpointstrue+ die |
| 1277 |
% Anzeige aller definierter Anschlu"spunkte eingestellt werden. |
| 1278 |
% \begin{macrocode} |
| 1279 |
\newif\ifshowpoints |
| 1280 |
\showpointsfalse |
| 1281 |
% \end{macrocode} |
| 1282 |
% |
| 1283 |
% Alle mit * gekennzeichneten Schalter werden nach jeder Zeichenoperation |
| 1284 |
% auf den entsprechenden Standardwert gesetzt. |
| 1285 |
% |
| 1286 |
% Die Darstellung der Beschriftung mit Schaltzeichentyp und Nummer |
| 1287 |
% wird "uber \verb+\iflab+ getsteuert. * |
| 1288 |
% \begin{macrocode} |
| 1289 |
\newif\iflab* |
| 1290 |
\lab*true |
| 1291 |
% \end{macrocode} |
| 1292 |
% |
| 1293 |
% Schaltzeichenwerte k"onnen auch ausgeblendet werden. * |
| 1294 |
% \begin{macrocode} |
| 1295 |
\newif\ifval* |
| 1296 |
\val*true |
| 1297 |
% \end{macrocode} |
| 1298 |
% |
| 1299 |
% Die Zeichenrichtung wird durch \verb+\ifld+ bestimmt. |
| 1300 |
% \begin{macrocode} |
| 1301 |
\newif\ifld* |
| 1302 |
\ld*false |
| 1303 |
% \end{macrocode} |
| 1304 |
% |
| 1305 |
% \begin{macrocode} |
| 1306 |
\newif\ifcc* |
| 1307 |
\cc*false |
| 1308 |
% \end{macrocode} |
| 1309 |
% |
| 1310 |
% |
| 1311 |
% \begin{macrocode} |
| 1312 |
\newif\ifpin |
| 1313 |
\pintrue |
| 1314 |
% \end{macrocode} |
| 1315 |
% |
| 1316 |
% \begin{macrocode} |
| 1317 |
\newif\ifxoutofgrid |
| 1318 |
\newif\ifyoutofgrid |
| 1319 |
\xoutofgridfalse |
| 1320 |
\youtofgridfalse |
| 1321 |
% \end{macrocode} |
| 1322 |
% |
| 1323 |
% \begin{macrocode} |
| 1324 |
\newif\ifcen* |
| 1325 |
\cen*false |
| 1326 |
% \end{macrocode} |
| 1327 |
% |
| 1328 |
% \begin{macrocode} |
| 1329 |
\newif\ifhvcen* |
| 1330 |
\hvcen*false |
| 1331 |
% \end{macrocode} |
| 1332 |
\newif\ifcheck* |
| 1333 |
% |
| 1334 |
% F"ur die Ermittlung der kleinsten Umschlie"senden Box werden die |
| 1335 |
% beiden Variablen \verb+\X*max+ und \verb+\X*min+ bei jeder |
| 1336 |
% Zeichenoperation aktualisiert. Sie enthalten die minimale und die |
| 1337 |
% maximale Ausdehnung der Zeichenfl"ache in horizontaler Richtung. |
| 1338 |
% \begin{macrocode} |
| 1339 |
\newdimen\X*max |
| 1340 |
\newdimen\X*min |
| 1341 |
% \end{macrocode} |
| 1342 |
% |
| 1343 |
% \begin{macrocode} |
| 1344 |
\newdimen\*X* |
| 1345 |
\newdimen\*Y* |
| 1346 |
% \end{macrocode} |
| 1347 |
% |
| 1348 |
% \begin{macrocode} |
| 1349 |
\newdimen\**X |
| 1350 |
\newdimen\**Y |
| 1351 |
% \end{macrocode} |
| 1352 |
% |
| 1353 |
% \begin{macrocode} |
| 1354 |
\newdimen\***X |
| 1355 |
\newdimen\***Y |
| 1356 |
% \end{macrocode} |
| 1357 |
% |
| 1358 |
% In der Box \verb+\*bbox+ wird f"ur eine Zeichenoperation |
| 1359 |
% das entsprechende horizontale Material gesammelt. |
| 1360 |
% Diese Box wird dann durch \verb+\put*bbox+ entsprechend |
| 1361 |
% der aktuellen Zeichenposition in die Box der entstehenden |
| 1362 |
% Zeichnung "ubernommen. |
| 1363 |
% \begin{macrocode} |
| 1364 |
\newbox\*bbox |
| 1365 |
% \end{macrocode} |
| 1366 |
% |
| 1367 |
% \begin{macrocode} |
| 1368 |
\newbox\box* |
| 1369 |
\newdimen\ic* |
| 1370 |
\newdimen\ht* |
| 1371 |
\newdimen\wd* |
| 1372 |
\newdimen\dp* |
| 1373 |
% |
| 1374 |
\newcount\cc* |
| 1375 |
\newdimen\*spc |
| 1376 |
\newtoks\ldd* %linke untere Beschriftung |
| 1377 |
\newtoks\rud* %rechte obere Beschriftung |
| 1378 |
% |
| 1379 |
\newtoks\llpos* |
| 1380 |
\newtoks\ldpos* |
| 1381 |
\newtoks\rlpos* |
| 1382 |
\newtoks\rdpos* |
| 1383 |
\newtoks\ulpos* |
| 1384 |
\newtoks\udpos* |
| 1385 |
\newtoks\dlpos* |
| 1386 |
\newtoks\ddpos* |
| 1387 |
% |
| 1388 |
\newcount\cnta* |
| 1389 |
\newcount\cntb* |
| 1390 |
% |
| 1391 |
\newtoks\name* %Bauelementname |
| 1392 |
\newtoks\ld*pin %Bezeichnung linker Anschlu"s |
| 1393 |
\newtoks\ru*pin % ... |
| 1394 |
\newtoks\m*pin % ... |
| 1395 |
% \end{macrocode} |
| 1396 |
% |
| 1397 |
\newtoks\rmacros |
| 1398 |
% |
| 1399 |
% \begin{macrocode} |
| 1400 |
\newdimen\outerspace |
| 1401 |
% \end{macrocode} |
| 1402 |
% |
| 1403 |
% \begin{macrocode} |
| 1404 |
\newtoks\*Ilist |
| 1405 |
\newtoks\*Olist |
| 1406 |
% \end{macrocode} |
| 1407 |
|
| 1408 |
% \begin{macrocode} |
| 1409 |
\newdimen\pin*spc |
| 1410 |
\newdimen\pin*ind |
| 1411 |
\newdimen\io*ind |
| 1412 |
\newdimen\mid*ind |
| 1413 |
\newdimen\pinnum*spc |
| 1414 |
% \end{macrocode} |
| 1415 |
%^^A last update: Fri 03-13-1998 |
| 1416 |
\def\CIRCredef{} |
| 1417 |
\def\safedef#1{\expandafter\ifx\csname#1\endcsname\relax |
| 1418 |
\toks0{\expandafter\def\csname#1\endcsname}\else |
| 1419 |
\edef\CIRCredef{\CIRCredef\expandafter\string\csname#1\endcsname\space}% |
| 1420 |
\toks0{\expandafter\def\csname.#1.\endcsname}\rmacros |
| 1421 |
\expandafter{\the\rmacros\let}\rmacros\expandafter\expandafter\expandafter |
| 1422 |
{\expandafter\the\expandafter\rmacros\csname#1\endcsname}\rmacros\expandafter |
| 1423 |
\expandafter\expandafter |
| 1424 |
{\expandafter\the\expandafter\rmacros\csname.#1.\endcsname}\fi |
| 1425 |
\the\toks0} |
| 1426 |
\def\safedefs#1{\expandafter\ifx\csname#1\endcsname\relax |
| 1427 |
\toks0{\expandafter\def\csname#1\endcsname}\else |
| 1428 |
\edef\CIRCredef{\CIRCredef\expandafter\string\csname#1\endcsname\space}% |
| 1429 |
\toks0{\expandafter\def\csname.#1.\endcsname}\rmacros |
| 1430 |
\expandafter{\the\rmacros\let}\rmacros\expandafter\expandafter\expandafter |
| 1431 |
{\expandafter\the\expandafter\rmacros\csname#1\endcsname}\rmacros\expandafter |
| 1432 |
\expandafter\expandafter |
| 1433 |
{\expandafter\the\expandafter\rmacros\csname.#1.\endcsname}\fi |
| 1434 |
\the\toks0 } |
| 1435 |
%^^A last update: Fri 03-13-1998 |
| 1436 |
% \begin{macrocode} |
| 1437 |
\def\getc*#1 {\advance\cc* by #1% |
| 1438 |
\ifcc* |
| 1439 |
\toks0\ldd*\ldd*\rud*\rud*\toks0 |
| 1440 |
\ifval* |
| 1441 |
\iflab*\val*true\else\val*false\fi |
| 1442 |
\lab*true |
| 1443 |
\else |
| 1444 |
\iflab*\val*true\else\val*false\fi |
| 1445 |
\lab*false |
| 1446 |
\fi |
| 1447 |
\fi |
| 1448 |
\global\setbox\box*=\hbox{\char\cc*\/\global\ic*=\lastkern\unkern}% |
| 1449 |
\global\ht*\ht\box*\global\wd*\wd\box*\global\dp*\dp\box*} |
| 1450 |
% \end{macrocode} |
| 1451 |
%^^A last update: Fri 03-13-1998 |
| 1452 |
% \begin{macrocode} |
| 1453 |
\def\check*max#1{\dimen0=#1\advance\dimen0\*X* |
| 1454 |
\ifdim\dimen0>\X*max\global\X*max\dimen0\fi} |
| 1455 |
% \end{macrocode} |
| 1456 |
% |
| 1457 |
% \begin{macrocode} |
| 1458 |
\def\check*X{\ifcheck*\ifdim\*X*<\X*min\global\X*min\*X*\fi |
| 1459 |
\ifdim\*X*>\X*max\global\X*max\*X*\fi\fi} |
| 1460 |
% \end{macrocode} |
| 1461 |
% |
| 1462 |
% \begin{macrocode} |
| 1463 |
\def\check*min#1{\dimen0=-#1\advance\dimen0\*X* |
| 1464 |
\ifdim\dimen0<\X*min\global\X*min\dimen0\fi} |
| 1465 |
% \end{macrocode} |
| 1466 |
% |
| 1467 |
% \begin{macrocode} |
| 1468 |
\def\check*#1{\check*min{#1}\check*max{#1}} |
| 1469 |
% \end{macrocode} |
| 1470 |
% |
| 1471 |
% \begin{macrocode} |
| 1472 |
\def\check*cen{\ifcen*\errhelp{Use `\hcenterto' or `\vcenterto'.}% |
| 1473 |
\errmessage{You can't use `\string\centerto' to center `\the\name*'}\fi} |
| 1474 |
% \end{macrocode} |
| 1475 |
%^^A last update: Fri 03-13-1998 |
| 1476 |
% Jede Zeichenoperation ruft \verb+\put*box+ auf, dieses |
| 1477 |
% Makro setzt die Box \verb+\*bbox+ an die aktuelle Zeichenposition. |
| 1478 |
% \begin{macrocode} |
| 1479 |
\def\put*box{\hbox to 0pt{\kern\*X*\raise\*Y*\box\*bbox\hss}} |
| 1480 |
% \end{macrocode} |
| 1481 |
% |
| 1482 |
% |
| 1483 |
% In Erweiterung zu \verb+\llap+ und \verb+\rlap+ werden |
| 1484 |
% hier weitere Abk"urzungen definiert. |
| 1485 |
% \begin{macrocode} |
| 1486 |
\def\hc*#1{\hbox to 0pt{\hss#1\hss}} |
| 1487 |
\def\vc*#1{\vbox to 0pt{\vss#1\vss}} |
| 1488 |
\def\tlap#1{\vbox to 0pt{\vss#1}} |
| 1489 |
\def\blap#1{\vbox to 0pt{#1\vss}} |
| 1490 |
\def\ac*#1{\vc*{\hc*{#1}}} |
| 1491 |
% \end{macrocode} |
| 1492 |
% |
| 1493 |
% |
| 1494 |
% Zur"ucksetzen der auf eine Zeichenoperation wirkenden Schalter. |
| 1495 |
% \begin{macrocode} |
| 1496 |
\def\reset*ifs{\ld*false\cen*false\hvcen*false\lab*true\val*true\cc*false} |
| 1497 |
% \end{macrocode} |
| 1498 |
% |
| 1499 |
% Das Kernmakro f"ur die Speicherung von Anschlu"spunkten. |
| 1500 |
% \begin{macrocode} |
| 1501 |
\def\store*XY#1{\ifshowpoints\message{#1}\fi |
| 1502 |
\expandafter\xdef\csname#1\endcsname{\*X*\the\*X*\*Y*\the\*Y*}} |
| 1503 |
% \end{macrocode} |
| 1504 |
% |
| 1505 |
% Retten der aktuellen Zeichenposition. |
| 1506 |
% \begin{macrocode} |
| 1507 |
\def\save*XY{\**X\*X*\**Y\*Y*} |
| 1508 |
\def\save*xy{\***X\*X*\***Y\*Y*} |
| 1509 |
% \end{macrocode} |
| 1510 |
% |
| 1511 |
% Wiederherstellen der aktuellen Zeichenposition |
| 1512 |
% \begin{macrocode} |
| 1513 |
\def\restore*XY{\*X*\**X\*Y*\**Y} |
| 1514 |
\def\restore*xy{\*X*\***X\*Y*\***Y} |
| 1515 |
% \end{macrocode} |
| 1516 |
% |
| 1517 |
% Abstand zwischen dem gespeichertem Punkt und dem aktuellen |
| 1518 |
% in x- und y-Richtung bestimmen |
| 1519 |
% \begin{macrocode} |
| 1520 |
\def\diff*XY{\advance\**X-\*X*\advance\**Y-\*Y*} |
| 1521 |
% \end{macrocode} |
| 1522 |
% |
| 1523 |
% Zentrierung auf angegebenes Schaltzeichen einschalten. |
| 1524 |
% Richtung ist durch die folgende Zeichenoperation bestimmt. |
| 1525 |
% \begin{macrocode} |
| 1526 |
\def\centerto#1 {\cen*true\save*XY\frompin#1: } |
| 1527 |
% \end{macrocode} |
| 1528 |
% |
| 1529 |
% Zentrierung auf angegebenes Schaltzeichen einschalten. |
| 1530 |
% Die aktuelle y-Position wird beibehalten. |
| 1531 |
% \begin{macrocode} |
| 1532 |
\def\hcenterto#1 {\hvcen*true\**Y\*Y*\frompin#1: \*Y*\**Y} |
| 1533 |
% \end{macrocode} |
| 1534 |
% |
| 1535 |
% Zentrierung auf angegebenes Schaltzeichen einschalten. |
| 1536 |
% Die aktuelle x-Position wird beibehalten. |
| 1537 |
% \begin{macrocode} |
| 1538 |
\def\vcenterto#1 {\hvcen*true\**X\*X*\frompin#1: \*X*\**X} |
| 1539 |
% \end{macrocode} |
| 1540 |
% |
| 1541 |
% |
| 1542 |
% \begin{macrocode} |
| 1543 |
\def\do*Ilist{\ifshowpoints\message{|<}\fi |
| 1544 |
\check*true |
| 1545 |
\save*XY\the\*Ilist\ifshowpoints\message{>|}\fi\restore*XY\*Ilist={}} |
| 1546 |
% \end{macrocode} |
| 1547 |
% |
| 1548 |
% \begin{macrocode} |
| 1549 |
\def\shift*Ilist#1{\ifshowpoints\message{|<}\fi |
| 1550 |
\check*false |
| 1551 |
\save*XY\the\*Ilist\frompin{\the\name*#1} |
| 1552 |
\ifshowpoints\message{| shift \the\name*#1 |}\fi |
| 1553 |
\advance\**X\**X\advance\**X-\*X*\*X*\**X |
| 1554 |
\advance\**Y\**Y\advance\**Y-\*Y*\*Y*\**Y |
| 1555 |
\check*true |
| 1556 |
\save*XY\the\*Ilist\restore*XY |
| 1557 |
\ifshowpoints\message{>|}\fi\*Ilist={}} |
| 1558 |
% \end{macrocode} |
| 1559 |
% |
| 1560 |
% \begin{macrocode} |
| 1561 |
\def\shift*IOlist#1{\ifshowpoints\message{|<}\fi |
| 1562 |
\check*false |
| 1563 |
\save*XY\the\*Ilist\restore*XY\advance\*X*\wd\*bbox\the\*Olist |
| 1564 |
\frompin{\the\name*#1} |
| 1565 |
\ifshowpoints\message{| shift \the\name*#1 |}\fi |
| 1566 |
\advance\**X\**X\advance\**X-\*X*\*X*\**X |
| 1567 |
\advance\**Y\**Y\advance\**Y-\*Y*\*Y*\**Y |
| 1568 |
\check*true |
| 1569 |
\save*XY\the\*Ilist\restore*XY\advance\*X*\wd\*bbox\the\*Olist |
| 1570 |
\restore*XY\ifshowpoints\message{>|}\fi\*Ilist={}\*Olist={}} |
| 1571 |
% \end{macrocode} |
| 1572 |
% |
| 1573 |
% \Ladd*x erweitert die Tokenliste \argi um Makros, die das |
| 1574 |
% Dimensionsregister \XXX um \argii erh"ohen. |
| 1575 |
% \argii wird als aktueller |
| 1576 |
% Zahlenwert in die Tokenliste "ubernommen, \argiii wird |
| 1577 |
% expandiert. |
| 1578 |
% \begin{macrocode} |
| 1579 |
\def\Ladd*x#1#2{\dimen9=#2% |
| 1580 |
\edef\next{{\the#1\advance\*X*\the\dimen9 }}% |
| 1581 |
\global#1\next} |
| 1582 |
% \end{macrocode} |
| 1583 |
% |
| 1584 |
% \Ladd*y ist \verb+\Ladd*x+ in seiner Funktion gleich, das Makro |
| 1585 |
% ver"andert jedoch \YYY. |
| 1586 |
% \begin{macrocode} |
| 1587 |
\def\Ladd*y#1#2{\dimen9=#2% |
| 1588 |
\edef\next{{\the#1\advance\*Y*\the\dimen9 }}% |
| 1589 |
\global#1\next} |
| 1590 |
% \end{macrocode} |
| 1591 |
% |
| 1592 |
% \Lstore* f"ugt in die Tokenliste \argi Makros ein, die die Position unter |
| 1593 |
% \argii speichern. |
| 1594 |
% \begin{macrocode} |
| 1595 |
\def\Lstore*#1#2{\edef\next{{\the#1\noexpand\store*XY{\the\name*#2}}}% |
| 1596 |
\global#1\next} |
| 1597 |
% \end{macrocode} |
| 1598 |
% |
| 1599 |
% \begin{macrocode} |
| 1600 |
\def\Lstopos*#1{\global#1\expandafter{\the#1\save*xy}} |
| 1601 |
\def\Lrstpos*#1{\global#1\expandafter{\the#1\restore*xy}} |
| 1602 |
% \end{macrocode} |
| 1603 |
% |
| 1604 |
% \begin{macrocode} |
| 1605 |
\def\LX*check#1{\global#1\expandafter{\the#1\check*X}} |
| 1606 |
% \end{macrocode} |
| 1607 |
% |
| 1608 |
% Die folgenden Makros sind schon auf die Tokenliste \verb+\*Ilist+ |
| 1609 |
% festgelegt, da fast alle Anschlu"sdefinitionen nur eine Liste |
| 1610 |
% benutzen. |
| 1611 |
% \begin{macrocode} |
| 1612 |
\def\add*x{\Ladd*x\*Ilist} |
| 1613 |
\def\add*y{\Ladd*y\*Ilist} |
| 1614 |
\def\store*{\Lstore*\*Ilist} |
| 1615 |
\def\stopos*{\Lstopos*\*Ilist} |
| 1616 |
\def\rstpos*{\Lrstpos*\*Ilist} |
| 1617 |
\def\X*check{\LX*check\*Ilist} |
| 1618 |
% \end{macrocode} |
| 1619 |
% |
| 1620 |
% \begin{macrocode} |
| 1621 |
\def\Cadd*#1{\Ladd*y#1{-\pin*spc}} |
| 1622 |
% \end{macrocode} |
| 1623 |
% |
| 1624 |
% \begin{macrocode} |
| 1625 |
\def\Cstore*#1#2{\ifx{#2}*\else\Lstore*#1{#2}\fi} |
| 1626 |
% \end{macrocode} |
| 1627 |
% |
| 1628 |
% Um einen Anschlu"spunkt zur neuen Zeichenposition zu erkl"aren, |
| 1629 |
% wird nur das entsprechende Makro aufgerufen, nachdem zuvor |
| 1630 |
% getestet wurde ob es existiert. |
| 1631 |
% \begin{macrocode} |
| 1632 |
\def\frompin#1 {\expandafter\ifx\csname#1\endcsname\relax |
| 1633 |
\errhelp{Check spelling! Look up in the description of circuits.}% |
| 1634 |
\errmessage{Point >#1< is not defined}\else\csname#1\endcsname\fi} |
| 1635 |
% \end{macrocode} |
| 1636 |
% |
| 1637 |
% F"ur eine sch"onere Lesbarkeit wird neben {\em von Punkt} |
| 1638 |
% auch noch {\em am Punkt} definiert. |
| 1639 |
% \begin{macrocode} |
| 1640 |
\let\atpin\frompin |
| 1641 |
% \end{macrocode} |
| 1642 |
% |
| 1643 |
% |
| 1644 |
% \begin{macrocode} |
| 1645 |
\def\h*twopins#1{\getc*#1 \ifcen*\*Y*\**Y\hvcen*true\fi |
| 1646 |
\wd\box*=.5\wd* |
| 1647 |
\advance\ht*\*spc |
| 1648 |
% |
| 1649 |
\X*check\store*{\the\ld*pin}\add*x{.5\wd*}\store*:\add*x{.5\wd*}% |
| 1650 |
\store*{\the\ru*pin}\X*check |
| 1651 |
\ifhvcen*\shift*Ilist:\else\ifld*\shift*Ilist{\the\ru*pin}\else\do*Ilist\fi\fi |
| 1652 |
% |
| 1653 |
\labelfont |
| 1654 |
\setbox0=\hbox{\the\rud*}\setbox1=\hbox{\the\ldd*}% |
| 1655 |
\**X\*X*\advance\*X*.5\wd* |
| 1656 |
\iflab*\check*{.5\wd0}\fi% |
| 1657 |
\ifval*\check*{.5\wd1}\fi% |
| 1658 |
\*X*\**X |
| 1659 |
% |
| 1660 |
\setbox\*bbox=\hbox{\box\box* |
| 1661 |
\iflab*\raise\ht*\hc*{\unhbox0}\fi |
| 1662 |
\ifval*\lower\dp*\vtop{\kern\*spc\hc*{\unhbox1}}\fi |
| 1663 |
\add*cmds}% |
| 1664 |
\put*box |
| 1665 |
\ifld*\else\advance\*X*\wd*\fi\reset*ifs} |
| 1666 |
% \end{macrocode} |
| 1667 |
% |
| 1668 |
% |
| 1669 |
% |
| 1670 |
% \begin{macrocode} |
| 1671 |
\def\v*twopins#1{\getc*#1 \ifcen*\*X*\**X\hvcen*true\fi |
| 1672 |
% |
| 1673 |
\labelfont |
| 1674 |
\setbox0=\hbox{\ifval*\the\ldd*\kern\*spc\fi\kern\dp*}\dimen1\wd0 |
| 1675 |
\setbox1=\hbox{\kern\wd*\iflab*\kern\*spc\the\rud*\fi}\dimen0\wd1 |
| 1676 |
\dp0=0pt\dp1=0pt |
| 1677 |
% |
| 1678 |
\wd\box*=0pt\dp\box*=0pt |
| 1679 |
\setbox\*bbox=\hbox{\box\box* |
| 1680 |
\raise.5\ht*\hbox{\vc*{\hbox{\llap{\box0}\rlap{\box1}}}\add*cmds}}% |
| 1681 |
% |
| 1682 |
\store*{\the\ld*pin}\add*y{.5\ht*}\store*:\add*y{.5\ht*}\store*{\the\ru*pin}% |
| 1683 |
\ifhvcen*\shift*Ilist:\else\ifld*\shift*Ilist{\the\ru*pin}\else\do*Ilist\fi\fi |
| 1684 |
% |
| 1685 |
\check*X |
| 1686 |
\check*max{\dimen0}% |
| 1687 |
\check*min{\dimen1}% |
| 1688 |
% |
| 1689 |
\put*box |
| 1690 |
\ifld*\else\advance\*Y*\ht*\fi\reset*ifs} |
| 1691 |
% \end{macrocode} |
| 1692 |
%^^A last update: Fri 03-13-1998 |
| 1693 |
% \begin{macrocode} |
| 1694 |
\def\ii*#1 {\if#1h\ld*pin{l}\ru*pin{r}\h*twopins0\relax\else |
| 1695 |
\if#1v\ld*pin{b}\ru*pin{t}\v*twopins1\relax\else |
| 1696 |
\if#1u\ld*pin{b}\ru*pin{t}\v*twopins1\relax\else |
| 1697 |
\if#1d\ld*pin{b}\ru*pin{t}\ld*true\v*twopins1\relax\else |
| 1698 |
\if#1l\ld*pin{l}\ru*pin{r}\ld*true\h*twopins0\relax\else |
| 1699 |
\if#1r\ld*pin{l}\ru*pin{r}\h*twopins0\relax\else |
| 1700 |
\errhelp{Direction >h<, >v<, >l<, >u<, >r< or >d< expected.}% |
| 1701 |
\errmessage{Bad direction specified! You typed:>#1<.}% |
| 1702 |
\fi\fi\fi\fi\fi\fi} |
| 1703 |
% \end{macrocode} |
| 1704 |
%^^A last update: Fri 03-13-1998 |
| 1705 |
% \begin{macrocode} |
| 1706 |
\def\change*pins{\toks0\ld*pin\ld*pin\ru*pin\ru*pin\toks0} |
| 1707 |
% \end{macrocode} |
| 1708 |
% |
| 1709 |
\def\CiRCl{1}\def\CiRCr{2}\def\CiRCu{3}\def\CiRCd{4} |
| 1710 |
\def\CiRCL{5}\def\CiRCR{6}\def\CiRCU{7}\def\CiRCD{8} |
| 1711 |
\def\CIRCiErr{\PackageError{CIRC}{Internal Error}% |
| 1712 |
{You are great, please send all files to the author and wait for |
| 1713 |
answer.}} |
| 1714 |
% \begin{macrocode} |
| 1715 |
\def\iv*#1 #2 {\cnta*=0\csname CiRC#2\endcsname\relax |
| 1716 |
\ifnum\cnta*=0 |
| 1717 |
\PackageError{CIRC}{Bad direction}% |
| 1718 |
{Please check spelling}\fi |
| 1719 |
\ifcase\CIRCpintoN{#1}\relax\CIRCiErr \or |
| 1720 |
\ifcase\cnta* |
| 1721 |
\CIRCiErr\or\<\change*pins\h*twopins2\relax |
| 1722 |
\or\h*twopins0\relax |
| 1723 |
\or\v*twopins1\relax |
| 1724 |
\or\change*pins\<\v*twopins3\relax\else |
| 1725 |
\PackageError{CIRC}{Bad direction}% |
| 1726 |
{Please check spelling, only [l r u d] expected}\fi\or |
| 1727 |
\ifcase\cnta* |
| 1728 |
\CIRCiErr\or\<\h*twopins0\relax |
| 1729 |
\or\change*pins\h*twopins2\relax |
| 1730 |
\or\change*pins\v*twopins3\relax |
| 1731 |
\or\<\v*twopins1\relax\else |
| 1732 |
\PackageError{CIRC}{Bad direction}% |
| 1733 |
{Please check spelling, only [l r u d] expected}\fi\fi} |
| 1734 |
\def\iviv*#1 #2 {\cnta*=0\csname CiRC#2\endcsname\relax |
| 1735 |
\ifnum\cnta*=0 |
| 1736 |
\PackageError{CIRC}{Bad direction}% |
| 1737 |
{Please check spelling}\fi |
| 1738 |
\ifcase\CIRCpintoN{#1}\relax\CIRCiErr \or |
| 1739 |
\ifcase\cnta* |
| 1740 |
\CIRCiErr\or\<\change*pins\h*twopins6\relax |
| 1741 |
\or\h*twopins0\relax |
| 1742 |
\or\v*twopins5\relax |
| 1743 |
\or\change*pins\<\v*twopins3\relax |
| 1744 |
\or\<\change*pins\h*twopins2\relax |
| 1745 |
\or\h*twopins4\relax |
| 1746 |
\or\v*twopins1\relax |
| 1747 |
\or\change*pins\<\v*twopins7\relax\fi\or |
| 1748 |
\ifcase\cnta* |
| 1749 |
\CIRCiErr\or\<\h*twopins0\relax |
| 1750 |
\or\change*pins\h*twopins6\relax |
| 1751 |
\or\change*pins\v*twopins3\relax |
| 1752 |
\or\<\v*twopins5\relax |
| 1753 |
\or\<\h*twopins4\relax |
| 1754 |
\or\change*pins\h*twopins2\relax |
| 1755 |
\or\change*pins\v*twopins7\relax |
| 1756 |
\or\<\v*twopins1\relax\fi\fi} |
| 1757 |
% |
| 1758 |
% \end{macrocode} |
| 1759 |
%^^A last update: Fri 03-13-1998 |
| 1760 |
% \begin{macrocode} |
| 1761 |
\def\lviii*#1{\store*{\the\m*pin}\X*check |
| 1762 |
\add*x\wd*\stopos*\add*y{-\dp*}\store*{\the\ld*pin}\X*check |
| 1763 |
\rstpos*\add*y\ht*\store*{\the\ru*pin}\rstpos* |
| 1764 |
\dimen0\ht*\advance\dimen0-\dp*\add*y{.5\dimen0}\store*: |
| 1765 |
\rstpos*\add*x\ic*\X*check |
| 1766 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi |
| 1767 |
\setbox\*bbox=\hbox{\labelfont |
| 1768 |
\the\llpos*\box\box*\the\ldpos*}\put*box} |
| 1769 |
% \end{macrocode} |
| 1770 |
% |
| 1771 |
% \begin{macrocode} |
| 1772 |
\def\rviii*#1{\store*{\the\m*pin}\X*check |
| 1773 |
\add*x{-\wd*}\stopos*\add*y\ht*\store*{\the\ru*pin}\X*check |
| 1774 |
\rstpos*\add*y{-\dp*}\store*{\the\ld*pin}\rstpos* |
| 1775 |
\dimen0\ht*\advance\dimen0-\dp*\add*y{.5\dimen0}\store*: |
| 1776 |
\rstpos*\add*x{-\ic*}\X*check |
| 1777 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi |
| 1778 |
\setbox\*bbox=\hbox{\labelfont |
| 1779 |
\the\rdpos*\box\box*\the\rlpos*}\put*box} |
| 1780 |
% \end{macrocode} |
| 1781 |
% |
| 1782 |
% \begin{macrocode} |
| 1783 |
\def\dviii*#1{\store*{\the\m*pin}% |
| 1784 |
\add*y\dp*\stopos*\add*x\ic*\store*{\the\ru*pin}\X*check |
| 1785 |
\rstpos*\add*x{-\wd*}\store*{\the\ld*pin}\X*check |
| 1786 |
\rstpos*\dimen0-\wd*\advance\dimen0\ic*\add*x{.5\dimen0}\store*: |
| 1787 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi |
| 1788 |
\wd\box*=0pt\dp\box*=0pt |
| 1789 |
\setbox\*bbox=\hbox{\labelfont |
| 1790 |
\the\dlpos*\box\box*\the\ddpos*}\put*box} |
| 1791 |
% \end{macrocode} |
| 1792 |
% |
| 1793 |
% \begin{macrocode} |
| 1794 |
\def\uviii*#1{\store*{\the\m*pin}% |
| 1795 |
\add*y{-\ht*}\stopos*\add*x\ic*\store*{\the\ru*pin}\X*check |
| 1796 |
\rstpos*\add*x{-\wd*}\store*{\the\ld*pin}\X*check |
| 1797 |
\rstpos*\dimen0-\wd*\advance\dimen0\ic*\add*x{.5\dimen0}\store*: |
| 1798 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi |
| 1799 |
\wd\box*=0pt\ht\box*=0pt |
| 1800 |
\setbox\*bbox=\hbox{\labelfont |
| 1801 |
\the\ulpos*\box\box*\the\udpos*}\put*box} |
| 1802 |
% \end{macrocode} |
| 1803 |
% |
| 1804 |
% \begin{macrocode} |
| 1805 |
\def\viii*#1 #2 {\check*cen |
| 1806 |
\if#2l \getc*0 \lviii*{#1}\else |
| 1807 |
\if#2r \getc*1 \rviii*{#1}\else |
| 1808 |
\if#2d \getc*3 \dviii*{#1}\else |
| 1809 |
\if#2u \getc*2 \uviii*{#1}\else |
| 1810 |
\if#2L\change*pins\getc*4 \lviii*{#1}\else |
| 1811 |
\if#2R\change*pins\getc*5 \rviii*{#1}\else |
| 1812 |
\if#2D\change*pins\getc*7 \dviii*{#1}\else |
| 1813 |
\if#2U\change*pins\getc*6 \uviii*{#1}\else |
| 1814 |
\errhelp{Direction >l<, >r<, >u<, >d<, >L<, >R<, >U< or >D< |
| 1815 |
expected.}% |
| 1816 |
\errmessage{Bad direction >#2<}\fi\fi\fi\fi\fi\fi\fi\fi |
| 1817 |
\reset*ifs} |
| 1818 |
% \end{macrocode} |
| 1819 |
%^^A last update: Fri 03-13-1998 |
| 1820 |
% |
| 1821 |
% |
| 1822 |
\def\CIRCpintoN#1{\if\the\ld*pin#1 1\else |
| 1823 |
\if\the\ru*pin#1 2\else |
| 1824 |
\if\the\m*pin#1 3\else |
| 1825 |
\PackageError{CIRC}{Bad pin name}% |
| 1826 |
{Please check spelling or look up in the documentation} |
| 1827 |
\fi\fi\fi} |
| 1828 |
% |
| 1829 |
% \begin{macrocode} |
| 1830 |
\def\cdef#1 #2 #3#4 {\safedef{#1}##1 ##2 {% |
| 1831 |
\name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\cc*#4 #3\ii*}} |
| 1832 |
% \end{macrocode} |
| 1833 |
% |
| 1834 |
% \begin{macrocode} |
| 1835 |
\def\cdefiv#1 #2 #3#4 #5 #6 {\safedef{#1}##1 ##2 {% |
| 1836 |
\name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\m*pin{@}% |
| 1837 |
\ld*pin{#5}\ru*pin{#6}\cc*#4 #3\iv*}} |
| 1838 |
% \end{macrocode} |
| 1839 |
% |
| 1840 |
% \begin{macrocode} |
| 1841 |
\def\cdefivNL#1 #2#3 #4 #5 {\safedef{#1}##1 ##2 {% |
| 1842 |
\name*{#1##1}\rud*{}\ldd*{##2}\ld*pin{#4}\ru*pin{#5}\m*pin{@}% |
| 1843 |
\cc*#3 #2\iv*}} |
| 1844 |
% \end{macrocode} |
| 1845 |
% |
| 1846 |
% \begin{macrocode} |
| 1847 |
\def\cdefiviv#1 #2 #3#4 #5 #6 {\safedef{#1}##1 ##2 {% |
| 1848 |
\name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\ld*pin{#5}\ru*pin{#6}\m*pin{@}% |
| 1849 |
\cc*#4 #3\iviv*}} |
| 1850 |
% \end{macrocode} |
| 1851 |
% |
| 1852 |
% \begin{macrocode} |
| 1853 |
\def\cdefivivNL#1 #2#3 #4 #5 {\safedef{#1}##1 ##2 {% |
| 1854 |
\name*{#1##1}\rud*{}\ldd*{##2}\ld*pin{#4}\ru*pin{#5}\m*pin{@}% |
| 1855 |
\cc*#3 #2\iviv*}} |
| 1856 |
% \end{macrocode} |
| 1857 |
% |
| 1858 |
% |
| 1859 |
% \begin{macrocode} |
| 1860 |
\def\cdefNL#1 #2#3 {\safedef{#1}##1 ##2 {% |
| 1861 |
\name*{#1##1}\rud*{}\ldd*{##2}\cc*#3 #2\ii*}} |
| 1862 |
% \end{macrocode} |
| 1863 |
% |
| 1864 |
% |
| 1865 |
% \begin{macrocode} |
| 1866 |
\def\cdefviii#1 #2 #3#4 #5 #6 #7 {\safedef{#1}##1 ##2 {\name*{#1##1}% |
| 1867 |
\rud*{$#2_{##1}$}\ldd*{##2}\ld*pin{#5}\m*pin{#6}\ru*pin{#7}\cc*#4 #3\viii*}} |
| 1868 |
% \end{macrocode} |
| 1869 |
% \begin{macrocode} |
| 1870 |
\def\cwdef#1 #2 {\safedef{#1}##1 ##2 {\cc*#2 |
| 1871 |
\cnta*##1\toks2{}\toks4{}\dimen2=##1em\test*xygrid |
| 1872 |
\csname line*##2\endcsname}} |
| 1873 |
% \end{macrocode} |
| 1874 |
%^^A last update: Fri 03-13-1998 |
| 1875 |
% \begin{macrocode} |
| 1876 |
\def\black*boxii#1 #2 #3 #4 #5 #6 #7 {\check*cen |
| 1877 |
\if#7h\getc*0 |
| 1878 |
\store*{P1}\X*check\add*x{.5\wd*}\stopos*\X*check\store*: |
| 1879 |
\add*y\ht*\store*{P4}\rstpos*\add*y{-\dp*}\store*{P2}\rstpos* |
| 1880 |
\add*x{.5\wd*}\X*check\store*{P3}% |
| 1881 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi |
| 1882 |
\setbox\*bbox=\hbox{\ifpin\pinnumberfont |
| 1883 |
\setbox0=\hbox{#3\kern\*spc}\check*min{\wd0}% |
| 1884 |
\raise\pinnum*spc\llap{#3\kern\*spc}% |
| 1885 |
\setbox0=\hbox{\kern\*spc\kern\wd*#5}\check*max{\wd0}\wd0=0pt |
| 1886 |
\raise\pinnum*spc\box0 |
| 1887 |
\setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#6}\check*max{\wd0}\wd0=0pt |
| 1888 |
\dimen0\ht*\advance\dimen0\*spc |
| 1889 |
\raise\dimen0\box0 |
| 1890 |
\setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#4}\check*max{\wd0}\wd0=0pt |
| 1891 |
\dimen0\dp*\advance\dimen0\*spc |
| 1892 |
\lower\dimen0\vtop{\kern0pt\box0}\fi |
| 1893 |
\hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box\reset*ifs |
| 1894 |
\else\if#7v\getc*1 |
| 1895 |
\store*{P4}\X*check\add*x{.5\wd*}\stopos*\X*check\store*: |
| 1896 |
\add*y\ht*\store*{P3}\rstpos*\add*y{-\dp*}\store*{P1}\rstpos* |
| 1897 |
\add*x{.5\wd*}\X*check\store*{P2}% |
| 1898 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi |
| 1899 |
\setbox\*bbox=\hbox{\ifpin\pinnumberfont |
| 1900 |
\setbox0=\hbox{#6\kern\*spc}\check*min{\wd0}% |
| 1901 |
\raise\pinnum*spc\llap{#6\kern\*spc}% |
| 1902 |
\setbox0=\hbox{\kern\*spc\kern\wd*#4}\check*max{\wd0}\wd0=0pt |
| 1903 |
\raise\pinnum*spc\box0 |
| 1904 |
\setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#5}\check*max{\wd0}\wd0=0pt |
| 1905 |
\dimen0\ht*\advance\dimen0\*spc |
| 1906 |
\raise\dimen0\box0 |
| 1907 |
\setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#3}\check*max{\wd0}\wd0=0pt |
| 1908 |
\dimen0\dp*\advance\dimen0\*spc |
| 1909 |
\lower\dimen0\vtop{\kern0pt\box0}\fi |
| 1910 |
\hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box\reset*ifs |
| 1911 |
\else\errhelp{Direction >h< or >v< expected.}% |
| 1912 |
\errmessage{ >#1< Bad direction specified}\fi\fi} |
| 1913 |
% \end{macrocode} |
| 1914 |
% |
| 1915 |
% \begin{macrocode} |
| 1916 |
\def\black*box#1 #2 #3 #4 #5 #6 {\black*boxii{#1} {#2} {#3} {#4} {#5} {#6} h } |
| 1917 |
% \end{macrocode} |
| 1918 |
% |
| 1919 |
% \begin{macrocode} |
| 1920 |
\def\sym*box#1 #2 {\check*cen |
| 1921 |
\getc*0 |
| 1922 |
\store*{P1}\X*check\stopos* |
| 1923 |
\add*x{.5\wd*}\store*:\add*x{.5\wd*}\store*{P3}\X*check\rstpos* |
| 1924 |
\add*y{-1em}\store* b |
| 1925 |
\add*x{\wd*}\store* e\rstpos* |
| 1926 |
\add*y{1em}\store* a |
| 1927 |
\add*x{\wd*}\store* f\rstpos* |
| 1928 |
\add*x{.5\wd*}\stopos* |
| 1929 |
\add*y\ht*\store*{P4}% |
| 1930 |
\add*x{1em}\store* g |
| 1931 |
\rstpos*\add*y\ht* |
| 1932 |
\add*x{-1em}\store* h |
| 1933 |
\rstpos*\add*y{-\dp*}\store*{P2}% |
| 1934 |
\add*x{1em}\store* d |
| 1935 |
\rstpos*\add*y{-\dp*}% |
| 1936 |
\add*x{-1em}\store* c |
| 1937 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi |
| 1938 |
\setbox\*bbox= |
| 1939 |
\hbox{\hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box |
| 1940 |
\reset*ifs} |
| 1941 |
% \end{macrocode} |
| 1942 |
% |
| 1943 |
% \begin{macrocode} |
| 1944 |
\def\bbdef#1 #2#3 {\safedef{#1}##1 |
| 1945 |
{\name*{#1##1}\cc*#3 #2\black*box}} |
| 1946 |
% \end{macrocode} |
| 1947 |
% |
| 1948 |
% \begin{macrocode} |
| 1949 |
\def\bbdefNeT#1 #2#3 #4 {\safedef{#1}##1 |
| 1950 |
{\name*{#1##1}\cc*#3#2\black*box{#4} }} |
| 1951 |
% \end{macrocode} |
| 1952 |
% |
| 1953 |
% \begin{macrocode} |
| 1954 |
\def\bbdefNeTii#1 #2#3 #4 {\safedef{#1}##1 |
| 1955 |
{\name*{#1##1}\cc*#3#2\black*boxii{#4} }} |
| 1956 |
% \end{macrocode} |
| 1957 |
% |
| 1958 |
% \begin{macrocode} |
| 1959 |
\def\sbdef#1 #2#3 #4 {\safedef{#1}##1 |
| 1960 |
{\name*{#1##1}\cc*#3#2\sym*box{#4} }} |
| 1961 |
% \end{macrocode} |
| 1962 |
%^^A last update: Fri 03-13-1998 |
| 1963 |
% ^^A beschr p l1 l2 l3 |
| 1964 |
% |
| 1965 |
% ^^A\cc* |
| 1966 |
% ^^A\name* |
| 1967 |
% ^^A\**pin |
| 1968 |
% ^^A\ldd* -> innenbeschriftung |
| 1969 |
% |
| 1970 |
%</code> |
| 1971 |
%<+gate>\ProvidesFile{gate.def} |
| 1972 |
%<+gate>\freecirc |
| 1973 |
%<*gate> |
| 1974 |
% \begin{macrocode} |
| 1975 |
\def\g*iio#1 #2 #3 #4 #5 {\dimen4\*X*\dimen5\*Y* |
| 1976 |
\rud*{#1}\getc*0 |
| 1977 |
\stopos*\add*y\ic*\X*check\store*{\the\ru*pin}\rstpos* |
| 1978 |
\add*y{-\ic*}\store*{\the\ld*pin}\rstpos* |
| 1979 |
\add*x{.5\wd*}\store*:\add*x{.5\wd*}\X*check\store*{\the\m*pin}% |
| 1980 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi |
| 1981 |
\setbox\*bbox=\hbox{\ifpin\pinnumberfont |
| 1982 |
\dimen0\ic*\advance\dimen0\pinnum*spc |
| 1983 |
\raise\dimen0\rlap{\kern\pin*ind\hc*{#3}}% |
| 1984 |
\dimen0-\ic*\advance\dimen0\pinnum*spc |
| 1985 |
\raise\dimen0\rlap{\kern\pin*ind\hc*{#4}}% |
| 1986 |
\raise\pinnum*spc\rlap{\kern\wd*\kern-\pin*ind\hc*{#5}}\fi |
| 1987 |
\the\ldd*\box\box*}\put*box\reset*ifs |
| 1988 |
\*X*\dimen4\*Y*\dimen5} |
| 1989 |
% \end{macrocode} |
| 1990 |
% |
| 1991 |
% \begin{macrocode} |
| 1992 |
\def\g*io#1 #2 #3 #4 {\dimen4\*X*\dimen5\*Y* |
| 1993 |
\rud*{#1}\getc*0 |
| 1994 |
\store*{\the\ld*pin}% |
| 1995 |
\add*x{.5\wd*}\store*:\add*x{.5\wd*}\X*check\store*{\the\m*pin}% |
| 1996 |
\ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi |
| 1997 |
\setbox\*bbox=\hbox{\ifpin\pinnumberfont |
| 1998 |
\raise\pinnum*spc\rlap{\kern\pin*ind\hc*{#3}}% |
| 1999 |
\raise\pinnum*spc\rlap{\kern\wd*\kern-\pin*ind\hc*{#4}}\fi |
| 2000 |
\the\ldd*\box\box*}\put*box\reset*ifs |
| 2001 |
\*X*\dimen4\*Y*\dimen5} |
| 2002 |
% \end{macrocode} |
| 2003 |
% |
| 2004 |
% \begin{macrocode} |
| 2005 |
\def\gateIIO#1 #2#3 #4#5 #6 #7 {\expandafter |
| 2006 |
\def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{#4}% |
| 2007 |
\ld*pin{#5}\m*pin{#6}\ru*pin{#7}\cc*#3 #2\g*iio}} |
| 2008 |
% \end{macrocode} |
| 2009 |
% |
| 2010 |
% \begin{macrocode} |
| 2011 |
\def\ldd*gN#1{\raise\fontdimen10\c*fntb |
| 2012 |
\blap{\hc*{\kern\wd*\symfont\,#1}}% |
| 2013 |
\lower\dp* |
| 2014 |
\vtop{\kern\*spc\hc*{\labelfont\kern\wd*\the\rud*}}} |
| 2015 |
% \end{macrocode} |
| 2016 |
% |
| 2017 |
% \begin{macrocode} |
| 2018 |
\def\ldd*OV{\ac*{\kern.8\wd*\ctextfont\the\rud*}} |
| 2019 |
% \end{macrocode} |
| 2020 |
% |
| 2021 |
% \begin{macrocode} |
| 2022 |
\def\NgateIIO#1 #2#3 #4 {\expandafter |
| 2023 |
\def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{\ldd*gN{#4}}% |
| 2024 |
\ld*pin{I2}\m*pin{O}\ru*pin{I1}\cc*#3 #2\g*iio}} |
| 2025 |
% \end{macrocode} |
| 2026 |
% |
| 2027 |
% \begin{macrocode} |
| 2028 |
\def\gateIO#1 #2#3 #4#5 #6 {\expandafter |
| 2029 |
\def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{#4}% |
| 2030 |
\ld*pin{#4}\m*pin{#5}\cc*#3 #2\g*io}} |
| 2031 |
% \end{macrocode} |
| 2032 |
% |
| 2033 |
% \begin{macrocode} |
| 2034 |
\def\NgateIO#1 #2#3 #4 {\expandafter |
| 2035 |
\def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{\ldd*gN{#4}}% |
| 2036 |
\ld*pin{I}\m*pin{O}\cc*#3 #2\g*io}} |
| 2037 |
% \end{macrocode} |
| 2038 |
%</gate> |
| 2039 |
%<*code> |
| 2040 |
%^^A last update: Sat 06-13-2003 |
| 2041 |
%</code> |
| 2042 |
%<*doc> |
| 2043 |
\input cidoc |
| 2044 |
\freecirc |
| 2045 |
\hbox{\circuit0 \CIRCLogo \endcircuit\hskip3cm |
| 2046 |
\verb|\CIRCLogo|}\vskip5mm |
| 2047 |
%</doc> |
| 2048 |
%<*code,doc> |
| 2049 |
\cwdef wire {128\c*fnt} |
| 2050 |
%<+doc> {wire} |
| 2051 |
\cwdef dashed {120\c*fnt} |
| 2052 |
%<+doc> {dashed wire} |
| 2053 |
%<+doc>\cwwdef bundle {bundle} |
| 2054 |
%<+doc>\cwwdef wwire {double wire} |
| 2055 |
%<+doc>\textdef Utext {text with arrow} |
| 2056 |
%<+doc>\textdef centertext {centered text} |
| 2057 |
%</code,doc> |
| 2058 |
%<*basic> |
| 2059 |
\ProvidesFile{basic.def} |
| 2060 |
\freecirc |
| 2061 |
\def\GND#1 {\setbox\*bbox=\hbox{\c*fnt\char254}% |
| 2062 |
\check*min{\wd\*bbox}\check*max{\wd\*bbox}\put*box |
| 2063 |
\store*XY{GND#1}\store*XY{GND#1:}\reset*ifs} |
| 2064 |
\def\gnd#1 {\setbox\*bbox=\hbox{\c*fnt\char253}% |
| 2065 |
\check*min{\wd\*bbox}\check*max{\wd\*bbox}\put*box |
| 2066 |
\store*XY{gnd#1}\store*XY{gnd#1:}\reset*ifs} |
| 2067 |
\def\junction#1 {\setbox\*bbox=\hbox{\c*fnt\char255}\check*{\wd\*bbox}\check*X |
| 2068 |
\put*box\store*XY{.#1:}\store*XY{junction#1:}% |
| 2069 |
\store*XY{junction#1}\store*XY{.#1}\reset*ifs} |
| 2070 |
%</basic> |
| 2071 |
%<*basic,doc> |
| 2072 |
%<+doc>\optionline basic |
| 2073 |
%<+doc>\cdefo GND ground |
| 2074 |
%<+doc>\cdefo gnd ground |
| 2075 |
%<+doc>\cdefo . junction \par |
| 2076 |
\cdef R R \c*fntw 0 |
| 2077 |
%<+doc> {resistor} |
| 2078 |
\cdef Rus R \c*fntw 24 |
| 2079 |
%<+doc> {US resistor} |
| 2080 |
\cdefviii Rvar R \c*fntw 8 . S * |
| 2081 |
%<+doc> {variable resistor} |
| 2082 |
\cdefviii Rusvar R \c*fntw 32 . S * |
| 2083 |
%<+doc> {variable resistor} |
| 2084 |
\cdef C C \c*fntw 128 |
| 2085 |
%<+doc> {capacitor} |
| 2086 |
\cdef Cvar C \c*fntw 130 |
| 2087 |
%<+doc> {variable capacitor} |
| 2088 |
\cdefiv Cel C \c*fntw 136 - + |
| 2089 |
%<+doc> {electrolytic capacitor} |
| 2090 |
\cdefiv D D \c*fntd 0 K A |
| 2091 |
%<+doc> {diode} |
| 2092 |
\cdefiv ZD D \c*fntd 4 K A |
| 2093 |
%<+doc> {Zener diode} |
| 2094 |
\cdefiviv LED D \c*fntd 8 K A |
| 2095 |
%<+doc> {light emitting diode} |
| 2096 |
\cdefiv Dcap D \c*fntd 16 K A |
| 2097 |
%<+doc> {capacitance variation diode} |
| 2098 |
\cdefiv whatI I \c*fnt 248 d s |
| 2099 |
%<+doc> {current flow} |
| 2100 |
\cdefiv U U \c*fnt 16 + - |
| 2101 |
%<+doc> {voltage source} |
| 2102 |
\cdef varU U \c*fnt 44 |
| 2103 |
%<+doc> {voltage source, variant} |
| 2104 |
\cdef varI I \c*fnt 46 |
| 2105 |
%<+doc> {current source variant} |
| 2106 |
\cdefiv Uvar U \c*fnt 20 + - |
| 2107 |
%<+doc> {variable voltage source} |
| 2108 |
\cdef I I \c*fnt 12 |
| 2109 |
%<+doc> {current source} |
| 2110 |
\cdef Ivar I \c*fnt 14 |
| 2111 |
%<+doc> {variable current source} |
| 2112 |
\cdef V U {\def\add*cmds{\clr*acmds |
| 2113 |
\ac*{\symfont V}}\c*fnt}8 |
| 2114 |
%<+doc> {voltmeter} |
| 2115 |
\cdef A I {\def\add*cmds{\clr*acmds |
| 2116 |
\ac*{\symfont A}}\c*fnt}8 |
| 2117 |
%<+doc> {amperemeter} |
| 2118 |
\cdefiv L L \c*fnt 0 . * |
| 2119 |
%<+doc> {coil} |
| 2120 |
\cdef xtal Q \c*fnt 4 |
| 2121 |
%<+doc> {quartz crystal} |
| 2122 |
\cdef La La \c*fnt 6 |
| 2123 |
%<+doc> {incandescent lamp} % electric bulb |
| 2124 |
\cdef GasLa {} \c*fnt 40 |
| 2125 |
%<+doc> {gas lamp} |
| 2126 |
\cdef S S \c*fnt 24 |
| 2127 |
%<+doc> {switch} |
| 2128 |
\cdefviii SW S \c*fnt 32 o s c |
| 2129 |
%<+doc> {changeover switch} |
| 2130 |
\cdefivNL mconnection \c*fnt 232 o c |
| 2131 |
%<+doc> {connection (pointed)} |
| 2132 |
\cdefivNL connection \c*fnt 240 o c |
| 2133 |
%<+doc> {connection (round empty)} |
| 2134 |
\cdefivNL fconnection \c*fnt 244 o c |
| 2135 |
%<+doc> {connection (round full)} |
| 2136 |
\cdefiviv npnPH T \c*fntt 80 E C |
| 2137 |
%<+doc> {phototransistor} |
| 2138 |
\cdefviii npnEC T \c*fntt 0 E . C |
| 2139 |
%<+doc> {npn-transistor without base} |
| 2140 |
\cdefviii pnpEC T \c*fntt 8 E . C |
| 2141 |
%<+doc> {pnp-transistor without base} |
| 2142 |
\cdefviii npn T \c*fntt 16 E B C |
| 2143 |
%<+doc> {npn-transistor} |
| 2144 |
\cdefviii pnp T \c*fntt 24 E B C |
| 2145 |
%<+doc> {pnp-transistor} |
| 2146 |
\cdefviii nfet T \c*fntt 32 S G D |
| 2147 |
%<+doc> {n-channel field effect transistor} |
| 2148 |
\cdefviii pfet T \c*fntt 40 S G D |
| 2149 |
%<+doc> {p-channel field effect transistor} |
| 2150 |
\cdefviii nvmos T \c*fntt 48 S G D |
| 2151 |
%<+doc> {} |
| 2152 |
\cdefviii pvmos T \c*fntt 56 S G D |
| 2153 |
%<+doc> {} |
| 2154 |
\cdefviii namos T \c*fntt 64 S G D |
| 2155 |
%<+doc> {} |
| 2156 |
\cdefviii pamos T \c*fntt 72 S G D |
| 2157 |
%<+doc> {} |
| 2158 |
%<+basic>\protectcirc |
| 2159 |
%</basic,doc> |
| 2160 |
%<*gate,doc> |
| 2161 |
%<+doc>\pagebreak |
| 2162 |
%<+doc>\optionline gate |
| 2163 |
\gateIIO OV \c*fntb 255 \ldd*OV + O - |
| 2164 |
%<+doc> {operational amplifier} |
| 2165 |
\gateIIO ov \c*fntb 254 \ldd*OV - O + |
| 2166 |
%<+doc> {operational amplifier} |
| 2167 |
%<+doc> |
| 2168 |
\NgateIIO NAND \c*fntb 132 {$\&$} |
| 2169 |
%<+doc> {NAND-gate} |
| 2170 |
\NgateIIO AND \c*fntb 131 {$\&$} |
| 2171 |
%<+doc> {AND-gate} |
| 2172 |
\NgateIIO OR \c*fntb 131 {$\ge$1} |
| 2173 |
%<+doc> {OR-gate} |
| 2174 |
\NgateIIO NOR \c*fntb 132 {$\ge$1} |
| 2175 |
%<+doc> {NOR-gate} |
| 2176 |
\NgateIIO XOR \c*fntb 131 {$=$1} |
| 2177 |
%<+doc> {XOR-gate} |
| 2178 |
\NgateIIO XNOR \c*fntb 131 {$=$\vrule width 0pt height 1.5ex\,} |
| 2179 |
%<+doc> {XNOR-gate} |
| 2180 |
\NgateIO INV \c*fntb 130 {1\,} |
| 2181 |
%<+doc> {NOT-gate} |
| 2182 |
\NgateIO ST \c*fntb 128 {{\c*fnts\char7}} |
| 2183 |
%<+doc> {Schmitt trigger} |
| 2184 |
\NgateIO STINV \c*fntb 130 {{\c*fnts\char7}} |
| 2185 |
%<+doc> {inverted Schmitt trigger} |
| 2186 |
\NgateIO BUF \c*fntb 130 {{\c*fnts\char25}} |
| 2187 |
%<+doc> {buffer} |
| 2188 |
%<+gate>\protectcirc |
| 2189 |
%</gate,doc> |
| 2190 |
%<*oldgate,doc> |
| 2191 |
%<+doc>\optionline oldgate |
| 2192 |
%<+oldgate>\freecirc |
| 2193 |
\NgateIIO oldAND \c*fntb 133 {} |
| 2194 |
%<+doc> {old AND-gate} |
| 2195 |
\NgateIIO oldNAND \c*fntb 134 {} |
| 2196 |
%<+doc> {old NAND-gate} |
| 2197 |
\NgateIIO oldOR \c*fntb 135 {} |
| 2198 |
%<+doc> {old OR-gate} |
| 2199 |
\NgateIIO oldNOR \c*fntb 136 {} |
| 2200 |
%<+doc> {old NOR-gate} |
| 2201 |
\NgateIIO oldXOR \c*fntb 137 {} |
| 2202 |
%<+doc> {old XOR-gate} |
| 2203 |
%<+oldgate>\protectcirc |
| 2204 |
%</oldgate,doc> |
| 2205 |
%<*box,doc> |
| 2206 |
%<+box>\ProvidesFile{box.def} |
| 2207 |
%<+box>\freecirc |
| 2208 |
%<+doc>\optionline box |
| 2209 |
\bbdef BBa \c*fntb 252 |
| 2210 |
%<+doc> {black box analog} |
| 2211 |
\bbdef BBd \c*fntb 253 |
| 2212 |
%<+doc> {black box digital} |
| 2213 |
%<+doc>\pagebreak |
| 2214 |
\bbdefNeT oscillograph \c*fnt 142 {} |
| 2215 |
%<+doc> {oscillograph} |
| 2216 |
\bbdefNeT G \c*fntb 250 \vbox{\hc*{\symfont G}\kern1.5\*spc% |
| 2217 |
\hc*{\c*fnts\char16}} |
| 2218 |
%<+doc> {generator} |
| 2219 |
\bbdefNeT Gvar \c*fntb 250 \vbox{\hc*{\symfont G}\kern1.5\*spc% |
| 2220 |
\hc*{\c*fnts\char17}} |
| 2221 |
%<+doc> {generator, variable} |
| 2222 |
\bbdefNeT Impulse \c*fntb 250 \c*fnts\char13 |
| 2223 |
%<+doc> {generator, pulses} |
| 2224 |
\bbdefNeT Amp \c*fntb 250 \c*fnts\char24 |
| 2225 |
%<+doc> {amplifier} |
| 2226 |
\sbdef ACtoDC \c*fntb 251 \hbox{\raise.6\ht*\hbox{\c*fnts\char16}% |
| 2227 |
\lower.6\dp*\hbox{\symfont$=$}} |
| 2228 |
%<+doc> {AC to DC converter} |
| 2229 |
%<+box>\protectcirc |
| 2230 |
%</box,doc> |
| 2231 |
%<*doc> |
| 2232 |
\optionline ic |
| 2233 |
\Ccirc RSFF S {RS flip flop}{\Clpin{S}\Clpin{R}\Crpin{Q}\Crpin{NQ}} |
| 2234 |
\Ccirc NRSFF S {RS flip flop}{\Clpin{S}\Clpin{R}\Crpin{Q}\Crpin{NQ}} |
| 2235 |
\Ccirc DFF C {D flip flop}{\Clpin{C}\Clpin{D}\Crpin{Q}\Crpin{NQ}} |
| 2236 |
\Ccirc JKMSFF R {JK master slave flip flop}{\Clpin{S}\Clpin{J}\Clpin{C}\Clpin{K}\Clpin{R}\Crpin{Q}\Crpin{NQ}} |
| 2237 |
\Ccirc fff R {timer NE\,555}{\Clpin{IS}\Clpin{IT}\Clpin{R}\Crpin{OK}\Crpin{O}\Crpin{OD}} |
| 2238 |
\Ccirc NULL i+ {nullor}{\Clpin{i+}\Clpin{i-}\Crpin{o+}\Crpin{o-}} |
| 2239 |
%</doc> |
| 2240 |
%^^A last update: Fri 03-13-1998 |
| 2241 |
%<*optics> |
| 2242 |
% First lets define the header of module OPTICS. |
| 2243 |
% \begin{macrocode} |
| 2244 |
\ProvidesFile{optics.def} |
| 2245 |
\freecirc |
| 2246 |
% \end{macrocode} |
| 2247 |
% \begin{macrocode} |
| 2248 |
\safedef{Dtext}#1 from #2 to #3 {{ |
| 2249 |
\frompin{#2} \save*XY\frompin{#3} \diff*XY |
| 2250 |
\ifdim\**X=0pt |
| 2251 |
\dimen0\**Y |
| 2252 |
\ifdim\**Y<0pt\dimen0-\dimen0\fi |
| 2253 |
\c*fnts\setbox0=\hbox{\char9}\setbox1=\hbox{\char11}% |
| 2254 |
\c*fnt\setbox2=\hbox{\char132}\dp1=0pt |
| 2255 |
\advance\dimen0-\ht0\calc*u |
| 2256 |
\setbox\*bbox= |
| 2257 |
\vtop{\box1\loop\ifnum\cntb*>0\copy2 |
| 2258 |
\advance\cntb*-1\repeat\box0}% |
| 2259 |
\put*box\advance\*X*\*spc\advance\*Y*.5\**Y\put\vc*{\hbox{#1}} |
| 2260 |
\else |
| 2261 |
\ifdim\**Y=0pt |
| 2262 |
\advance\*X*\**X |
| 2263 |
\dimen0\**X |
| 2264 |
\ifdim\**X<0pt\dimen0-\dimen0\fi |
| 2265 |
\c*fnts\setbox0=\hbox{\char8}\setbox1=\hbox{\char10}% |
| 2266 |
\c*fnt\advance\dimen0-\wd0\calc*u |
| 2267 |
\setbox\*bbox=\hbox{\box0\loop\ifnum\cntb*>0\advance\cntb*-1 |
| 2268 |
\char129\repeat\box1}% |
| 2269 |
\put*box\advance\*X*-.5\**X\advance\*Y*\*spc\put\hc*{#1} |
| 2270 |
\else\errhelp{Only horizontal or vertical labeling allowed.}% |
| 2271 |
\errmessage{Bad points!}\fi\fi}} |
| 2272 |
% \end{macrocode} |
| 2273 |
% |
| 2274 |
% We need a new font for the optic symbols. |
| 2275 |
% \begin{macrocode} |
| 2276 |
\addCIRCfont cioptic |
| 2277 |
% \end{macrocode} |
| 2278 |
% |
| 2279 |
%</optics> |
| 2280 |
%<*optics,doc> |
| 2281 |
%<+doc>\optionline optics |
| 2282 |
%<+doc>\textdef Dtext {text measuring a length} |
| 2283 |
% \begin{macrocode} |
| 2284 |
\cwdef oa {128\CIRCcioptic} |
| 2285 |
%<+doc> {optical axis} |
| 2286 |
\cdef SLens L \CIRCcioptic 0 |
| 2287 |
%<+doc> {thin lens} |
| 2288 |
\cdefiv HSLens L \CIRCcioptic 2 | ) |
| 2289 |
%<+doc> {half thin lens} |
| 2290 |
\cdef BLens L \CIRCcioptic 6 |
| 2291 |
%<+doc> {thick lens} |
| 2292 |
\cdefiv HBLens L \CIRCcioptic 8 | ) |
| 2293 |
%<+doc> {half thick lens} |
| 2294 |
\cdef VLens L \CIRCcioptic 12 |
| 2295 |
%<+doc> {concave lens} |
| 2296 |
\cdefiv HVLens L \CIRCcioptic 14 | ( |
| 2297 |
%<+doc> {half concave lens} |
| 2298 |
\cdefviii Mirror M \CIRCcioptic 85 * . + |
| 2299 |
%<+doc> {mirror} |
| 2300 |
\cdefviii BSplit BS \CIRCcioptic 36 * . + |
| 2301 |
%<+doc> {beam splitter} |
| 2302 |
\cdef Polar P \CIRCcioptic 44 |
| 2303 |
%<+doc> {polarizer} |
| 2304 |
\cdef Pinhole {} \CIRCcioptic 46 |
| 2305 |
%<+doc> {pinhole} |
| 2306 |
\cdefiv Cam {} \CIRCcioptic 66 . | |
| 2307 |
%<+doc> {camera} |
| 2308 |
\cdef ScrL {} \CIRCcioptic 72 |
| 2309 |
%<+doc> {screen, look at the left side} |
| 2310 |
\cdef ScrR {} \CIRCcioptic 74 |
| 2311 |
%<+doc> {screen, look at the right side} |
| 2312 |
\cdef ScrBL {} \CIRCcioptic 76 |
| 2313 |
%<+doc> {screen, look behind the left side} |
| 2314 |
\cdef ScrBR {} \CIRCcioptic 78 |
| 2315 |
%<+doc> {screen, look behind the right side} |
| 2316 |
\cdef ScrTL {} \CIRCcioptic 80 |
| 2317 |
%<+doc> {screen, look trough the left side} |
| 2318 |
\cdef ScrTR {} \CIRCcioptic 82 |
| 2319 |
%<+doc> {screen, look trough the right side} |
| 2320 |
\cdef Laser {} \CIRCcioptic 160 |
| 2321 |
%<+doc> {laser} |
| 2322 |
\cdef PM {} \CIRCcioptic 162 |
| 2323 |
%<+doc> {photometer, -multiplyer, etc.} |
| 2324 |
\bbdefNeTii OM \CIRCcioptic 164 {} |
| 2325 |
%<+doc> {optical modulator} |
| 2326 |
%</optics,doc> |
| 2327 |
%<*optics> |
| 2328 |
\protectcirc |
| 2329 |
% \end{macrocode} |
| 2330 |
%</optics> |
| 2331 |
%^^A last update: Fri 03-13-1998 |
| 2332 |
%<*ciphysic> |
| 2333 |
\freecirc |
| 2334 |
\addCIRCfont ciphysic |
| 2335 |
%</ciphysic> |
| 2336 |
%<+doc>\optionline physics |
| 2337 |
%<*ciphysic,doc> |
| 2338 |
\cdef spring k \CIRCciphysic 0 |
| 2339 |
%<+doc> {spring} |
| 2340 |
\cdef lspring k \CIRCciphysic 2 |
| 2341 |
%<+doc> {long spring} |
| 2342 |
\cdef fdmass m \CIRCciphysic 4 |
| 2343 |
%<+doc> {mass with two forces; full drawn} |
| 2344 |
\cdef dmass m \CIRCciphysic 6 |
| 2345 |
%<+doc> {mass with two forces; outlined} |
| 2346 |
\cdefiv fmass m \CIRCciphysic 8 . * |
| 2347 |
%<+doc> {mass; full drawn} |
| 2348 |
\cdefiv mass m \CIRCciphysic 12 . * |
| 2349 |
%<+doc> {mass; outlined} |
| 2350 |
\cdefivNL wall \CIRCciphysic 16 . | |
| 2351 |
%<+doc> {wall} |
| 2352 |
\cdefivNL tile \CIRCciphysic 20 . * |
| 2353 |
%<+doc> {tile} |
| 2354 |
\cdef spinu S \CIRCciphysic 24 |
| 2355 |
%<+doc> {spin up} |
| 2356 |
\cdef spind S \CIRCciphysic 26 |
| 2357 |
%<+doc> {spin down} |
| 2358 |
%</ciphysic,doc> |
| 2359 |
%<*ciphysic> |
| 2360 |
\protectcirc |
| 2361 |
%</ciphysic> |
| 2362 |
%^^A last update: Fri 03-13-1998 |
| 2363 |
%<*doc> |
| 2364 |
\protectcirc |
| 2365 |
% \end{macrocode} |
| 2366 |
%</doc> |
| 2367 |
%<*code> |
| 2368 |
%^^A last update: Fri 03-13-1998 |
| 2369 |
% |
| 2370 |
% \begin{macrocode} |
| 2371 |
\def\line*r{\check*X\ifnum\cnta*=0\else\check*max{\dimen2}\ifxoutofgrid |
| 2372 |
\advance\dimen2-.5\fontdimen6\c*fnt\fi |
| 2373 |
\setbox\*bbox=\hbox{\ifxoutofgrid\else\char\cc*\fi\advance\cc*1% |
| 2374 |
\loop\ifnum\cnta*>1\char\cc* |
| 2375 |
\advance\cnta*-1\repeat}\put*box |
| 2376 |
\advance\*X*.5\dimen2\the\toks2\advance\*X*.5\dimen2 |
| 2377 |
\advance\cc*2\setbox\*bbox=\hbox{\char\cc*}\put*box\xoutofgridfalse\fi} |
| 2378 |
% \end{macrocode} |
| 2379 |
% |
| 2380 |
% \begin{macrocode} |
| 2381 |
\def\line*l{\advance\*X*-\dimen2 |
| 2382 |
\ifxoutofgrid\advance\*X*.5\fontdimen6\c*fnt\fi |
| 2383 |
\**X\*X*\line*r\*X*\**X} |
| 2384 |
% \end{macrocode} |
| 2385 |
% |
| 2386 |
% \begin{macrocode} |
| 2387 |
\def\line*u{\check*X\ifnum\cnta*=0\else\advance\cc*4\ifyoutofgrid |
| 2388 |
\advance\dimen2-.5\fontdimen6\c*fnt\fi |
| 2389 |
\setbox\box*=\hbox{\char\cc*}\advance\cc*-1% |
| 2390 |
\setbox\*bbox=\vbox{\loop\ifnum\cnta*>1\copy\box* |
| 2391 |
\advance\cnta*-1\repeat |
| 2392 |
\ifyoutofgrid\else\hbox{\char\cc*}\fi}\put*box |
| 2393 |
\advance\*Y*.5\dimen2\the\toks4\advance\*Y*.5\dimen2 |
| 2394 |
\advance\cc*2\setbox\*bbox=\vbox{\hbox{\char\cc*}}\put*box\youtofgridfalse\fi} |
| 2395 |
% \end{macrocode} |
| 2396 |
% |
| 2397 |
% \begin{macrocode} |
| 2398 |
\def\line*d{\advance\*Y*-\dimen2 |
| 2399 |
\ifyoutofgrid\advance\*Y*.5\fontdimen6\c*fnt\fi |
| 2400 |
\**Y\*Y*\line*u\*Y*\**Y} |
| 2401 |
% \end{macrocode} |
| 2402 |
% |
| 2403 |
% \begin{macrocode} |
| 2404 |
\def\test*xygrid{\dimen9\fontdimen6\c*fnt\count@\dimen9 |
| 2405 |
\cntb*\*X*\divide\cntb*\count@ |
| 2406 |
\dimen0\*X*\advance\dimen0-\cntb*\dimen9 |
| 2407 |
\advance\dimen9-.1pt |
| 2408 |
\ifdim\dimen0<0pt \dimen0-\dimen0 \fi |
| 2409 |
\ifdim\dimen0>0.1pt \ifdim\dimen0<\dimen9 \xoutofgridtrue\fi\fi |
| 2410 |
\cntb*\*Y*\divide\cntb*\count@ |
| 2411 |
\dimen0\*Y*\advance\dimen0-\cntb*\fontdimen6\c*fnt |
| 2412 |
\ifdim\dimen0<0pt \dimen0-\dimen0 \fi |
| 2413 |
\ifdim\dimen0>0.1pt \ifdim\dimen0<\dimen9 \youtofgridtrue\fi\fi} |
| 2414 |
% \end{macrocode} |
| 2415 |
% |
| 2416 |
% |
| 2417 |
% \begin{macrocode} |
| 2418 |
\def\bundle#1 #2 #3 {\cc*136\c*fnt\cnta*#2\dimen2=#2em |
| 2419 |
\toks2{\setbox\box*=\hbox{\char134}% |
| 2420 |
\setbox\*bbox=\rlap{\raise\ht\box* |
| 2421 |
\hc*{\labelfont#1}\unhbox\box*}\put*box}% |
| 2422 |
\toks4{\setbox\*bbox=\hbox{\char135\labelfont |
| 2423 |
\vc*{\hbox{#1}}}% |
| 2424 |
\check*max{\wd\*bbox}\put*box}% |
| 2425 |
\test*xygrid\csname line*#3\endcsname} |
| 2426 |
% \end{macrocode} |
| 2427 |
% |
| 2428 |
% \begin{macrocode} |
| 2429 |
\def\wwire#1 #2 #3 {\cc*112\c*fnt\cnta*#2\dimen2=#2em |
| 2430 |
\toks2{\setbox\*bbox=\rlap{\raise\*spc |
| 2431 |
\hc*{\labelfont#1}}\put*box}% |
| 2432 |
\toks4{\setbox\*bbox=\hbox{\kern\*spc\labelfont |
| 2433 |
\vc*{\hbox{#1}}}% |
| 2434 |
\check*max{\wd\*bbox}\put*box}% |
| 2435 |
\test*xygrid\csname line*#3\endcsname} |
| 2436 |
% \end{macrocode} |
| 2437 |
% |
| 2438 |
% \begin{macrocode} |
| 2439 |
\def\by#1 {\def\by*cmd{#1}} |
| 2440 |
\by{\wire} |
| 2441 |
% \end{macrocode} |
| 2442 |
% |
| 2443 |
% \begin{macrocode} |
| 2444 |
\def\calc*u{\cnta*\fontdimen6\c*fnt\advance\dimen0 .5\fontdimen6\c*fnt |
| 2445 |
\cntb*\dimen0\divide\cntb*\cnta*} |
| 2446 |
% \end{macrocode} |
| 2447 |
% |
| 2448 |
% \begin{macrocode} |
| 2449 |
\def\vtopin#1 {\save*XY\frompin{#1} \test*xygrid |
| 2450 |
\dimen0\**Y\advance\dimen0-\*Y*\restore*XY |
| 2451 |
\ifdim\dimen0<0pt\dimen0-\dimen0 |
| 2452 |
\calc*u\by*cmd {\cntb*} u |
| 2453 |
\else\calc*u\by*cmd {\cntb*} d \fi} |
| 2454 |
% \end{macrocode} |
| 2455 |
% |
| 2456 |
% \begin{macrocode} |
| 2457 |
\def\htopin#1 {\save*XY\frompin{#1} \test*xygrid |
| 2458 |
\dimen0\**X\advance\dimen0-\*X*\restore*XY |
| 2459 |
\ifdim\dimen0<0pt\dimen0-\dimen0 |
| 2460 |
\calc*u\by*cmd {\cntb*} r |
| 2461 |
\else\calc*u\by*cmd {\cntb*} l \fi} |
| 2462 |
% \end{macrocode} |
| 2463 |
%^^A last update: Fri 03-13-1998 |
| 2464 |
% \begin{macrocode} |
| 2465 |
\safedef{Utext}#1 from #2 to #3 {{% |
| 2466 |
\frompin{#2} \save*XY\frompin{#3} \diff*XY |
| 2467 |
\ifdim\**X=0pt |
| 2468 |
\setbox1=\hbox{\c*fnt\char132}% |
| 2469 |
\ifdim\**Y<0pt |
| 2470 |
\dimen0-\**Y |
| 2471 |
\setbox0=\hbox{\c*fnt\char'373}\advance\dimen0-\ht0\dp0=0pt |
| 2472 |
\calc*u |
| 2473 |
\setbox\*bbox= |
| 2474 |
\vtop to -\**Y{\vfill\box0\loop\ifnum\cntb*>2\copy1 |
| 2475 |
\advance\cntb*-1\repeat\vfill}% |
| 2476 |
\else |
| 2477 |
\dimen0\**Y |
| 2478 |
\setbox0=\hbox{\c*fnt\char'371}\advance\dimen0-\ht0\dp0=0pt |
| 2479 |
\calc*u |
| 2480 |
\setbox\*bbox= |
| 2481 |
\vbox to \**Y{\vfill\loop\ifnum\cntb*>2\copy1 |
| 2482 |
\advance\cntb*-1\repeat\box0\vfill}% |
| 2483 |
\fi |
| 2484 |
\put*box\advance\*X*\*spc\advance\*Y*.5\**Y\put\vc*{\hbox{#1}} |
| 2485 |
\else |
| 2486 |
\ifdim\**Y=0pt |
| 2487 |
\ifdim\**X<0pt |
| 2488 |
\dimen0-\**X |
| 2489 |
\setbox0=\hbox{\c*fnt\char'372}\advance\dimen0-\wd0 |
| 2490 |
\calc*u |
| 2491 |
\setbox\*bbox=\llap{\hbox to -\**X{\hfill\loop\ifnum\cntb*>2\char129 |
| 2492 |
\advance\cntb*-1\repeat\box0\hfill}}% |
| 2493 |
\else |
| 2494 |
\dimen0\**X |
| 2495 |
\setbox0=\hbox{\c*fnt\char'370}\advance\dimen0-\wd0 |
| 2496 |
\calc*u |
| 2497 |
\setbox\*bbox=\hbox to \**X{\hfill\box0\loop\ifnum\cntb*>2\char129 |
| 2498 |
\advance\cntb*-1\repeat\hfill}% |
| 2499 |
\fi |
| 2500 |
\put*box\advance\*X*.5\**X\advance\*Y*\*spc\put\hc*{#1} |
| 2501 |
\else\errhelp{Only horizontal or vertical labeling allowed.}% |
| 2502 |
\errmessage{Bad points!}\fi\fi}} |
| 2503 |
% \end{macrocode} |
| 2504 |
% |
| 2505 |
% \begin{macrocode} |
| 2506 |
\safedef{centertext}#1 from #2 to #3 {% |
| 2507 |
{\frompin{#2} \save*XY\frompin{#3} \diff*XY |
| 2508 |
\ifdim\**X=0pt |
| 2509 |
\advance\*Y*.5\**Y\put\vc*{\hbox{#1}} |
| 2510 |
\else |
| 2511 |
\ifdim\**Y=0pt |
| 2512 |
\advance\*X*.5\**X\put\hc*{#1} |
| 2513 |
\else\errhelp{Only horizontal or vertical labeling allowed.}% |
| 2514 |
\errmessage{Bad points}\fi\fi}} |
| 2515 |
% \end{macrocode} |
| 2516 |
%^^A last update: Fri 03-13-1998 |
| 2517 |
% Die absolute Positionierung in einem Raster von 7\,pt wird durch |
| 2518 |
% das direkte Setzen der aktuellen Zeichenposition realisiert. |
| 2519 |
% Die x-, und y-Position bezieht sich dabei auf den Punkt der |
| 2520 |
% ersten Zeichenoperation, dem die Werte $(0,0)$ zugeordnet wurden. |
| 2521 |
% \begin{macrocode} |
| 2522 |
\def\from#1 #2 {\c*fnt\*X*=#1em\*Y*=#2em\check*X} |
| 2523 |
\let\at\from |
| 2524 |
% \end{macrocode} |
| 2525 |
% |
| 2526 |
% \begin{macrocode} |
| 2527 |
\def\moverel#1 #2 {\c*fnt\advance\*X* #1em\advance\*Y* #2em\check*X} |
| 2528 |
\let\shift\moverel |
| 2529 |
% \begin{macrocode} |
| 2530 |
% |
| 2531 |
% \begin{macrocode} |
| 2532 |
\safedef{put}#1 {\setbox\*bbox=\hbox{\ctextfont#1}\check*X |
| 2533 |
\check*max{\wd\*bbox}\put*box} |
| 2534 |
|
| 2535 |
% \end{macrocode} |
| 2536 |
\safedef{P}#1 {\store*XY{P#1}\check*X\reset*ifs} |
| 2537 |
% |
| 2538 |
\safedefs{_} #1 #2 {\c*fnt\cnta*=0\csname CiRC#2\endcsname\relax |
| 2539 |
\ifnum\cnta*=0\relax |
| 2540 |
\PackageError{CIRC}{Bad direction}{Please check spelling}\fi |
| 2541 |
\ifcase \cnta* \relax |
| 2542 |
\or \advance\*X* -#1em |
| 2543 |
\or \advance\*X* #1em |
| 2544 |
\or \advance\*Y* #1em |
| 2545 |
\or \advance\*Y* -#1em |
| 2546 |
\or \advance\*X* -#1em |
| 2547 |
\or \advance\*X* #1em |
| 2548 |
\or \advance\*Y* #1em |
| 2549 |
\or \advance\*Y* -#1em \fi} |
| 2550 |
%^^A last update: Fri 03-13-1998 |
| 2551 |
% \begin{macrocode} |
| 2552 |
\def\nl{\lab*false} |
| 2553 |
\def\nv{\val*false} |
| 2554 |
\def\cc{\cc*true} |
| 2555 |
\def\clr*acmds{\global\let\add*cmds\relax} |
| 2556 |
% \end{macrocode} |
| 2557 |
%^^A last update: Fri 03-13-1998 |
| 2558 |
% \begin{macrocode} |
| 2559 |
\def\*fdef#1 {\expandafter\xdef\csname#1\endcsname{\the\toks0}} |
| 2560 |
% \end{macrocode} |
| 2561 |
% |
| 2562 |
% \begin{macrocode} |
| 2563 |
\newtoks\CIRCfinit |
| 2564 |
\CIRCfinit={} |
| 2565 |
% \end{macrocode} |
| 2566 |
% |
| 2567 |
% \begin{macrocode} |
| 2568 |
\def\addCIRCfont#1 {\expandafter\CIRCfinit=\expandafter{\the\CIRCfinit |
| 2569 |
\expandafter\font\csname CIRC#1\endcsname=#1 scaled \*mag}} |
| 2570 |
% \end{macrocode} |
| 2571 |
% \begin{macrocode} |
| 2572 |
\def\CIusefont#1#2#3{\fontencoding{\encodingdefault}\fontfamily{#1}% |
| 2573 |
\fontseries{\seriesdefault}\fontshape{\shapedefault}% |
| 2574 |
\fontsize{#2}{#3}\selectfont} |
| 2575 |
\def\circuit#1 {\PackageInfo{CIRC}{`\CIRCredef' redefined}% |
| 2576 |
\let\add*cmds\relax |
| 2577 |
\*Ilist{}\*Olist{}\check*true |
| 2578 |
\xdef\*mag{\magstep{#1}}% |
| 2579 |
\global\X*max-\maxdimen |
| 2580 |
\global\X*min\maxdimen |
| 2581 |
\ifcase#1 % magstep 0 |
| 2582 |
\toks0={\CIusefont{\rmdefault}{10}{12pt}}% |
| 2583 |
\*fdef outlabelfont |
| 2584 |
\*fdef labelfont |
| 2585 |
\*fdef ctextfont |
| 2586 |
\toks0={\CIusefont{\sfdefault}{10}{12pt}}% |
| 2587 |
\*fdef symfont |
| 2588 |
\toks0={\CIusefont{\rmdefault}{7}{8pt}}% |
| 2589 |
\*fdef pinnumberfont |
| 2590 |
\*fdef functionfont |
| 2591 |
\toks0={\CIusefont{\rmdefault}{8}{9.5pt}}% |
| 2592 |
\*fdef circlabelfont |
| 2593 |
\toks0={\CIusefont{\sfdefault}{8}{9.5pt}}% |
| 2594 |
\*fdef inlabelfont |
| 2595 |
\or % magstep 1 |
| 2596 |
\toks0={\CIusefont{\rmdefault}{12}{14pt}}% |
| 2597 |
\*fdef outlabelfont |
| 2598 |
\*fdef labelfont |
| 2599 |
\*fdef ctextfont |
| 2600 |
\toks0={\CIusefont{\sfdefault}{12}{14pt}}% |
| 2601 |
\*fdef symfont |
| 2602 |
\toks0={\CIusefont{\rmdefault}{8}{9.5pt}}% |
| 2603 |
\*fdef pinnumberfont |
| 2604 |
\toks0={\CIusefont{\rmdefault}{9}{11pt}}% |
| 2605 |
\*fdef functionfont |
| 2606 |
\*fdef circlabelfont |
| 2607 |
\toks0={\CIusefont{\sfdefault}{9}{11pt}}% |
| 2608 |
\*fdef inlabelfont |
| 2609 |
\or % magstep 2 |
| 2610 |
\toks0={\CIusefont{\rmdefault}{14.4}{18pt}}% |
| 2611 |
\*fdef outlabelfont |
| 2612 |
\*fdef labelfont |
| 2613 |
\*fdef ctextfont |
| 2614 |
\toks0={\CIusefont{\sfdefault}{14.4}{18pt}}% |
| 2615 |
\*fdef symfont |
| 2616 |
\toks0={\CIusefont{\rmdefault}{9}{11pt}}% |
| 2617 |
\*fdef pinnumberfont |
| 2618 |
\toks0={\CIusefont{\rmdefault}{10}{12pt}}% |
| 2619 |
\*fdef functionfont |
| 2620 |
\*fdef circlabelfont |
| 2621 |
\toks0={\CIusefont{\sfdefault}{10}{12pt}}% |
| 2622 |
\*fdef inlabelfont |
| 2623 |
\or % magstep 3 |
| 2624 |
\toks0={\CIusefont{\rmdefault}{17.28}{22pt}}% |
| 2625 |
\*fdef outlabelfont |
| 2626 |
\*fdef labelfont |
| 2627 |
\*fdef ctextfont |
| 2628 |
\toks0={\CIusefont{\sfdefault}{17.28}{22pt}}% |
| 2629 |
\*fdef symfont |
| 2630 |
\toks0={\CIusefont{\sfdefault}{10}{12pt}}% |
| 2631 |
\*fdef pinnumberfont |
| 2632 |
\toks0={\CIusefont{\rmdefault}{12}{14pt}}% |
| 2633 |
\*fdef functionfont |
| 2634 |
\*fdef circlabelfont |
| 2635 |
\toks0={\CIusefont{\sfdefault}{12}{14pt}}% |
| 2636 |
\*fdef inlabelfont |
| 2637 |
\or % magstep 4 |
| 2638 |
\toks0={\CIusefont{\rmdefault}{20.74}{25pt}}% |
| 2639 |
\*fdef outlabelfont |
| 2640 |
\*fdef labelfont |
| 2641 |
\*fdef ctextfont |
| 2642 |
\toks0={\CIusefont{\sfdefault}{20.74}{25pt}}% |
| 2643 |
\*fdef symfont |
| 2644 |
\toks0={\CIusefont{\rmdefault}{12}{14pt}}% |
| 2645 |
\*fdef pinnumberfont |
| 2646 |
\toks0={\CIusefont{\rmdefault}{14.4}{18pt}}% |
| 2647 |
\*fdef functionfont |
| 2648 |
\*fdef circlabelfont |
| 2649 |
\toks0={\CIusefont{\sfdefault}{14.4}{18pt}}% |
| 2650 |
\*fdef inlabelfont |
| 2651 |
\else\errhelp{0 ... 4 expected.}\errmessage{Bad magnification!}\fi |
| 2652 |
% |
| 2653 |
{\outlabelfont |
| 2654 |
\global\*spc 0.4em}% |
| 2655 |
% |
| 2656 |
\font\c*fnt=cirest scaled \*mag |
| 2657 |
\font\c*fntb=cicirc scaled \*mag |
| 2658 |
\font\c*fntd=cidiod scaled \*mag |
| 2659 |
\font\c*fntt=cibimos scaled \*mag |
| 2660 |
\font\c*fntw=ciwidko scaled \*mag |
| 2661 |
\font\c*fnts=cisym scaled \*mag |
| 2662 |
% |
| 2663 |
\outerspace1mm |
| 2664 |
\pinnum*spc.7mm |
| 2665 |
\pin*ind\fontdimen12\c*fntb |
| 2666 |
\pin*spc\fontdimen13\c*fntb |
| 2667 |
\io*ind\fontdimen14\c*fntb |
| 2668 |
\mid*ind\fontdimen16\c*fntb |
| 2669 |
\X*min\maxdimen |
| 2670 |
\X*max-\maxdimen |
| 2671 |
% |
| 2672 |
\the\CIRCfinit |
| 2673 |
\begingroup |
| 2674 |
% |
| 2675 |
\the\rmacros |
| 2676 |
\let\.\junction |
| 2677 |
\def\- ##1 ##2 {\wire##1 ##2 }% |
| 2678 |
\def\= ##1 ##2 ##3 {\bundle##1 ##2 ##3 }% |
| 2679 |
\def\<{\ld*true}% |
| 2680 |
% |
| 2681 |
\parindent0pt |
| 2682 |
\offinterlineskip\setbox\*bbox=\hbox\bgroup\at 0 0 } |
| 2683 |
% \end{macrocode} |
| 2684 |
% |
| 2685 |
% \begin{macrocode} |
| 2686 |
\def\endcircuit{\egroup\leavevmode |
| 2687 |
\hbox{\kern-\X*min\unhbox\*bbox\kern\X*max}\endgroup |
| 2688 |
\PackageInfo{CIRC}{`\CIRCredef' restored}} |
| 2689 |
% \end{macrocode} |
| 2690 |
%^^A last update: Fri 03-13-1998 |
| 2691 |
% |
| 2692 |
\safedef{fallingEdge}{{\c*fnts\char3}} |
| 2693 |
\safedef{raisingEdge}{{\c*fnts\char2}} |
| 2694 |
\safedef{spike}{{\c*fnts\char4}} |
| 2695 |
\safedef{ispike}{{\c*fnts\char12}} |
| 2696 |
\safedef{squarePulse}{{\c*fnts\char1}} |
| 2697 |
\safedef{squarePulses}{{\c*fnts\char5}} |
| 2698 |
\safedef{sawtoothPuls}{{\c*fnt\char6}} |
| 2699 |
% |
| 2700 |
%^^A last update: Fri 03-13-1998 |
| 2701 |
% The last thing we define is the logo of CIRC. |
| 2702 |
% This pretty small grey elephant was choosen and then digitized as a |
| 2703 |
% result of a discussion about the incomming of new symbols into |
| 2704 |
% CIRC. Idea by Andreas Tille. |
| 2705 |
% \begin{macrocode} |
| 2706 |
\def\CIRCLogo{\c*fnt\cc*0\getc*252 \check*max{.5\wd*}\check*min{.5\wd*}% |
| 2707 |
\setbox\*bbox=\hbox to \wd*{\hss\lower\ht*\hbox to 0pt{\hss |
| 2708 |
\symfont\raise1.5ex\rlap{\kern1ex CIRC}\box\box*}\hss}\put*box\reset*ifs} |
| 2709 |
% \end{macrocode} |
| 2710 |
%^^A last update: Fri 03-13-1998 |
| 2711 |
% Alle internen Buchstaben werden wieder auf ihren vormaligen |
| 2712 |
% Kategoriekode gesetzt. |
| 2713 |
% \begin{macrocode} |
| 2714 |
\protectcirc |
| 2715 |
% \end{macrocode} |
| 2716 |
% Now we are ready to process all options of CIRC. |
| 2717 |
% That means to load all modules. |
| 2718 |
% \begin{macrocode} |
| 2719 |
\ProcessOptions |
| 2720 |
% \end{macrocode} |
| 2721 |
%</code> |
| 2722 |
%^^A last update: Fri 03-13-1998 |
| 2723 |
%<*ic> |
| 2724 |
% \begin{macrocode} |
| 2725 |
\ProvidesFile{ic.def} |
| 2726 |
% \end{macrocode} |
| 2727 |
% \begin{macrocode} |
| 2728 |
\freecirc |
| 2729 |
% \end{macrocode} |
| 2730 |
% |
| 2731 |
% \begin{macrocode} |
| 2732 |
\def\**[#1 #2 #3 #4 {\cc*\cnta*\advance\cc*32 \advance\cc*#1 |
| 2733 |
\Cstore*\*Ilist{#2}\Cadd*\*Ilist |
| 2734 |
\rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi |
| 2735 |
\kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}\char\cc* |
| 2736 |
\cc*\cnta*\advance\cc*97\char\cc*} |
| 2737 |
% \end{macrocode} |
| 2738 |
% |
| 2739 |
% \begin{macrocode} |
| 2740 |
\def\**]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*48 \advance\cc*#1 |
| 2741 |
\Cstore*\*Olist{#2}\Cadd*\*Olist |
| 2742 |
\rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind |
| 2743 |
\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*} |
| 2744 |
% \end{macrocode} |
| 2745 |
% |
| 2746 |
% \begin{macrocode} |
| 2747 |
\def\*F[#1 #2 #3 #4 #5 {\cc*\cnta*\advance\cc*#1 |
| 2748 |
\X*check\Cstore*\*Ilist{#2}\Cadd*\*Ilist |
| 2749 |
\rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi |
| 2750 |
\kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}% |
| 2751 |
\rlap{\kern\io*ind\kern\mid*ind |
| 2752 |
\blap{\kern0pt\hc*{\functionfont{#5}}}}\char\cc* |
| 2753 |
\cc*\cnta*\advance\cc*96\char\cc*} |
| 2754 |
% \end{macrocode} |
| 2755 |
% |
| 2756 |
% \begin{macrocode} |
| 2757 |
\def\*F]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*16 \advance\cc*#1 |
| 2758 |
\LX*check\*Olist\Cstore*\*Olist{#2}\Cadd*\*Olist |
| 2759 |
\rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind |
| 2760 |
\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*} |
| 2761 |
% \end{macrocode} |
| 2762 |
% |
| 2763 |
% \begin{macrocode} |
| 2764 |
\def\*L[#1 #2 #3 #4 #5 {\cc*\cnta*\advance\cc*64 \advance\cc*#1 |
| 2765 |
\Cstore*\*Ilist{#2}\Cadd*\*Ilist |
| 2766 |
\rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi |
| 2767 |
\kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}% |
| 2768 |
\rlap{\iflab*\kern\io*ind\kern\mid*ind |
| 2769 |
\vtop{\kern\fontdimen17\c*fntb\kern\outerspace |
| 2770 |
\hc*{\circlabelfont{#5}}}\fi}\char\cc* |
| 2771 |
\cc*\cnta*\advance\cc*98\char\cc*} |
| 2772 |
% \end{macrocode} |
| 2773 |
% |
| 2774 |
% \begin{macrocode} |
| 2775 |
\def\*L]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*80 \advance\cc*#1 |
| 2776 |
\Cstore*\*Olist{#2}\Cadd*\*Olist |
| 2777 |
\rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind |
| 2778 |
\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*} |
| 2779 |
% \end{macrocode} |
| 2780 |
% |
| 2781 |
% \begin{macrocode} |
| 2782 |
\def\*H#1 {\cc*\cnta*\X*check\Cadd*\*Ilist |
| 2783 |
\rlap{\kern\io*ind\kern\mid*ind\blap{\kern-\*spc\labelfont\hc*{#1\ }}}% |
| 2784 |
\char\cc*\cc*\cnta*\advance\cc*96\char\cc*\cc*\cnta*\advance\cc*16 |
| 2785 |
\LX*check\*Olist\Cadd*\*Olist\char\cc*} |
| 2786 |
% \end{macrocode} |
| 2787 |
% |
| 2788 |
% \begin{macrocode} |
| 2789 |
\def\C*init{\dimen4\*X*\dimen5\*Y* |
| 2790 |
\setbox\*bbox=\vtop\bgroup\c*fntb\cnta*=0 \ignorespaces} |
| 2791 |
% \end{macrocode} |
| 2792 |
% |
| 2793 |
% |
| 2794 |
% \begin{macrocode} |
| 2795 |
\def\C*exit#1{\egroup\shift*IOlist{#1}\put*box\*X*\dimen4\*Y*\dimen5} |
| 2796 |
% \end{macrocode} |
| 2797 |
% |
| 2798 |
% \begin{macrocode} |
| 2799 |
\def\*o#1{$\overline{\hbox{#1}}$} |
| 2800 |
% \end{macrocode} |
| 2801 |
% |
| 2802 |
% \begin{macrocode} |
| 2803 |
\def\*|#1| {\hbox{#1}} |
| 2804 |
% \end{macrocode} |
| 2805 |
% |
| 2806 |
% \begin{macrocode} |
| 2807 |
\def\JKMSFF#1 #2 #3 #4 {\name*{JKMSFF#1}\C*init |
| 2808 |
\*|\*F[2 S {} S {} \*F]0 . {} {} | |
| 2809 |
\*|\**[1 J {} 1J \**]1 Q $\neg$ {} | |
| 2810 |
\*|\**[3 C {} C1 \**]0 . {} {} | |
| 2811 |
\*|\**[1 K {} 1K \**]2 NQ $\neg$ {} | |
| 2812 |
\*|\*L[2 R {} R {#2} \*L]0 . {} {} | |
| 2813 |
\C*exit{#3}} |
| 2814 |
% \end{macrocode} |
| 2815 |
% \begin{macrocode} |
| 2816 |
\def\DFF#1 #2 #3 #4 {\name*{DFF#1}\C*init |
| 2817 |
\*|\*F[1 D {} 1D {} \*F]1 Q {} {} | |
| 2818 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2819 |
\*|\*L[3 C {} C1 {#2} \*L]2 NQ {} {} | |
| 2820 |
\C*exit{#3}} |
| 2821 |
% \end{macrocode} |
| 2822 |
% \begin{macrocode} |
| 2823 |
\def\RSFF#1 #2 #3 #4 {\name*{RSFF#1}\C*init |
| 2824 |
\*|\*F[1 R {} R {} \*F]1 Q {} {} | |
| 2825 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2826 |
\*|\*L[1 S {} S {#2} \*L]2 NQ {} {} | |
| 2827 |
\C*exit{#3}} |
| 2828 |
% \end{macrocode} |
| 2829 |
% \begin{macrocode} |
| 2830 |
\def\NRSFF#1 #2 #3 #4 {\name*{NRSFF#1}\C*init |
| 2831 |
\*|\*F[2 R {} R {} \*F]1 Q {} {} | |
| 2832 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2833 |
\*|\*L[2 S {} S {#2} \*L]2 NQ {} {} | |
| 2834 |
\C*exit{#3}} |
| 2835 |
% \end{macrocode} |
| 2836 |
% |
| 2837 |
% \begin{macrocode} |
| 2838 |
\def\fff#1 #2 #3 #4 {\name*{fff#1}\C*init |
| 2839 |
\*|\*F[1 IS {6} IS { } \*F]1 OK OK 5 | |
| 2840 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2841 |
\*|\**[1 IT {2} IT \**]1 O O 3 | |
| 2842 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2843 |
\*|\*L[2 R {4} R {#2} \*L]1 OD OD 7 | |
| 2844 |
\C*exit{#3}} |
| 2845 |
% \end{macrocode} |
| 2846 |
% \begin{macrocode} |
| 2847 |
\def\NULL#1 #2 #3 #4 {\name*{NULL#1}\C*init |
| 2848 |
\*|\*H{$\vcenter{\hbox{\c*fnts\char25}}\ \infty$} | |
| 2849 |
\*|\**[1 i+ {} + \**]1 o+ + {} | |
| 2850 |
\*|\**[0 . {} {} \**]0 . {} {} | |
| 2851 |
\*|\*L[1 i- {} $-$ {#2} \*L]1 o- $-$ {} | |
| 2852 |
\C*exit{#3}} |
| 2853 |
% \end{macrocode} |
| 2854 |
% \begin{macrocode} |
| 2855 |
\protectcirc |
| 2856 |
% \end{macrocode} |
| 2857 |
%</ic> |
| 2858 |
%^^A last update: Fri 03-13-1998 |
| 2859 |
%<*ciphysicmf> |
| 2860 |
font_identifier:="ciphysic"; |
| 2861 |
|
| 2862 |
string optionname; optionname:="physics"; |
| 2863 |
|
| 2864 |
input defcirc.mf; |
| 2865 |
|
| 2866 |
|
| 2867 |
%% SPRING |
| 2868 |
|
| 2869 |
spring_lt#= 5CIu#; |
| 2870 |
lspring_lt#= 7CIu#; |
| 2871 |
spring_th#= 1CIu#; |
| 2872 |
define_whole_pixels(lspring_lt,spring_lt,spring_th); |
| 2873 |
spring_gap= .6CIu; |
| 2874 |
spring_n=11; |
| 2875 |
spring_swd=(spring_lt-2spring_gap)/spring_n; |
| 2876 |
lspring_swd=(lspring_lt-2spring_gap)/spring_n; |
| 2877 |
|
| 2878 |
twopinchar("spring")("k")("spring") |
| 2879 |
(spring_lt#, .5spring_th#, .5spring_th#) |
| 2880 |
( pickup pensquare scaled normalline; |
| 2881 |
z0=(0,0); |
| 2882 |
shiftpoint:=z0+(spring_lt,0); |
| 2883 |
z1=z0+(spring_gap,0); |
| 2884 |
draw z0--z1; |
| 2885 |
pickup pencircle scaled normalline; |
| 2886 |
for i:=1 upto spring_n: |
| 2887 |
x[i+1]=x[i]+spring_swd; y[i+1]=y[0]+if odd(i): 1 else: -1 fi*.5spring_th; |
| 2888 |
if i=spring_n: y[i+1]:=y[i+1]-if odd(i): 1 else: -1 fi*.5spring_th fi; |
| 2889 |
draw z[i]--z[i+1]; |
| 2890 |
endfor; |
| 2891 |
z[spring_n+2]=z0+(spring_lt,0); |
| 2892 |
pickup pensquare scaled normalline; |
| 2893 |
z[spring_n+2]=z0+(spring_lt,0); |
| 2894 |
draw z[spring_n+1]--z[spring_n+2]; |
| 2895 |
) |
| 2896 |
|
| 2897 |
twopinchar("lspring")("k")("long spring") |
| 2898 |
(lspring_lt#, .5spring_th#, .5spring_th#) |
| 2899 |
( pickup pensquare scaled normalline; |
| 2900 |
z0=(0,0); |
| 2901 |
shiftpoint:=z0+(lspring_lt,0); |
| 2902 |
z1=z0+(spring_gap,0); |
| 2903 |
draw z0--z1; |
| 2904 |
pickup pencircle scaled normalline; |
| 2905 |
for i:=1 upto spring_n: |
| 2906 |
x[i+1]=x[i]+lspring_swd; y[i+1]=y[0]+if odd(i): 1 else: -1 fi*.5spring_th; |
| 2907 |
if i=spring_n: y[i+1]:=y[i+1]-if odd(i): 1 else: -1 fi*.5spring_th fi; |
| 2908 |
draw z[i]--z[i+1]; |
| 2909 |
endfor; |
| 2910 |
z[spring_n+2]=z0+(lspring_lt,0); |
| 2911 |
pickup pensquare scaled normalline; |
| 2912 |
draw z[spring_n+1]--z[spring_n+2]; |
| 2913 |
) |
| 2914 |
|
| 2915 |
%% MASS single/double |
| 2916 |
|
| 2917 |
dmass_lt#= 2CIu#; |
| 2918 |
mass_r#= 1.5CIu#; |
| 2919 |
define_whole_pixels(dmass_lt,mass_r); |
| 2920 |
|
| 2921 |
twopinchar("fdmass")("m")("mass with two forces; full drawn") |
| 2922 |
(dmass_lt#, .5mass_r#, .5mass_r#) |
| 2923 |
( pickup pensquare scaled normalline; |
| 2924 |
z0=(0,0); |
| 2925 |
z1=z0+(dmass_lt,0); |
| 2926 |
shiftpoint:=z1; |
| 2927 |
draw z0--z1; |
| 2928 |
z2=.5[z0,z1]; |
| 2929 |
pickup pencircle scaled mass_r; |
| 2930 |
drawdot z2; |
| 2931 |
) |
| 2932 |
|
| 2933 |
twopinchar("dmass")("m")("mass with two forces; outlined") |
| 2934 |
(dmass_lt#, .5mass_r#, .5mass_r#) |
| 2935 |
( pickup pensquare scaled normalline; |
| 2936 |
z0=(0,0); |
| 2937 |
z1=z0+(.5(dmass_lt-mass_r),0); |
| 2938 |
draw z0--z1; |
| 2939 |
z3=z0+(dmass_lt,0); |
| 2940 |
shiftpoint:=z3; |
| 2941 |
z4=z3-(.5(dmass_lt-mass_r),0); |
| 2942 |
draw z3--z4; |
| 2943 |
z2=.5[z0,z3]; |
| 2944 |
pickup pencircle scaled normalline; |
| 2945 |
draw fullcircle scaled mass_r shifted z2; |
| 2946 |
) |
| 2947 |
|
| 2948 |
twopincharfour("fmass")("m")(".")("*")("mass; full drawn") |
| 2949 |
(dmass_lt#, .5mass_r#, .5mass_r#) |
| 2950 |
( pickup pensquare scaled normalline; |
| 2951 |
z0=(0,0); |
| 2952 |
z1=z0+(dmass_lt,0); |
| 2953 |
z2=.5[z0,z1]; |
| 2954 |
draw z0--z2; |
| 2955 |
pickup pencircle scaled mass_r; |
| 2956 |
drawdot z2; |
| 2957 |
|
| 2958 |
shiftpoint:=z1; |
| 2959 |
) |
| 2960 |
|
| 2961 |
twopincharfour("mass")("m")(".")("*")("mass; outlined") |
| 2962 |
(dmass_lt#, .5mass_r#, .5mass_r#) |
| 2963 |
( pickup pensquare scaled normalline; |
| 2964 |
z0=(0,0); |
| 2965 |
z1=z0+(.5(dmass_lt-mass_r),0); |
| 2966 |
draw z0--z1; |
| 2967 |
z3=z0+(dmass_lt,0); |
| 2968 |
z2=.5[z0,z3]; |
| 2969 |
pickup pencircle scaled normalline; |
| 2970 |
draw fullcircle scaled mass_r shifted z2; |
| 2971 |
|
| 2972 |
shiftpoint:=z3; |
| 2973 |
) |
| 2974 |
|
| 2975 |
%% WALL |
| 2976 |
|
| 2977 |
wall_lt#= 1.5CIu#; |
| 2978 |
wall_ht#= 2.5CIu#; |
| 2979 |
define_whole_pixels(wall_ht, wall_lt); |
| 2980 |
wall_f=1/3; |
| 2981 |
wall_n=6; |
| 2982 |
wall_alpha=40; |
| 2983 |
|
| 2984 |
twopincharfour("wall")("{}")(".")("|")("wall") |
| 2985 |
(wall_lt#,.5wall_ht# |
| 2986 |
+wall_lt#*(1-wall_f)*sind(wall_alpha),.5wall_ht#) |
| 2987 |
( pickup pensquare scaled normalline; |
| 2988 |
z0=(0,0); |
| 2989 |
z1=z0+(wall_f*wall_lt,0); |
| 2990 |
draw z0--z1; |
| 2991 |
z1=.5[z2,z3]; y3-y2=wall_ht; x3=x2; |
| 2992 |
pickup pensquare scaled verythickline; |
| 2993 |
draw z2--z3; |
| 2994 |
path a; |
| 2995 |
a=(0,0)--(1-wall_f)*wall_lt*dir(wall_alpha); |
| 2996 |
pickup pencircle scaled normalline; |
| 2997 |
for i:=0 upto wall_n: draw a shifted (i/wall_n)[z2,z3]; endfor |
| 2998 |
|
| 2999 |
shiftpoint:=z0+(wall_lt,0); |
| 3000 |
) |
| 3001 |
|
| 3002 |
tile_lt#= 2CIu#; |
| 3003 |
tile_ht#= .4CIu#; |
| 3004 |
tile_f=0.1; |
| 3005 |
|
| 3006 |
define_whole_pixels(tile_lt,tile_ht); |
| 3007 |
|
| 3008 |
twopincharfour("tile")("{}")(".")("*")("tile") |
| 3009 |
(wall_lt#,.5tile_ht#,.5tile_ht#) |
| 3010 |
( pickup pensquare scaled normalline; |
| 3011 |
z0=(0,0); |
| 3012 |
z1=z0+(tile_lt,0); |
| 3013 |
z2=tile_f[z0,z1]; |
| 3014 |
draw z0--z1; |
| 3015 |
pickup pensquare scaled verythickline; |
| 3016 |
draw z1--z2; |
| 3017 |
shiftpoint:=z1; |
| 3018 |
) |
| 3019 |
|
| 3020 |
spin_lt#= 2CIu#; |
| 3021 |
spin_r#= .7CIu#; |
| 3022 |
spin_ht#= 2CIu#; |
| 3023 |
spin_alt= .5CIu; |
| 3024 |
spin_awd= .1CIu; |
| 3025 |
define_whole_pixels(spin_lt,spin_r, spin_ht); |
| 3026 |
|
| 3027 |
twopinchar("spinu")("S")("spin up") |
| 3028 |
(spin_lt#, .6spin_ht#, .6spin_ht#) |
| 3029 |
( pickup pensquare scaled normalline; |
| 3030 |
z0=(0,0); |
| 3031 |
z1=z0+(spin_lt,0); |
| 3032 |
draw z0--z1; |
| 3033 |
z2=.5[z0,z1]; |
| 3034 |
y3-y4=spin_ht; |
| 3035 |
x3=x4=x2; |
| 3036 |
y2=.6[y3,y4]; |
| 3037 |
y5=y6=y3-spin_alt; |
| 3038 |
x5=x2-spin_awd; |
| 3039 |
x6=x2+spin_awd; |
| 3040 |
% pickup pencircle scaled thinline; |
| 3041 |
draw z3--z4; |
| 3042 |
filldraw z5--z3--z6--cycle; |
| 3043 |
pickup pencircle scaled spin_r; |
| 3044 |
drawdot z2; |
| 3045 |
shiftpoint:=z1; |
| 3046 |
) |
| 3047 |
|
| 3048 |
twopinchar("spind")("S")("spin down") |
| 3049 |
(spin_lt#, .6spin_ht#, .6spin_ht#) |
| 3050 |
( pickup pensquare scaled normalline; |
| 3051 |
z0=(0,0); |
| 3052 |
z1=z0+(spin_lt,0); |
| 3053 |
draw z0--z1; |
| 3054 |
z2=.5[z0,z1]; |
| 3055 |
y3-y4=-spin_ht; |
| 3056 |
x3=x4=x2; |
| 3057 |
y2=.6[y3,y4]; |
| 3058 |
y5=y6=y3+spin_alt; |
| 3059 |
x5=x2-spin_awd; |
| 3060 |
x6=x2+spin_awd; |
| 3061 |
% pickup pencircle scaled thinline; |
| 3062 |
draw z3--z4; |
| 3063 |
filldraw z5--z3--z6--cycle; |
| 3064 |
pickup pencircle scaled spin_r; |
| 3065 |
drawdot z2; |
| 3066 |
shiftpoint:=z1; |
| 3067 |
) |
| 3068 |
|
| 3069 |
endCIRCfont |
| 3070 |
%</ciphysicmf> |
| 3071 |
%^^A last update: Fri 03-13-1998 |
| 3072 |
% |
| 3073 |
%<*csybimos> |
| 3074 |
font_identifier:="cibimos"; |
| 3075 |
|
| 3076 |
string optionname; optionname:=""; |
| 3077 |
|
| 3078 |
input defcirc.mf; |
| 3079 |
|
| 3080 |
input csym; |
| 3081 |
designsize:=1lLE#; |
| 3082 |
|
| 3083 |
def mosfet = % ok |
| 3084 |
z0=(0,0); |
| 3085 |
x1=x2=x3=x4; |
| 3086 |
y2-y1=mos_SD; |
| 3087 |
y4-y3=mos_sd; |
| 3088 |
.5[z2,z1]=.5[z4,z3]; |
| 3089 |
y6=y4; y7=y3; |
| 3090 |
x4-x6=x3-x7; |
| 3091 |
.5[z8,z9]=.5[z6,z7]=z5; |
| 3092 |
x9=x8; |
| 3093 |
y8-y6=mos_soSD; |
| 3094 |
x10=x11; |
| 3095 |
x0+mos_Gsub=x10+mos_ox=x7; |
| 3096 |
x1-x0=mos_GSx; |
| 3097 |
y0=y10=y1+mos_GSy; |
| 3098 |
y6-y11=y10-y7; |
| 3099 |
z12=.5[z1,z2]; |
| 3100 |
z6=.5[z13,z8]; |
| 3101 |
z7=.5[z14,z9]; |
| 3102 |
z15-z16=z8-z13; |
| 3103 |
z5=.5[z15,z16]; |
| 3104 |
pickup pencircle scaled mos_rad; |
| 3105 |
drawdot round(z3); |
| 3106 |
pickup pensquare scaled normalline; |
| 3107 |
draw z1--z3--z7; |
| 3108 |
draw z2--z4--z6; |
| 3109 |
draw z0--z10--z11; |
| 3110 |
draw z5--z12--z3; |
| 3111 |
pickup pensquare scaled thickline; |
| 3112 |
enddef; |
| 3113 |
|
| 3114 |
def mosfet_V = % ok |
| 3115 |
mosfet; |
| 3116 |
draw z8--z9; |
| 3117 |
enddef; |
| 3118 |
|
| 3119 |
def mosfet_A = % ok |
| 3120 |
mosfet; |
| 3121 |
draw z8--z13; |
| 3122 |
draw z9--z14; |
| 3123 |
draw z15--z16; |
| 3124 |
enddef; |
| 3125 |
|
| 3126 |
def fet = % ok |
| 3127 |
z0=(0,0); |
| 3128 |
z1=z0+(fet_Gsub,0); |
| 3129 |
y2=y1; |
| 3130 |
x2=x3=x4=x0+fet_GSx; |
| 3131 |
y3=y2-fet_GSy; |
| 3132 |
z2-z3=z4-z5; |
| 3133 |
y4-y3=fet_SD; |
| 3134 |
y6=y5; |
| 3135 |
x1=x6; |
| 3136 |
x8=x7; |
| 3137 |
y8=y1-fet_soSD; |
| 3138 |
.5[z4,z3]=.5[z5,z2]; |
| 3139 |
.5[z7,z8]=.5[z1,z6]; |
| 3140 |
z9=z1-(fet_sarr+tri_lt,0); |
| 3141 |
pickup pensquare scaled normalline; |
| 3142 |
draw z0--z1--z2--z3; |
| 3143 |
draw z6--z5--z4; |
| 3144 |
pickup pensquare scaled thickline; |
| 3145 |
draw z7--z8; |
| 3146 |
enddef; |
| 3147 |
|
| 3148 |
def transistor_without_basis = % "uberarbeiten |
| 3149 |
numeric pl; |
| 3150 |
pl:=.5(tst_ht-tst_iht); |
| 3151 |
z1-z2=(0,tst_iht); |
| 3152 |
z0=.5[z1,z2]; |
| 3153 |
z3=tst_fac[z0,z1]; |
| 3154 |
z4=tst_fac[z0,z2]; |
| 3155 |
z5=z1+(tst_wd,0); |
| 3156 |
z6=z2+(tst_wd,0); |
| 3157 |
z7=z5+(0,pl); |
| 3158 |
z8=z6+(0,-pl); |
| 3159 |
z9=tst_dis[z4,z6]; |
| 3160 |
pickup pensquare scaled normalline; |
| 3161 |
draw z1--z2; |
| 3162 |
draw z3--z5--z7; |
| 3163 |
draw z4--z6--z8; |
| 3164 |
pickup pencircle scaled thinline; |
| 3165 |
triangle(z9,tst_rad,tri_phi,angle(z6-z4)); |
| 3166 |
enddef; |
| 3167 |
|
| 3168 |
def npn_no_basis = % "uberarbeiten |
| 3169 |
numeric tst_rad,tst_dis; |
| 3170 |
tst_rad:=-tri_lt; |
| 3171 |
tst_dis:=npn_dis; |
| 3172 |
z0=(0,0); |
| 3173 |
transistor_without_basis; |
| 3174 |
enddef; |
| 3175 |
|
| 3176 |
def npn_photo = % "uberarbeiten |
| 3177 |
numeric pl; |
| 3178 |
z0=(0,0); |
| 3179 |
pl:=.5(tst_ht-tst_iht); |
| 3180 |
y0=y1=y2=y3; |
| 3181 |
x1=x0+tst_ht; |
| 3182 |
x2-x0=x1-x3=pl; |
| 3183 |
y5=y4=y6=y7=y8=y0+tst_wd; |
| 3184 |
x5-x6=tst_iht; |
| 3185 |
x4=.5[x5,x6]=.5[x0,x1]; |
| 3186 |
x7=tst_fac[x4,x5]; |
| 3187 |
x8=tst_fac[x4,x6]; |
| 3188 |
z9=tst_dis[z2,z8]; |
| 3189 |
pickup pensquare scaled normalline; |
| 3190 |
draw z0--z2--z8--z7--z3--z1; |
| 3191 |
draw z5--z6; |
| 3192 |
pickup pencircle scaled thinline; |
| 3193 |
triangle(z9,tst_rad,tri_phi,angle(z8-z2)); |
| 3194 |
enddef; |
| 3195 |
|
| 3196 |
def pnp_no_basis = % "uberarbeiten |
| 3197 |
numeric tst_rad,tst_dis; |
| 3198 |
tst_rad:=tri_lt; |
| 3199 |
tst_dis:=pnp_dis; |
| 3200 |
z0=(0,0); |
| 3201 |
transistor_without_basis; |
| 3202 |
enddef; |
| 3203 |
|
| 3204 |
def npn = % "uberarbeiten |
| 3205 |
numeric tst_rad,tst_dis; |
| 3206 |
tst_rad:=-tri_lt; |
| 3207 |
tst_dis:=npn_dis; |
| 3208 |
z0=(tst_wd,0); |
| 3209 |
z20=(0,0); |
| 3210 |
transistor_without_basis; |
| 3211 |
pickup pensquare scaled normalline; |
| 3212 |
draw z20--z0; |
| 3213 |
enddef; |
| 3214 |
|
| 3215 |
def pnp = % "uberarbeiten |
| 3216 |
numeric tst_rad,tst_dis; |
| 3217 |
tst_rad:=tri_lt; |
| 3218 |
tst_dis:=pnp_dis; |
| 3219 |
z0=(tst_wd,0); |
| 3220 |
z20=(0,0); |
| 3221 |
transistor_without_basis; |
| 3222 |
pickup pensquare scaled normalline; |
| 3223 |
draw z20--z0; |
| 3224 |
enddef; |
| 3225 |
|
| 3226 |
|
| 3227 |
"Transistor NPN ohne Basis"; |
| 3228 |
eightchars(0) |
| 3229 |
(npn_no_basis) |
| 3230 |
(tst_wd#,.5tst_ht#,.5tst_ht#,0); |
| 3231 |
|
| 3232 |
"Transistor PNP ohne Basis"; |
| 3233 |
eightchars(8) |
| 3234 |
(pnp_no_basis) |
| 3235 |
(tst_wd#,.5tst_ht#,.5tst_ht#,0); |
| 3236 |
|
| 3237 |
"Transistor NPN"; |
| 3238 |
eightchars(16) |
| 3239 |
(npn) |
| 3240 |
(tst_wd#+tst_wd#,.5tst_ht#,.5tst_ht#,0); |
| 3241 |
|
| 3242 |
"Transistor PNP"; |
| 3243 |
eightchars(24) |
| 3244 |
(pnp) |
| 3245 |
(tst_wd#+tst_wd#,.5tst_ht#,.5tst_ht#,0); |
| 3246 |
|
| 3247 |
"FET n-Kanal"; |
| 3248 |
eightchars(32) |
| 3249 |
(fet; |
| 3250 |
pickup pencircle scaled thinline; |
| 3251 |
triangle(z1,tri_lt,tri_phi,180); |
| 3252 |
) |
| 3253 |
(fet_GSx#,fet_GSy#,fet_SD#-fet_GSy#,0); |
| 3254 |
|
| 3255 |
"FET p-Kanal"; |
| 3256 |
eightchars(40) |
| 3257 |
(fet; |
| 3258 |
pickup pencircle scaled thinline; |
| 3259 |
triangle(z9,tri_lt,tri_phi,0); |
| 3260 |
) |
| 3261 |
(fet_GSx#,fet_GSy#,fet_SD#-fet_GSy#,0); |
| 3262 |
|
| 3263 |
"MOSFET n-Kanal V"; |
| 3264 |
eightchars(48) |
| 3265 |
(mosfet_V; |
| 3266 |
pickup pencircle scaled thinline; |
| 3267 |
triangle(z5,tri_lt,tri_phi,0); |
| 3268 |
) |
| 3269 |
(mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0); |
| 3270 |
|
| 3271 |
"MOSFET p-Kanal V"; |
| 3272 |
eightchars(56) |
| 3273 |
(mosfet_V; |
| 3274 |
pickup pencircle scaled thinline; |
| 3275 |
triangle(z12,tri_lt,tri_phi,180); |
| 3276 |
) |
| 3277 |
(mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0); |
| 3278 |
|
| 3279 |
"MOSFET n-Kanal A"; |
| 3280 |
eightchars(64) |
| 3281 |
(mosfet_A; |
| 3282 |
pickup pencircle scaled thinline; |
| 3283 |
triangle(z5,tri_lt,tri_phi,0); |
| 3284 |
) |
| 3285 |
(mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0); |
| 3286 |
|
| 3287 |
"MOSFET p-Kanal A"; |
| 3288 |
eightchars(72) |
| 3289 |
(mosfet_A; |
| 3290 |
pickup pencircle scaled thinline; |
| 3291 |
triangle(z12,tri_lt,tri_phi,180); |
| 3292 |
) |
| 3293 |
(mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0); |
| 3294 |
|
| 3295 |
current_char_code:=80; |
| 3296 |
|
| 3297 |
twopincharfourfour("npnPH")("T")("E")("C")("photo transistor") |
| 3298 |
(tst_ht#,tst_wd#+1.6lLE#,0) |
| 3299 |
( |
| 3300 |
shiftpoint:=z1; |
| 3301 |
npn_photo; |
| 3302 |
lightarrows(z4+(.8lLE,1.7lLE),240); |
| 3303 |
) |
| 3304 |
|
| 3305 |
end; |
| 3306 |
%</csybimos> |
| 3307 |
% |
| 3308 |
%^^A last update: Fri 03-13-1998 |
| 3309 |
% |
| 3310 |
%<*csysym> |
| 3311 |
input csym; |
| 3312 |
designsize:=.5lLE#; |
| 3313 |
|
| 3314 |
def eqtriangle(expr l)= |
| 3315 |
x1=x2=x0=x3-l; |
| 3316 |
y3=y0; |
| 3317 |
z1-z2=(z3-z2) rotated 60; |
| 3318 |
enddef; |
| 3319 |
|
| 3320 |
def sinus(expr A, k, s) = |
| 3321 |
j:=0; |
| 3322 |
for i:=0 step s until 360: |
| 3323 |
z[j]=(k*i,A*sind(i)); |
| 3324 |
j:=j+1; |
| 3325 |
endfor |
| 3326 |
draw for i:=0 upto floor(360/s)-1: z[i].. endfor z[floor(360/s)]; |
| 3327 |
enddef; |
| 3328 |
|
| 3329 |
def disarrow = |
| 3330 |
z0=(0,0); |
| 3331 |
x0=x1=x2; |
| 3332 |
y1-y2=darr_ht; |
| 3333 |
.5[z1,z2]=z0; |
| 3334 |
y0=y3; |
| 3335 |
x3-x0=darr_lt; |
| 3336 |
pickup pensquare scaled normalline; |
| 3337 |
draw z0--z3; |
| 3338 |
draw z1--z2; |
| 3339 |
triangle(z0,darr_rad,darr_phi,0); |
| 3340 |
enddef; |
| 3341 |
|
| 3342 |
def trigger = |
| 3343 |
z0=(0,0); |
| 3344 |
x1=x2; x3=x4; |
| 3345 |
y2=y4=y5; y0=y1=y3; |
| 3346 |
x3-x1=.17sym; |
| 3347 |
x1-x0=x5-x4=.3sym; |
| 3348 |
y2-y1=sym; |
| 3349 |
enddef; |
| 3350 |
|
| 3351 |
def impuls = |
| 3352 |
z0=(0,0); |
| 3353 |
y0=y1=y4=y5=y7=y8=y9; |
| 3354 |
x1-x0=x3-x2=x5-x4=x8-x7=.6sym; |
| 3355 |
x9-x0=x6-x2=.2sym; |
| 3356 |
x1=x2; x3=x4; x6=x7; |
| 3357 |
y2-y1=y3-y4=y6-y7=sym; |
| 3358 |
x10=x0; y11=y10=y2; |
| 3359 |
x11=x8; |
| 3360 |
enddef; |
| 3361 |
|
| 3362 |
|
| 3363 |
|
| 3364 |
"Rechteckimpuls"; |
| 3365 |
beginchar(1,1.9sym#,sym#,0); |
| 3366 |
impuls |
| 3367 |
pickup pensquare scaled normalline; |
| 3368 |
draw z0--z1--z2--z3--z4--z5; |
| 3369 |
endchar; |
| 3370 |
|
| 3371 |
"positive Flanke"; |
| 3372 |
beginchar(2,1.3sym#,sym#,0); |
| 3373 |
impuls |
| 3374 |
pickup pensquare scaled normalline; |
| 3375 |
draw z0--z1--z2--z3; |
| 3376 |
endchar; |
| 3377 |
|
| 3378 |
"negative Flanke"; |
| 3379 |
beginchar(3,1.3sym#,sym#,0); |
| 3380 |
impuls |
| 3381 |
pickup pensquare scaled normalline; |
| 3382 |
draw (z2--z3--z4--z5) shifted (x0-x1,0); |
| 3383 |
endchar; |
| 3384 |
|
| 3385 |
"Nadelimpuls"; |
| 3386 |
beginchar(4,1.5sym#,sym#,0); |
| 3387 |
impuls |
| 3388 |
pickup pensquare scaled normalline; |
| 3389 |
draw (z0--z1--z2--z6--z7--z8); |
| 3390 |
endchar; |
| 3391 |
|
| 3392 |
"inverser Nadelimpuls"; |
| 3393 |
beginchar(12,1.5sym#,sym#,0); |
| 3394 |
impuls |
| 3395 |
pickup pensquare scaled normalline; |
| 3396 |
draw (z10--z2--z1--z7--z6--z11); |
| 3397 |
endchar; |
| 3398 |
|
| 3399 |
"Rechteckspannung"; |
| 3400 |
beginchar(5,3.1sym#,sym#,0); |
| 3401 |
impuls |
| 3402 |
pickup pensquare scaled normalline; |
| 3403 |
draw z0--z1--z2--z3--z4--z5; |
| 3404 |
draw (z0--z1--z2--z3--z4--z5) shifted z4; |
| 3405 |
endchar; |
| 3406 |
|
| 3407 |
"Rechteckimpulse"; |
| 3408 |
beginchar(13,2.6sym#,sym#,0); |
| 3409 |
impuls |
| 3410 |
pickup pensquare scaled normalline; |
| 3411 |
draw z0--z1--z2--z6--z7--z8; |
| 3412 |
draw (z0--z1--z2--z6--z7--z8) shifted z4; |
| 3413 |
|
| 3414 |
endchar; |
| 3415 |
|
| 3416 |
"S"&ditto&"agezahn"; |
| 3417 |
beginchar(6,1.9sym#,sym#,0); |
| 3418 |
impuls |
| 3419 |
pickup pensquare scaled normalline; |
| 3420 |
draw z0--z9--z3--z4--z5; |
| 3421 |
endchar; |
| 3422 |
|
| 3423 |
"Trigger"; |
| 3424 |
beginchar(7,.87sym#,sym#,0); |
| 3425 |
trigger |
| 3426 |
pickup pensquare scaled normalline; |
| 3427 |
draw z0--z1--z2--z5; |
| 3428 |
draw z1--z3--z4; |
| 3429 |
endchar; |
| 3430 |
|
| 3431 |
"Abstandsst"&ditto&"uck"; |
| 3432 |
fourchars(8)(disarrow)(z0)(.5darr_ht#,darr_lt#,.5darr_ht#); |
| 3433 |
|
| 3434 |
"sinus wave"; |
| 3435 |
beginchar(16,1.6sym#,9/35*sym#,9/35*sym#); |
| 3436 |
pickup pencircle scaled normalline; |
| 3437 |
sinus(9/35*sym,1.6sym/360,45); |
| 3438 |
endchar; |
| 3439 |
|
| 3440 |
"variable sinus wave"; |
| 3441 |
beginchar(17,1.6sym#,9/35*sym#,9/35*sym#); |
| 3442 |
pickup pencircle scaled normalline; |
| 3443 |
sinus(9/35*sym,1.6sym/360,45); |
| 3444 |
fillarrow((.8*sym,0),20/35*sym,15/35*sym,45,15/35*sym,15)(); |
| 3445 |
endchar; |
| 3446 |
|
| 3447 |
"symbol of amplifier"; |
| 3448 |
beginchar(24,cosd(30)*1.9sym#,.95sym#,.95sym#); |
| 3449 |
z0=(0,0); |
| 3450 |
eqtriangle(1.9sym); |
| 3451 |
pickup pencircle scaled normalline; |
| 3452 |
draw z1--z2--z3--cycle; |
| 3453 |
endchar; |
| 3454 |
|
| 3455 |
"symbol of buffer"; |
| 3456 |
beginchar(25,cosd(30)*1sym#,.5sym#,.5sym#); |
| 3457 |
z0=(0,0); |
| 3458 |
eqtriangle(1sym); |
| 3459 |
pickup pencircle scaled normalline; |
| 3460 |
draw z1--z2--z3--cycle; |
| 3461 |
endchar; |
| 3462 |
|
| 3463 |
bye; |
| 3464 |
%</csysym> |
| 3465 |
% |
| 3466 |
%^^A last update: Fri 03-13-1998 |
| 3467 |
%<*defcircmf> |
| 3468 |
mode_setup; |
| 3469 |
font_coding_scheme:="CIRC symbols"; |
| 3470 |
|
| 3471 |
message("CIRC %<*"&font_identifier_&">"); |
| 3472 |
message("CIRC \freecirc"); |
| 3473 |
message("CIRC \addCIRCfont "&font_identifier_); |
| 3474 |
message("CIRC %</"&font_identifier_&">"); |
| 3475 |
message("CIRC %<+doc> \optionline "&optionname); |
| 3476 |
message("CIRC %<*"&font_identifier_&",doc>"); |
| 3477 |
message(""); |
| 3478 |
|
| 3479 |
inner bye; |
| 3480 |
def endCIRCfont = |
| 3481 |
message("CIRC %</"&font_identifier_&",doc>"); |
| 3482 |
message("CIRC %<*"&font_identifier_&">"); |
| 3483 |
message("CIRC \protectcirc"); |
| 3484 |
message("CIRC %</"&font_identifier_&">"); |
| 3485 |
message(""); |
| 3486 |
bye; |
| 3487 |
enddef; |
| 3488 |
|
| 3489 |
CIu#:=7pt#; define_whole_pixels(CIu); |
| 3490 |
% define all symbols by a 7pt grid --> CIRC unit |
| 3491 |
|
| 3492 |
current_char_code:=0; |
| 3493 |
% start with character code 0 |
| 3494 |
|
| 3495 |
pair shiftpoint; |
| 3496 |
|
| 3497 |
linethickness#:= 0.45pt#; |
| 3498 |
thinline# := 0.5linethickness#; |
| 3499 |
normalline# := 1.0linethickness#; |
| 3500 |
thickline# := 1.5linethickness#; |
| 3501 |
verythickline#:= 2.5linethickness#; |
| 3502 |
define_whole_blacker_pixels(normalline,thinline,thickline,verythickline); |
| 3503 |
|
| 3504 |
fontdimen6: 1CIu#; |
| 3505 |
%export the CIRC unit to TeX |
| 3506 |
|
| 3507 |
extra_endchar:=extra_endchar & "labels(range 0 thru 100);"; |
| 3508 |
% for proofing mark all points |
| 3509 |
|
| 3510 |
def {{ = |
| 3511 |
begingroup |
| 3512 |
save T; transform T; |
| 3513 |
T:=currenttransform; |
| 3514 |
save currenttransform; |
| 3515 |
transform currenttransform; |
| 3516 |
currenttransform:=T; |
| 3517 |
enddef; |
| 3518 |
|
| 3519 |
def }} = endgroup; enddef; |
| 3520 |
|
| 3521 |
def addTF(text t) = currenttransform:=currenttransform t; enddef; |
| 3522 |
|
| 3523 |
def twopinchar(text name, lab, doc)(expr wd, ht, dp)(text body) = |
| 3524 |
message("CIRC \cdef "&name&" "&lab&" \CIRC"& |
| 3525 |
font_identifier_&" "&decimal(current_char_code)); |
| 3526 |
message("CIRC %<+doc> {"&doc&"}"); |
| 3527 |
message(""); |
| 3528 |
beginchar(current_char_code, wd, ht, dp); |
| 3529 |
body; |
| 3530 |
endchar; |
| 3531 |
current_char_code:=current_char_code+1; |
| 3532 |
beginchar(current_char_code,dp,wd,ht); |
| 3533 |
{{addTF(shifted -shiftpoint rotated -90); body;}} |
| 3534 |
endchar; |
| 3535 |
current_char_code:=current_char_code+1; |
| 3536 |
enddef; |
| 3537 |
|
| 3538 |
def twopincharfour(text name, lab, pini, pinii, doc) |
| 3539 |
(expr wd, ht, dp)(text body) = |
| 3540 |
message("CIRC \cdefiv "&name&" "&lab&" \CIRC"& |
| 3541 |
font_identifier_&" "&decimal(current_char_code)&" "& |
| 3542 |
pini&" "&pinii); |
| 3543 |
message("CIRC %<+doc> {"&doc&"}"); |
| 3544 |
message(""); |
| 3545 |
beginchar(current_char_code,wd,ht,dp); |
| 3546 |
body; |
| 3547 |
endchar; |
| 3548 |
current_char_code:=current_char_code+1; |
| 3549 |
beginchar(current_char_code,dp,wd,ht); |
| 3550 |
{{addTF(rotated 90); body;}} |
| 3551 |
endchar; |
| 3552 |
current_char_code:=current_char_code+1; |
| 3553 |
beginchar(current_char_code,wd,dp,ht); |
| 3554 |
{{addTF(shifted -shiftpoint rotated 180); body;}} |
| 3555 |
endchar; |
| 3556 |
current_char_code:=current_char_code+1; |
| 3557 |
beginchar(current_char_code,ht,wd,dp); |
| 3558 |
{{addTF(shifted -shiftpoint rotated -90); body;}} |
| 3559 |
endchar; |
| 3560 |
current_char_code:=current_char_code+1; |
| 3561 |
enddef; |
| 3562 |
|
| 3563 |
def twopincharfourfour(text name, lab, pini, pinii, doc) |
| 3564 |
(expr wd, ht, dp)(text body) = |
| 3565 |
message("CIRC \cdefiviv "&name&" "&lab&" \CIRC"& |
| 3566 |
font_identifier_&" "&decimal(current_char_code)&" "& |
| 3567 |
pini&" "&pinii); |
| 3568 |
message("CIRC %<+doc> {"&doc&"}"); |
| 3569 |
message(""); |
| 3570 |
beginchar(current_char_code,wd,ht,dp); |
| 3571 |
body; |
| 3572 |
endchar; |
| 3573 |
current_char_code:=current_char_code+1; |
| 3574 |
beginchar(current_char_code,dp,wd,ht); |
| 3575 |
{{addTF(rotated 90); body;}} |
| 3576 |
endchar; |
| 3577 |
current_char_code:=current_char_code+1; |
| 3578 |
beginchar(current_char_code,wd,dp,ht); |
| 3579 |
{{addTF(shifted -shiftpoint rotated 180); body;}} |
| 3580 |
endchar; |
| 3581 |
current_char_code:=current_char_code+1; |
| 3582 |
beginchar(current_char_code,ht,wd,dp); |
| 3583 |
{{addTF(shifted -shiftpoint rotated -90); body;}} |
| 3584 |
endchar; |
| 3585 |
current_char_code:=current_char_code+1; |
| 3586 |
beginchar(current_char_code,wd,dp,ht); |
| 3587 |
{{addTF(reflectedabout(left,right)); body;}} |
| 3588 |
endchar; |
| 3589 |
current_char_code:=current_char_code+1; |
| 3590 |
beginchar(current_char_code,ht,wd,dp); |
| 3591 |
{{addTF(reflectedabout(left,right) rotated 90); body;}} |
| 3592 |
endchar; |
| 3593 |
current_char_code:=current_char_code+1; |
| 3594 |
beginchar(current_char_code,wd,ht,dp); |
| 3595 |
{{addTF(reflectedabout (left,right) shifted -shiftpoint rotated 180); body;}} |
| 3596 |
endchar; |
| 3597 |
current_char_code:=current_char_code+1; |
| 3598 |
beginchar(current_char_code,dp,wd,ht); |
| 3599 |
{{addTF(reflectedabout(left,right) shifted -shiftpoint rotated -90); body;}} |
| 3600 |
endchar; |
| 3601 |
current_char_code:=current_char_code+1; |
| 3602 |
enddef; |
| 3603 |
%</defcircmf> |
| 3604 |
%^^A last update: Sat 06-13-2003 |
| 3605 |
% |
| 3606 |
%<*csywidko> |
| 3607 |
input csym; |
| 3608 |
designsize:=.5lLE#; |
| 3609 |
|
| 3610 |
def resistor = |
| 3611 |
numeric pl; |
| 3612 |
pl:=.5(res_lt-res_wd); |
| 3613 |
z0=(0,0); |
| 3614 |
z1=z0+(pl,0); |
| 3615 |
z2=z1+(res_wd,0); |
| 3616 |
z3=z2+(pl,0); |
| 3617 |
z4-z5=z6-z7=(0,res_ht); |
| 3618 |
z1=.5[z4,z5]; |
| 3619 |
z2=.5[z6,z7]; |
| 3620 |
z8=z0+(res_x,-res_y); |
| 3621 |
pickup pensquare scaled normalline; |
| 3622 |
draw z0--z1; |
| 3623 |
draw z2--z3; |
| 3624 |
draw z4--z6--z7--z5--cycle; |
| 3625 |
enddef; |
| 3626 |
|
| 3627 |
usR_iwd# = 3lLE#; |
| 3628 |
usR_iht# = 1lLE#; |
| 3629 |
usR_wd# = 4lLE#; |
| 3630 |
usR_f = .25; |
| 3631 |
define_pixels(usR_iwd, usR_iht, usR_wd); |
| 3632 |
|
| 3633 |
vardef usR = |
| 3634 |
z0=(0,0); |
| 3635 |
z1=z0; |
| 3636 |
y1=y2=y3=y4; |
| 3637 |
x2-x1=usR_wd; |
| 3638 |
x4-x3=usR_iwd; |
| 3639 |
.5[x1,x2]=.5[x3,x4]; |
| 3640 |
y5=y7=y9; |
| 3641 |
y6=y8=y10; |
| 3642 |
y5-y6=usR_iht; |
| 3643 |
.5[y5,y6]=y1; |
| 3644 |
x7-x5=x9-x7=x11-x9=x8-x6=x10-x8; |
| 3645 |
x6=.5[x5,x7]; |
| 3646 |
x8-x6=(usR_wd-usR_iwd); |
| 3647 |
x5-x3=usR_f*(x8-x6); |
| 3648 |
pickup pensquare scaled normalline; |
| 3649 |
draw z1--z3--z5--z6--z7--z8--z9--z10--z4--z2; |
| 3650 |
enddef; |
| 3651 |
|
| 3652 |
vardef usR_var = |
| 3653 |
{{ |
| 3654 |
addxTF(shifted -z6 rotated -90); |
| 3655 |
usR; |
| 3656 |
pickup pensquare scaled normalline; |
| 3657 |
arrow(z6,.8res_ara,.5usR_iht,res_phi,arr_lt,arr_phi) |
| 3658 |
(pickup pencircle scaled normalline); |
| 3659 |
}} |
| 3660 |
enddef; |
| 3661 |
|
| 3662 |
def resistor_var = |
| 3663 |
{{ |
| 3664 |
addxTF(shifted -z8 rotated -90); |
| 3665 |
resistor; |
| 3666 |
pickup pensquare scaled normalline; |
| 3667 |
arrow(z8,res_ara,0,res_phi,arr_lt,arr_phi) |
| 3668 |
(pickup pencircle scaled normalline); |
| 3669 |
}} |
| 3670 |
enddef; |
| 3671 |
|
| 3672 |
def capacitor = |
| 3673 |
pickup pensquare scaled normalline; |
| 3674 |
numeric pl; |
| 3675 |
pl:=.5(cap_lt-cap_spc); |
| 3676 |
z0=(0,0); |
| 3677 |
z1=z0+(pl,0); |
| 3678 |
z2=z1+(cap_spc,0); |
| 3679 |
z3=z2+(pl,0); |
| 3680 |
z4-z5=z6-z7=(0,cap_ht); |
| 3681 |
z1=.5[z4,z5]; |
| 3682 |
z2=.5[z6,z7]; |
| 3683 |
draw z0--z1; |
| 3684 |
draw z2--z3; |
| 3685 |
draw z4--z5; |
| 3686 |
draw z6--z7; |
| 3687 |
enddef; |
| 3688 |
|
| 3689 |
def capacitor_var = |
| 3690 |
capacitor; |
| 3691 |
noarrowTF; |
| 3692 |
pickup pencircle scaled thinline; |
| 3693 |
arrow(.5[z1,z2],cap_ara,cap_arb,cap_phi,arr_lt,arr_phi)(); |
| 3694 |
enddef; |
| 3695 |
|
| 3696 |
def electrolytic_capacitor = |
| 3697 |
pickup pensquare scaled normalline; |
| 3698 |
numeric pl; |
| 3699 |
pl:=.5(cap_lt-cap_spc-cap_wd); |
| 3700 |
z0=(0,0); |
| 3701 |
z1=z0+(pl,0); |
| 3702 |
z2=z1+(cap_spc,0); |
| 3703 |
z3=z2+(cap_wd,0); |
| 3704 |
z4=z3+(pl,0); |
| 3705 |
z5-z6=z7-z8=z9-z10=(0,cap_ht); |
| 3706 |
z1=.5[z5,z6]; |
| 3707 |
z2=.5[z7,z8]; |
| 3708 |
z3=.5[z9,z10]; |
| 3709 |
draw z0--z1; |
| 3710 |
draw z3--z4; |
| 3711 |
draw z5--z6; |
| 3712 |
draw z7--z9--z10--z8--cycle; |
| 3713 |
enddef; |
| 3714 |
|
| 3715 |
|
| 3716 |
"Widerstand"; |
| 3717 |
twochars(0)(resistor)(.5res_ht#,res_lt#,.5res_ht#); |
| 3718 |
|
| 3719 |
"US Widerstand"; |
| 3720 |
twochars(24)(usR)(.5res_ht#,res_lt#,.5res_ht#); |
| 3721 |
|
| 3722 |
"Widerstand variabel"; |
| 3723 |
eightchars(8)(resistor_var)(res_y#,res_lt#-res_x#,res_x#,res_o#); |
| 3724 |
|
| 3725 |
"US Widerstand variabel"; |
| 3726 |
eightchars(32)(usR_var)(res_y#,res_lt#-res_x#,res_x#,res_o#); |
| 3727 |
|
| 3728 |
"Kondensator"; |
| 3729 |
twochars(128)(capacitor)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 3730 |
|
| 3731 |
"Kondensator variabel"; |
| 3732 |
twochars(130)(capacitor_var)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 3733 |
|
| 3734 |
"Elektrolyt-Kondensator"; |
| 3735 |
fourchars(136)(electrolytic_capacitor)(z4)(.5cap_ht#,cap_lt#,.5cap_ht#); |
| 3736 |
|
| 3737 |
end; |
| 3738 |
%</csywidko> |
| 3739 |
% |
| 3740 |
%^^A last update: Fri 03-13-1998 |
| 3741 |
% |
| 3742 |
%<*csym> |
| 3743 |
mode_setup; |
| 3744 |
|
| 3745 |
% alle Symbole in einem 7pt Raster definieren |
| 3746 |
lLE# :=7pt#; |
| 3747 |
define_whole_pixels(lLE); |
| 3748 |
|
| 3749 |
% Liniest"arke und deren Variationen |
| 3750 |
linethickness#:= 0.45pt#; |
| 3751 |
thinline# := 0.5linethickness#; |
| 3752 |
normalline# := 1.0linethickness#; |
| 3753 |
thickline# := 1.5linethickness#; |
| 3754 |
verythickline#:= 2.5linethickness#; |
| 3755 |
define_whole_blacker_pixels(normalline,thinline,thickline,verythickline); |
| 3756 |
|
| 3757 |
fontdimen6: 1lLE#; |
| 3758 |
|
| 3759 |
% *_ht means the total height !!! only <integer>*lLE# |
| 3760 |
% *_lt means the total length !!! only <integer>*lLE# |
| 3761 |
|
| 3762 |
% *_spc means an inner space |
| 3763 |
% *_spx means an inner x-space |
| 3764 |
% *_spy means an inner y-space |
| 3765 |
% *_wd means an inner width |
| 3766 |
% *_rad means a radius |
| 3767 |
% *_dia means a diameter |
| 3768 |
% *_phi means an angle |
| 3769 |
% *_psi means an angle |
| 3770 |
|
| 3771 |
%box symbol |
| 3772 |
box_wd# := 4lLE#; |
| 3773 |
define_pixels(box_wd); |
| 3774 |
|
| 3775 |
%oscillograph |
| 3776 |
osc_dia# := 3lLE#; |
| 3777 |
osc_t := .75; % settings from Andreas Tille |
| 3778 |
osc_spc := .5lLE; |
| 3779 |
define_pixels(osc_dia); |
| 3780 |
|
| 3781 |
%wwire |
| 3782 |
ww_spc := .25lLE; |
| 3783 |
|
| 3784 |
darr_ht# := 1.3lLE#; |
| 3785 |
darr_lt# := 1lLE#; |
| 3786 |
darr_phi := 10; |
| 3787 |
darr_rad := 1lLE; |
| 3788 |
define_pixels(darr_ht,darr_lt); |
| 3789 |
|
| 3790 |
|
| 3791 |
bnd_lt# := 1lLE#; |
| 3792 |
bnd_phi := 60; |
| 3793 |
define_pixels(bnd_lt); |
| 3794 |
|
| 3795 |
dsw_wd# := 4lLE#; |
| 3796 |
dsw_ht# := 2lLE#; |
| 3797 |
dsw_ov := .2lLE; |
| 3798 |
dsw_t := .2; |
| 3799 |
dsw_cc := .35; |
| 3800 |
dsw_c := .3; |
| 3801 |
dsw_phi := 12; |
| 3802 |
define_pixels(dsw_wd,dsw_ht); |
| 3803 |
|
| 3804 |
|
| 3805 |
tri_lt := 0.8lLE; |
| 3806 |
tri_phi := 18; |
| 3807 |
|
| 3808 |
arr_lt := 0.8lLE; |
| 3809 |
arr_phi := 10; |
| 3810 |
|
| 3811 |
|
| 3812 |
%capacitor |
| 3813 |
cap_wd := .4lLE; %only for electrolytic capacitor |
| 3814 |
cap_spx := .32lLE; %only for electrolytic capacitor |
| 3815 |
cap_spy := .5lLE; %only for electrolytic capacitor |
| 3816 |
cap_rad := .4lLE; |
| 3817 |
cap_spc := .32lLE; |
| 3818 |
cap_ht# := 2lLE#; |
| 3819 |
cap_lt# := 2lLE#; |
| 3820 |
cap_phi := 45; |
| 3821 |
cap_ara := 1.4lLE; |
| 3822 |
cap_arb := 1.2lLE; |
| 3823 |
define_pixels(cap_lt,cap_ht); |
| 3824 |
|
| 3825 |
%resistor |
| 3826 |
res_wd := 3lLE; |
| 3827 |
res_ht# := 1lLE#; |
| 3828 |
res_lt# := 4lLE#; |
| 3829 |
res_ara# := 3.3lLE#; |
| 3830 |
res_phi := 45; |
| 3831 |
res_x# := 1lLE#; |
| 3832 |
res_y# := 1lLE#; |
| 3833 |
res_o# := res_ara#*cosd(res_phi)-res_y#; |
| 3834 |
define_pixels(res_lt,res_ht,res_x,res_y,res_o,res_ara); |
| 3835 |
|
| 3836 |
%diode |
| 3837 |
did_wd := 1.5lLE; |
| 3838 |
did_ht# := 1.5lLE#; |
| 3839 |
did_lt# := 3lLE#; |
| 3840 |
did_zlt := .4lLE; |
| 3841 |
Dcap_ht := .5lLE; |
| 3842 |
Dcap_spc := .15lLE; |
| 3843 |
Dcap_wd := .35lLE; |
| 3844 |
define_pixels(did_lt,did_ht); |
| 3845 |
|
| 3846 |
thy_ht# := 1lLE#; |
| 3847 |
define_pixels(thy_ht); |
| 3848 |
|
| 3849 |
%led |
| 3850 |
% >wd ht lt< same as diode |
| 3851 |
% led_* means values for the arrows |
| 3852 |
led_lt# := 1.5lLE#; |
| 3853 |
led_wd := .8lLE; |
| 3854 |
led_phi := 10; %aperture-angle of arrows |
| 3855 |
led_psi := 50; %angle of arrows from baseline |
| 3856 |
led_spc := .4lLE; %space between arrows |
| 3857 |
led_spx := .4lLE; |
| 3858 |
led_spy# := .8lLE#; |
| 3859 |
define_pixels(led_spy, led_lt); |
| 3860 |
|
| 3861 |
|
| 3862 |
%transistor |
| 3863 |
pnp_dis := 0.18; |
| 3864 |
npn_dis := (1-pnp_dis); |
| 3865 |
tst_fac := 0.23333; |
| 3866 |
tst_phi := 20; |
| 3867 |
tst_iht := 3lLE; |
| 3868 |
tst_wd# := 1lLE#; |
| 3869 |
tst_lt# := 2lLE#; |
| 3870 |
tst_ht# := 4lLE#; |
| 3871 |
define_pixels(tst_ht,tst_lt,tst_wd); |
| 3872 |
|
| 3873 |
%crystal |
| 3874 |
cry_wd := .8lLE; |
| 3875 |
cry_spc := .32lLE; |
| 3876 |
cry_ht# := 2lLE#; |
| 3877 |
cry_lt# := 4lLE#; |
| 3878 |
define_pixels(cry_lt,cry_ht); |
| 3879 |
|
| 3880 |
%input/output connection |
| 3881 |
ioc_dia := .5lLE; |
| 3882 |
ioc_ht# := .5lLE#; |
| 3883 |
ioc_lt# := 1lLE#; |
| 3884 |
ioc_arr := 0.7lLE; |
| 3885 |
ioc_phi := 12; |
| 3886 |
define_pixels(ioc_ht,ioc_lt); |
| 3887 |
|
| 3888 |
%connection dot |
| 3889 |
cdt_dia := .4lLE; |
| 3890 |
cdt_ht# := .4lLE#; |
| 3891 |
cdt_lt# := .2lLE#; |
| 3892 |
define_pixels(cdt_ht,cdt_lt); |
| 3893 |
|
| 3894 |
%GND |
| 3895 |
GND_wd# := 1.4res_ht#; |
| 3896 |
gnd_wd# := 1.8lLE#; |
| 3897 |
gnd_ht# := 1lLE#; |
| 3898 |
gnd_spc# := .2lLE#; |
| 3899 |
gnd_q := .7; |
| 3900 |
define_pixels(gnd_ht,gnd_spc,gnd_wd,GND_wd); |
| 3901 |
|
| 3902 |
%gate |
| 3903 |
inv_rad := .36lLE; |
| 3904 |
gat_ht# := 5lLE#; |
| 3905 |
gat_lt# := 7lLE#; |
| 3906 |
define_pixels(gat_lt,gat_ht); |
| 3907 |
|
| 3908 |
bbd_wd# := 6lLE#; |
| 3909 |
bbd_ht# := 10lLE#; |
| 3910 |
bba_wd# := 8lLE#; |
| 3911 |
bba_ht# := 4lLE#; |
| 3912 |
define_pixels(bbd_wd,bbd_ht,bba_wd,bba_ht); |
| 3913 |
|
| 3914 |
%big integrated circuits |
| 3915 |
pin_lt# := 2lLE#; % pin length |
| 3916 |
ios_wd# := 2.5lLE#; % in out space |
| 3917 |
mid_wd# := 0lLE#; % middle width |
| 3918 |
pin_spc# := 2lLE#; % pin space |
| 3919 |
out_spc# := 1lLE#; % outer space between pin and box |
| 3920 |
|
| 3921 |
define_pixels(pin_lt,ios_wd,mid_wd,pin_spc,pin_wht,out_spc); |
| 3922 |
|
| 3923 |
%value |
| 3924 |
val_lt# := 2lLE#; |
| 3925 |
val_phi := 7; |
| 3926 |
val_lft := 0; |
| 3927 |
val_rht := 0.9; |
| 3928 |
val_ht# := .2lLE#; |
| 3929 |
define_pixels(val_lt,val_ht); |
| 3930 |
|
| 3931 |
%circle |
| 3932 |
cir_ht# := 1.2lLE#; |
| 3933 |
cir_lt# := 4lLE#; |
| 3934 |
cir_phi := 45; |
| 3935 |
cir_ara := 2.2lLE; |
| 3936 |
cir_arb := 1.8lLE; |
| 3937 |
define_pixels(cir_ht,cir_lt); |
| 3938 |
|
| 3939 |
%usource |
| 3940 |
uso_ht# := 1.5lLE#; |
| 3941 |
uso_lt# := 4lLE#; |
| 3942 |
uso_min := 1lLE; |
| 3943 |
uso_pls := 3lLE; |
| 3944 |
uso_spc := .5lLE; |
| 3945 |
uso_rad := 3lLE; |
| 3946 |
uso_dis := 0.2; |
| 3947 |
uso_phi := 45; |
| 3948 |
uso_ara := 1.6lLE; |
| 3949 |
uso_arb := .8lLE; |
| 3950 |
define_pixels(uso_ht,uso_lt); |
| 3951 |
|
| 3952 |
%isource |
| 3953 |
iso_ht# := 1.2lLE#; |
| 3954 |
iso_lt# := 4lLE#; |
| 3955 |
iso_dis := 0.7; |
| 3956 |
iso_rad := .8lLE; |
| 3957 |
iso_phi := 45; |
| 3958 |
iso_ara := 2.2lLE; |
| 3959 |
iso_arb := 1.8lLE; |
| 3960 |
define_pixels(iso_ht,iso_lt); |
| 3961 |
|
| 3962 |
%coil |
| 3963 |
coi_ht# := .35lLE#; |
| 3964 |
coi_lt# := 4lLE#; |
| 3965 |
define_pixels(coi_ht,coi_lt); |
| 3966 |
coi_rad := coi_ht; |
| 3967 |
coi_num := 4; |
| 3968 |
|
| 3969 |
%switch |
| 3970 |
swt_lt# := 4lLE#; |
| 3971 |
swt_phi := 30; |
| 3972 |
swt_dis := 0.3; |
| 3973 |
swt_ind := 0.8; |
| 3974 |
swt_slt := 0.4lLE; |
| 3975 |
swt_ht# := (1-2swt_dis)*sind(swt_phi)*swt_lt#; |
| 3976 |
define_pixels(swt_ht,swt_lt); |
| 3977 |
|
| 3978 |
%OPV |
| 3979 |
opv_ht# := 4.5lLE#; |
| 3980 |
opv_lt# := 14lLE#; |
| 3981 |
opv_dis# := 3lLE#; |
| 3982 |
opv_frc := 1.1; |
| 3983 |
define_pixels(opv_lt,opv_ht,opv_dis); |
| 3984 |
|
| 3985 |
%FET |
| 3986 |
fet_SD# := 4lLE#; % Source--Drain |
| 3987 |
fet_GSx# := 2lLE#; % Gate--Source, x |
| 3988 |
fet_GSy# := 1lLE#; % Gate--Source, y |
| 3989 |
fet_Gsub := 1lLE; % Gate--Substrat |
| 3990 |
fet_soSD := 0.3lLE; % Substrat "uber Source und Drain |
| 3991 |
fet_sarr := 0.2lLE; % Substrat--Pfeil |
| 3992 |
define_pixels(fet_SD,fet_GSx,fet_GSy); |
| 3993 |
|
| 3994 |
|
| 3995 |
%MOSFET |
| 3996 |
mos_SD# := fet_SD#; |
| 3997 |
mos_GSx# := fet_GSx#; |
| 3998 |
mos_GSy# := fet_GSy#; |
| 3999 |
|
| 4000 |
mos_sd := 2.3lLE; |
| 4001 |
mos_Gsub := fet_Gsub; |
| 4002 |
mos_ox := 0.3lLE; |
| 4003 |
mos_soSD := fet_soSD; |
| 4004 |
mos_rad := 0.2lLE; |
| 4005 |
define_pixels(mos_SD,mos_GSx,mos_GSy); |
| 4006 |
|
| 4007 |
sym# := 232/36pt#; |
| 4008 |
define_pixels(sym); |
| 4009 |
|
| 4010 |
% ############ |
| 4011 |
% definitions |
| 4012 |
% ############ |
| 4013 |
|
| 4014 |
% for proofing mark all points |
| 4015 |
extra_endchar:=extra_endchar & "labels(range 0 thru 30);"; |
| 4016 |
|
| 4017 |
def {{ = |
| 4018 |
begingroup |
| 4019 |
save T; transform T; |
| 4020 |
T:=currenttransform; |
| 4021 |
save currenttransform; |
| 4022 |
transform currenttransform; |
| 4023 |
currenttransform:=T; |
| 4024 |
enddef; |
| 4025 |
|
| 4026 |
def }} = endgroup; enddef; |
| 4027 |
|
| 4028 |
def noarrowTF = |
| 4029 |
transform _aT; |
| 4030 |
numeric _x[],_y[]; |
| 4031 |
_aT:=currenttransform; |
| 4032 |
for $=1 upto 20 : _x[$]:=x[$]; _y[$]:=y[$]; endfor; |
| 4033 |
endgroup; |
| 4034 |
for $=1 upto 20 : x[$]:=_x[$]; y[$]:=_y[$]; endfor; |
| 4035 |
{{ |
| 4036 |
enddef; |
| 4037 |
|
| 4038 |
def addTF(text t) = currenttransform:=currenttransform t; enddef; |
| 4039 |
def addxTF(text t) = currenttransform:=(identity t) transformed |
| 4040 |
currenttransform; enddef; |
| 4041 |
|
| 4042 |
def triangle(expr p, l, alpha, phi) = |
| 4043 |
pair iz[]; |
| 4044 |
iz0=(0,0); |
| 4045 |
iz1=iz0+((l,0) rotated (alpha+phi)); |
| 4046 |
iz2=iz0+((l,0) rotated (-alpha+phi)); |
| 4047 |
fill ((iz0--iz1--iz2--cycle) shifted round(p)); |
| 4048 |
enddef; |
| 4049 |
|
| 4050 |
def arrow(expr p, a, b, phi, l, alpha)(text doother) = |
| 4051 |
pair iz[]; |
| 4052 |
iz0=(0,0); |
| 4053 |
iz1=iz0-((l,0) rotated (alpha+phi)); |
| 4054 |
iz2=iz0-((l,0) rotated (-alpha+phi)); |
| 4055 |
iz3=p transformed if known _aT : _aT; else: identity; fi; |
| 4056 |
iz3-iz4=(b,0) rotated phi; |
| 4057 |
iz5-iz3=(a,0) rotated phi; |
| 4058 |
iz6-iz3=(a-3*rt(0),0) rotated phi; |
| 4059 |
draw iz4--iz6; |
| 4060 |
doother; |
| 4061 |
draw ((iz1--iz0--iz2) shifted round(iz5)); |
| 4062 |
transform _aT; %Transformation l"oschen |
| 4063 |
enddef; |
| 4064 |
|
| 4065 |
def fillarrow(expr p, a, b, phi, l, alpha)(text doother) = |
| 4066 |
pair iz[]; |
| 4067 |
iz0=(0,0); |
| 4068 |
iz1=iz0-((l,0) rotated (alpha+phi)); |
| 4069 |
iz2=iz0-((l,0) rotated (-alpha+phi)); |
| 4070 |
iz3=p transformed if known _aT : _aT; else: identity; fi; |
| 4071 |
iz3-iz4=(b,0) rotated phi; |
| 4072 |
iz5-iz3=(a,0) rotated phi; |
| 4073 |
iz6-iz3=(a-3*rt(0),0) rotated phi; |
| 4074 |
draw iz4--iz6; |
| 4075 |
doother; |
| 4076 |
fill ((iz1--iz0--iz2--cycle) shifted round(iz5)); |
| 4077 |
transform _aT; %Transformation l"oschen |
| 4078 |
enddef; |
| 4079 |
|
| 4080 |
lightarr_spc#=.5lLE#; |
| 4081 |
lightarr_lt#=1.5lLE#; |
| 4082 |
lightarr_alt=round(.7lLE); |
| 4083 |
lightarr_awd=round(.2lLE); |
| 4084 |
define_pixels(lightarr_spc,lightarr_lt); |
| 4085 |
def lightarrows(expr zpoint,lightarr_psi) = |
| 4086 |
z100=zpoint; |
| 4087 |
x100=x103=x105; |
| 4088 |
x101=x104=x106=x100+lightarr_lt; |
| 4089 |
y103=y104=y100+.5lightarr_spc; |
| 4090 |
y105=y106=y100-.5lightarr_spc; |
| 4091 |
x107=x108=x109=x110=x104-lightarr_alt; |
| 4092 |
y107-y108=y109-y110=good.y(lightarr_awd); |
| 4093 |
.5[y107,y108]=y104; |
| 4094 |
.5[y109,y110]=y106; |
| 4095 |
pickup pensquare scaled normalline rotated lightarr_psi; |
| 4096 |
draw (z107--z104--z108--cycle) rotatedaround(z100,lightarr_psi); |
| 4097 |
draw (z109--z106--z110--cycle) rotatedaround(z100,lightarr_psi); |
| 4098 |
draw (z103--z104) rotatedaround(z100,lightarr_psi); |
| 4099 |
draw (z105--z106) rotatedaround(z100,lightarr_psi); |
| 4100 |
|
| 4101 |
enddef; |
| 4102 |
|
| 4103 |
|
| 4104 |
def eightchars(expr cfchar) % erster Zeichenkode |
| 4105 |
(text dochar) % Zeichenkommandos |
| 4106 |
(expr x, yf, ys, o) = % Abst"ande |
| 4107 |
|
| 4108 |
beginchar(cfchar,x,ys,yf); charic:=o; |
| 4109 |
dochar; |
| 4110 |
endchar; |
| 4111 |
beginchar(cfchar+1,x,ys,yf); charic:=o; |
| 4112 |
{{addTF(reflectedabout(up,down)); dochar;}} |
| 4113 |
endchar; |
| 4114 |
beginchar(cfchar+2,yf,x,o+x); charic:=ys; |
| 4115 |
{{addTF(rotated 270); dochar;}} |
| 4116 |
endchar; |
| 4117 |
beginchar(cfchar+3,yf,x+o,x); charic:=ys; |
| 4118 |
{{addTF(rotated 270); addTF(reflectedabout(left,right)); dochar;}} |
| 4119 |
endchar; |
| 4120 |
beginchar(cfchar+4,x,yf,ys); charic:=o; |
| 4121 |
{{addTF(reflectedabout(left,right)); dochar;}} |
| 4122 |
endchar; |
| 4123 |
beginchar(cfchar+5,x,yf,ys); charic:=o; |
| 4124 |
{{addTF(rotated 180); dochar;}} |
| 4125 |
endchar; |
| 4126 |
beginchar(cfchar+6,ys,x,x+o); charic:=yf; |
| 4127 |
{{addTF(rotated 270); addTF(reflectedabout(up,down)); dochar;}} |
| 4128 |
endchar; |
| 4129 |
beginchar(cfchar+7,ys,x+o,x); charic:=yf; |
| 4130 |
{{addTF(rotated 90); dochar;}} |
| 4131 |
endchar; |
| 4132 |
enddef; |
| 4133 |
|
| 4134 |
def twochars(expr cfchar)(text dochar)(expr ht, wd, dp) = |
| 4135 |
beginchar(cfchar,wd,ht,dp); |
| 4136 |
dochar; |
| 4137 |
endchar; |
| 4138 |
beginchar(cfchar+1,dp,wd,ht); |
| 4139 |
{{addTF(rotated 90); dochar;}} |
| 4140 |
endchar; |
| 4141 |
enddef; |
| 4142 |
|
| 4143 |
def fourchars(expr cfchar)(text dochar)(text op)(expr ht, wd, dp) = |
| 4144 |
beginchar(cfchar,wd,ht,dp); |
| 4145 |
dochar; |
| 4146 |
endchar; |
| 4147 |
beginchar(cfchar+1,dp,wd,ht); |
| 4148 |
{{addTF(rotated 90); dochar;}} |
| 4149 |
endchar; |
| 4150 |
beginchar(cfchar+2,wd,dp,ht); |
| 4151 |
{{addTF(shifted -op rotated 180); dochar;}} |
| 4152 |
endchar; |
| 4153 |
beginchar(cfchar+3,ht,wd,dp); |
| 4154 |
{{addTF(shifted -op rotated -90); dochar;}} |
| 4155 |
endchar; |
| 4156 |
enddef; |
| 4157 |
|
| 4158 |
def fourfourchars(expr cfchar)(text dochar)(text op)(expr ht, wd, dp) = |
| 4159 |
beginchar(cfchar,wd,ht,dp); |
| 4160 |
dochar; |
| 4161 |
endchar; |
| 4162 |
beginchar(cfchar+1,dp,wd,ht); |
| 4163 |
{{addTF(rotated 90); dochar;}} |
| 4164 |
endchar; |
| 4165 |
beginchar(cfchar+2,wd,dp,ht); |
| 4166 |
{{addTF(shifted -op rotated 180); dochar;}} |
| 4167 |
endchar; |
| 4168 |
beginchar(cfchar+3,ht,wd,dp); |
| 4169 |
{{addTF(shifted -op rotated -90); dochar;}} |
| 4170 |
endchar; |
| 4171 |
beginchar(cfchar+4,wd,dp,ht); |
| 4172 |
{{addTF(reflectedabout(left,right)); dochar;}} |
| 4173 |
endchar; |
| 4174 |
beginchar(cfchar+5,ht,wd,dp); |
| 4175 |
{{addTF(reflectedabout(left,right) rotated 90); dochar;}} |
| 4176 |
endchar; |
| 4177 |
beginchar(cfchar+6,wd,ht,dp); |
| 4178 |
{{addTF(reflectedabout (left,right) shifted -op rotated 180); dochar;}} |
| 4179 |
endchar; |
| 4180 |
beginchar(cfchar+7,dp,wd,ht); |
| 4181 |
{{addTF(reflectedabout(left,right) shifted -op rotated -90); dochar;}} |
| 4182 |
endchar; |
| 4183 |
enddef; |
| 4184 |
|
| 4185 |
% small description of >hshade< and >vshade< |
| 4186 |
% |
| 4187 |
% The shade macros fill areas with a 'patternpath'. |
| 4188 |
% |
| 4189 |
% >vshade< expect that the area is bound left and right by vertical |
| 4190 |
% lines, the upper and lower boundary is build by the two pathes |
| 4191 |
% >pa< and >pb<. |
| 4192 |
% |
| 4193 |
% >hshade< expect it vice versa. |
| 4194 |
% |
| 4195 |
% The >patternpath< is used to draw it on invisible points of a grid. |
| 4196 |
% These gridpoints have a distance of 'di'. |
| 4197 |
|
| 4198 |
primarydef x gridmod y = if x>0: (x mod y) else: -(-x mod y) fi enddef; |
| 4199 |
|
| 4200 |
def vshade(suffix pa, pb)(expr di, patternpath) = begingroup |
| 4201 |
path vl; |
| 4202 |
boolean ifshift; |
| 4203 |
|
| 4204 |
if not cycle patternpath: |
| 4205 |
errmessage "patternpath has to be a cyclic path!" fi; |
| 4206 |
|
| 4207 |
interim smoothing:=0; %change local only |
| 4208 |
interim autorounding:=0; |
| 4209 |
|
| 4210 |
ifshift:=true; |
| 4211 |
ydi:=round(1.41di); % round against pattern in |
| 4212 |
xdi:=round(di); % pattern |
| 4213 |
if xdi<2: errmessage "di to small! di>=2" fi; |
| 4214 |
xs:=xpart(point 0 of pa); |
| 4215 |
xe:=xpart(point infinity of pa); |
| 4216 |
if xs>xe: ye:=xe; xe:=xs; xs:=ye; fi %force xs<xe |
| 4217 |
xs:=xs+((xe-xs) mod xdi) / 2; %adjust grid horizontally |
| 4218 |
vl:=(xs,infinity)--(xs,-infinity); |
| 4219 |
oys:=ypart(pa intersectionpoint vl); |
| 4220 |
oys:=oys-.5ydi; %adjust grid vertically |
| 4221 |
for xs:=xs step xdi until xe: |
| 4222 |
vl:=(xs,infinity)--(xs,-infinity); % new cut line |
| 4223 |
ys:=ypart(pa intersectionpoint vl); |
| 4224 |
ye:=ypart(pb intersectionpoint vl); |
| 4225 |
ifshift:=not(ifshift); %shift periodically |
| 4226 |
sy:=ydi-((ys-oys) gridmod ydi); |
| 4227 |
ys:=ys+sy if ifshift: if sy-.5ydi<0:+else:-fi .5ydi fi; |
| 4228 |
for ys:=ys step if ys>ye:-fi ydi until ye: |
| 4229 |
fill patternpath shifted (xs,ys); |
| 4230 |
endfor |
| 4231 |
endfor; |
| 4232 |
endgroup |
| 4233 |
enddef; |
| 4234 |
|
| 4235 |
def hshade(suffix pa, pb)(expr di, patternpath) = begingroup |
| 4236 |
path hl; |
| 4237 |
boolean ifshift; |
| 4238 |
|
| 4239 |
if not cycle patternpath: |
| 4240 |
errmessage "patternpath has to be a cyclic path!" fi; |
| 4241 |
|
| 4242 |
interim smoothing:=0; %change local only |
| 4243 |
interim autorounding:=0; |
| 4244 |
|
| 4245 |
ifshift:=true; |
| 4246 |
xdi:=round(1.41di); % round against pattern in |
| 4247 |
ydi:=round(di); % pattern |
| 4248 |
if ydi<2: errmessage "di to small! di>=2" fi; |
| 4249 |
ys:=ypart(point 0 of pa); |
| 4250 |
ye:=ypart(point infinity of pa); |
| 4251 |
if ys>ye: xe:=ye; ye:=ys; ys:=xe; fi %force ys<ye |
| 4252 |
ys:=ys+((ye-ys) mod ydi) / 2; %adjust grid vertically |
| 4253 |
hl:=(infinity,ys)--(-infinity,ys); |
| 4254 |
oxs:=xpart(pa intersectionpoint hl); |
| 4255 |
oxs:=oxs-.5ydi; %adjust grid horizontally |
| 4256 |
for ys:=ys step ydi until ye: |
| 4257 |
hl:=(infinity,ys)--(-infinity,ys); % new cut line |
| 4258 |
xs:=xpart(pa intersectionpoint hl); |
| 4259 |
xe:=xpart(pb intersectionpoint hl); |
| 4260 |
ifshift:=not(ifshift); %shift periodically |
| 4261 |
sx:=xdi-((xs-oxs) gridmod xdi); |
| 4262 |
xs:=xs+sx if ifshift: if sx-.5xdi<0:+else:-fi .5xdi fi; |
| 4263 |
for xs:=xs step if xs>xe:-fi xdi until xe: |
| 4264 |
fill patternpath shifted (xs,ys); |
| 4265 |
endfor |
| 4266 |
endfor; |
| 4267 |
endgroup |
| 4268 |
enddef; |
| 4269 |
|
| 4270 |
|
| 4271 |
endinput; |
| 4272 |
%</csym> |
| 4273 |
% |
| 4274 |
%^^A last update: Fri 03-13-1998 |
| 4275 |
% |
| 4276 |
%<*csydiod> |
| 4277 |
input csym; |
| 4278 |
designsize:=1lLE#; |
| 4279 |
|
| 4280 |
def diode = % "uberarbeiten |
| 4281 |
numeric pl; |
| 4282 |
pl:=.5(did_lt-did_wd); |
| 4283 |
z0=(0,0); |
| 4284 |
z1=z0+(pl,0); |
| 4285 |
z2=z1+(did_wd,0); |
| 4286 |
z3=z2+(pl,0); |
| 4287 |
z4-z5=z6-z7=(0,did_ht); |
| 4288 |
z1=.5[z4,z5]; |
| 4289 |
z2=.5[z6,z7]; |
| 4290 |
z8=z4+(did_zlt,0); |
| 4291 |
z9=z0+(0,thy_ht); |
| 4292 |
|
| 4293 |
z10=.35[z5,z7]; |
| 4294 |
z11=z10-(.5Dcap_spc,0); |
| 4295 |
z12=z10+(.5Dcap_spc,0); |
| 4296 |
y13=y15; y14=y16; |
| 4297 |
x13=x14; x15=x16; |
| 4298 |
y13-y14=Dcap_ht; |
| 4299 |
z11=.5[z13,z14]; |
| 4300 |
z12=.5[z15,z16]; |
| 4301 |
z17=z11-(Dcap_wd,0); |
| 4302 |
z18=z12+(Dcap_wd,0); |
| 4303 |
|
| 4304 |
pickup pensquare scaled normalline; |
| 4305 |
draw z0--z3; |
| 4306 |
draw z4--z5; |
| 4307 |
draw z1--z6--z7--cycle; |
| 4308 |
enddef; |
| 4309 |
|
| 4310 |
def Dcap = |
| 4311 |
pickup pensquare scaled normalline; |
| 4312 |
draw z17--z11; |
| 4313 |
draw z13--z14; |
| 4314 |
draw z15--z16; |
| 4315 |
draw z12--z18; |
| 4316 |
enddef; |
| 4317 |
|
| 4318 |
def led_arrows = % "uberarbeiten |
| 4319 |
numeric pl; |
| 4320 |
numeric x[],y[]; |
| 4321 |
transform arr_a,arr_b; |
| 4322 |
pickup pencircle scaled thickline; |
| 4323 |
pl:=.5(did_lt-did_wd); |
| 4324 |
z0=(0,0); |
| 4325 |
z4=z0+(pl,0); |
| 4326 |
z1=z0+(led_lt,0); |
| 4327 |
(z1-z2)=(led_wd,0) rotated led_phi; |
| 4328 |
(z1-z3)=(led_wd,0) rotated -led_phi; |
| 4329 |
arr_a:=identity rotated led_psi shifted |
| 4330 |
(z4+(led_spx+.5led_spc*cosd(led_psi),led_spy-.5led_spc*sind(led_psi))); |
| 4331 |
arr_b:=identity rotated led_psi shifted |
| 4332 |
(z4+(led_spx-.5led_spc*cosd(led_psi),led_spy+.5led_spc*sind(led_psi))); |
| 4333 |
draw (z0--z1) transformed arr_a; |
| 4334 |
draw (z0--z1) transformed arr_b; |
| 4335 |
fill (z2--z1--z3--cycle) transformed arr_a; |
| 4336 |
fill (z2--z1--z3--cycle) transformed arr_b; |
| 4337 |
enddef; |
| 4338 |
|
| 4339 |
"Diode"; |
| 4340 |
fourchars(0)(diode)(z3)(.5did_ht#,did_lt#,.5did_ht#); |
| 4341 |
|
| 4342 |
"Z-Diode"; |
| 4343 |
fourchars(4)(diode; draw z4--z8)(z3)(.5did_ht#,did_lt#,.5did_ht#); |
| 4344 |
|
| 4345 |
"LED"; |
| 4346 |
fourfourchars(8)(diode; lightarrows(.5[z1,z6]+(0,.5lLE),120))(z3) |
| 4347 |
(.5did_ht#+.5led_spy#+led_lt#*sind(led_psi),did_lt#,.5did_ht#); |
| 4348 |
|
| 4349 |
"Kapazit"&ditto&"atsdiode"; |
| 4350 |
fourchars(16)(diode; Dcap)(z3)(.5did_ht#,did_lt#,.65did_ht#); |
| 4351 |
|
| 4352 |
"Thyristor"; |
| 4353 |
|
| 4354 |
end; |
| 4355 |
%</csydiod> |
| 4356 |
%^^A last update: Fri 03-13-1998 |
| 4357 |
% |
| 4358 |
%<*csyrest> |
| 4359 |
input csym; |
| 4360 |
designsize:=.5lLE#; |
| 4361 |
|
| 4362 |
def gaslamp = |
| 4363 |
z0=(0,0); |
| 4364 |
z4=z0+(.5,0)*lLE; |
| 4365 |
y4=y3; |
| 4366 |
x2=x1; |
| 4367 |
x3=x4+3lLE; |
| 4368 |
y2=y1+2lLE; |
| 4369 |
y4=.5[y1,y2]; |
| 4370 |
x1=.5[x4,x3]; |
| 4371 |
|
| 4372 |
x5=x0+1.1lLE; |
| 4373 |
y5=y0; |
| 4374 |
x7=x6=x5; y7-y6=.5lLE; |
| 4375 |
.5[y7,y6]=y0; |
| 4376 |
|
| 4377 |
|
| 4378 |
y8=y9=y0; |
| 4379 |
x8=x0+4lLE; |
| 4380 |
|
| 4381 |
x9=x8-1.1lLE; |
| 4382 |
|
| 4383 |
pickup pencircle scaled normalline; |
| 4384 |
draw superellipse(z3,z2,z4,z1,.75); |
| 4385 |
draw z0--z5; |
| 4386 |
draw z6--z7; |
| 4387 |
draw z8--z9; |
| 4388 |
pickup pencircle scaled .3lLE; |
| 4389 |
drawdot z9; |
| 4390 |
enddef; |
| 4391 |
|
| 4392 |
def switch = %"uberarbeiten |
| 4393 |
numeric pl; |
| 4394 |
pl:=swt_lt*swt_dis; |
| 4395 |
sl:=(1-2swt_dis)*swt_lt; |
| 4396 |
z0=(0,0); |
| 4397 |
z1=z0+(pl,0); |
| 4398 |
z2=z1+((sl,0) rotated swt_phi); |
| 4399 |
z3=z1+(swt_ind*sl,0); |
| 4400 |
z4=z0+(swt_lt,0); |
| 4401 |
z5=z3+(0,swt_slt); |
| 4402 |
pickup pensquare scaled normalline; |
| 4403 |
draw z0--z1--z2; |
| 4404 |
draw z3--z4; |
| 4405 |
draw z3--z5; |
| 4406 |
enddef; |
| 4407 |
|
| 4408 |
|
| 4409 |
def dswitch = |
| 4410 |
z0=(0,0); |
| 4411 |
z1=dsw_t[z0,z0+(dsw_wd,0)]; |
| 4412 |
x2=x3=x4=x5=x0+((1-dsw_c)*dsw_wd); |
| 4413 |
y0=.5[y2,y3]=.5[y4,y5]; |
| 4414 |
y2-y3=dsw_ht; |
| 4415 |
y2-y4=dsw_cc*dsw_ht; |
| 4416 |
y2=y6; y3=y7; |
| 4417 |
x6-x3=x7-x3=dsw_c*dsw_wd; |
| 4418 |
x8=x1+dsw_ov+((1-dsw_c-dsw_t)*dsw_wd); |
| 4419 |
y8=sind(dsw_phi)*x8/cosd(dsw_phi); |
| 4420 |
pickup pensquare scaled normalline; |
| 4421 |
draw z0--z1--z8; |
| 4422 |
draw z4--z2--z6; |
| 4423 |
draw z5--z3--z7; |
| 4424 |
enddef; |
| 4425 |
|
| 4426 |
def circle = % "uberarbeiten |
| 4427 |
numeric pl; |
| 4428 |
pl:=.5cir_lt-cir_ht; |
| 4429 |
z0=(0,0); |
| 4430 |
z1=z0+(pl,0); |
| 4431 |
z2=z0+(.5cir_lt,0); |
| 4432 |
z3=z1+(2cir_ht,0); |
| 4433 |
z4=z3+(pl,0); |
| 4434 |
pickup pensquare scaled normalline; |
| 4435 |
draw z0--z1; |
| 4436 |
draw z3--z4; |
| 4437 |
pickup pencircle scaled thickline; |
| 4438 |
draw fullcircle scaled 2cir_ht shifted z2; |
| 4439 |
enddef; |
| 4440 |
|
| 4441 |
def lamp = |
| 4442 |
circle |
| 4443 |
z10-z11=(2cir_ht,0) rotated 45; |
| 4444 |
z12-z13=(2cir_ht,0) rotated -45; |
| 4445 |
.5[z10,z11]=z2=.5[z12,z13]; |
| 4446 |
pickup pencircle scaled normalline; |
| 4447 |
draw z10--z11; |
| 4448 |
draw z12--z13; |
| 4449 |
enddef; |
| 4450 |
|
| 4451 |
def circle_var = |
| 4452 |
circle; |
| 4453 |
pickup pencircle scaled thinline; |
| 4454 |
noarrowTF; |
| 4455 |
arrow(z2,cir_ara,cir_arb,cir_phi,arr_lt,arr_phi)(); |
| 4456 |
enddef; |
| 4457 |
|
| 4458 |
def usource = %"uberarbeiten |
| 4459 |
numeric pl; |
| 4460 |
pl:=.5(uso_lt-uso_spc); |
| 4461 |
z0=(0,0); |
| 4462 |
z1=z0+(pl,0); |
| 4463 |
z2=z1+(uso_spc,0); |
| 4464 |
z3=z2+(pl,0); |
| 4465 |
pickup pensquare scaled normalline; |
| 4466 |
draw z0--z1; |
| 4467 |
draw z2--z3; |
| 4468 |
z1=.5[z4,z5]; x4-x5=0; y5-y4=uso_pls; |
| 4469 |
z2=.5[z6,z7]; x6-x7=0; y7-y6=uso_min; |
| 4470 |
pickup pensquare scaled thickline; |
| 4471 |
draw z4--z5; |
| 4472 |
draw z6--z7; |
| 4473 |
enddef; |
| 4474 |
|
| 4475 |
def usource_var = |
| 4476 |
usource; |
| 4477 |
noarrowTF; |
| 4478 |
pickup pencircle scaled thinline; |
| 4479 |
arrow(.5[z1,z2],uso_ara,cir_arb,uso_phi,arr_lt,arr_phi)(); |
| 4480 |
enddef; |
| 4481 |
|
| 4482 |
|
| 4483 |
def isource = %"uberarbeiten |
| 4484 |
numeric pl; |
| 4485 |
pl:=.5(iso_lt-(4-iso_dis)*iso_rad); |
| 4486 |
z0=(0,0); |
| 4487 |
z1=z0+(pl,0); |
| 4488 |
z2=z1+(iso_rad,0); |
| 4489 |
z3=z2+((2-iso_dis)*iso_rad,0); |
| 4490 |
z4=z3+(iso_rad,0); |
| 4491 |
z5=z4+(pl,0); |
| 4492 |
pickup pensquare scaled normalline; |
| 4493 |
draw z0--z1; |
| 4494 |
draw z4--z5; |
| 4495 |
pickup pencircle scaled thickline; |
| 4496 |
draw fullcircle scaled (2*iso_rad) shifted z2; |
| 4497 |
draw fullcircle scaled (2*iso_rad) shifted z3; |
| 4498 |
enddef; |
| 4499 |
|
| 4500 |
def isource_var = |
| 4501 |
isource; |
| 4502 |
noarrowTF; |
| 4503 |
pickup pencircle scaled thinline; |
| 4504 |
arrow(.5[z2,z3],iso_ara,iso_arb,iso_phi,arr_lt,arr_phi)(); |
| 4505 |
enddef; |
| 4506 |
|
| 4507 |
def value = % "uberarbeiten |
| 4508 |
z0=(0,0); |
| 4509 |
z1=z0+(val_lt,0); |
| 4510 |
pickup pensquare scaled normalline; |
| 4511 |
draw z0--z1; |
| 4512 |
z2=val_lft[z0,z1]; |
| 4513 |
z3=val_rht[z0,z1]; |
| 4514 |
triangle(z2,abs(z3-z2),val_phi,0); |
| 4515 |
enddef; |
| 4516 |
|
| 4517 |
def coil = %"uberarbeiten |
| 4518 |
numeric pl; |
| 4519 |
pl:=.5(coi_lt-2coi_num*coi_rad); |
| 4520 |
z0=(0,0); |
| 4521 |
z1=z0+(pl,0); |
| 4522 |
z2=z1+(coi_rad,0); |
| 4523 |
for m=1 upto coi_num-1: z[m+2]=z[m+1]+(2coi_rad,0); endfor; |
| 4524 |
z[2+coi_num]=z[1+coi_num]+(coi_rad,0); |
| 4525 |
z[3+coi_num]=z[2+coi_num]+(pl,0); |
| 4526 |
pickup pensquare scaled normalline; |
| 4527 |
draw z0--z1; |
| 4528 |
draw z[2+coi_num]--z[3+coi_num]; |
| 4529 |
pickup pencircle scaled normalline; |
| 4530 |
for m=1 upto coi_num: draw halfcircle scaled 2coi_rad shifted z[m+1]; endfor; |
| 4531 |
enddef; |
| 4532 |
|
| 4533 |
def crystal = %"uberarbeiten |
| 4534 |
pickup pensquare scaled normalline; |
| 4535 |
numeric pl; |
| 4536 |
pl:=.5(cry_lt-2cry_spc-cry_wd); |
| 4537 |
z0=(0,0); z1=z0+(pl,0); |
| 4538 |
z2=z1+(cry_spc,0); |
| 4539 |
z3=z2+(cry_wd,0); |
| 4540 |
z4=z3+(cry_spc,0); |
| 4541 |
z5=z4+(pl,0); |
| 4542 |
z6-z7=z8-z9=z10-z11=z12-z13=(0,cry_ht); |
| 4543 |
z2=.5[z6,z7]; z3=.5[z8,z9]; z1=.5[z10,z11]; z4=.5[z12,z13]; |
| 4544 |
draw z0--z1; draw z4--z5; draw z10--z11; draw z12--z13; |
| 4545 |
draw z7--z9--z8--z6--cycle; |
| 4546 |
enddef; |
| 4547 |
|
| 4548 |
def inout = % "uberarbeiten |
| 4549 |
z0=(ioc_lt,0); |
| 4550 |
pickup pensquare scaled normalline; |
| 4551 |
z2=z0+(ioc_lt,0); |
| 4552 |
lft(z1)=z0+(.5ioc_dia,0); |
| 4553 |
draw z1--z2; |
| 4554 |
enddef; |
| 4555 |
|
| 4556 |
def minout = |
| 4557 |
z0=(0,0); |
| 4558 |
z1=z0+(ioc_lt,0); |
| 4559 |
pickup pensquare scaled normalline; |
| 4560 |
arrow(z0,0,ioc_lt,180,ioc_arr,ioc_phi)(pickup pencircle scaled normalline); |
| 4561 |
enddef; |
| 4562 |
|
| 4563 |
def ground = % Masse z0 z11 |
| 4564 |
z0=(0,0); x1=x0=x2=x3; |
| 4565 |
y0-y1=gnd_ht; |
| 4566 |
y1-y2=y2-y3=gnd_spc; |
| 4567 |
y4=y1=y10; y2=y6; y3=y8; |
| 4568 |
z1=.5[z4,z5]; x5-x4=gnd_wd; |
| 4569 |
z1=.5[z10,z11]; x11-x10=GND_wd; |
| 4570 |
z2=.5[z6,z7]; x7-x6=gnd_wd*gnd_q; |
| 4571 |
z3=.5[z8,z9]; x9-x8=gnd_wd*gnd_q*gnd_q*gnd_q; |
| 4572 |
enddef; |
| 4573 |
|
| 4574 |
"Spule"; |
| 4575 |
fourchars(0)(coil)(z[3+coi_num])(coi_ht#,coi_lt#,0); |
| 4576 |
|
| 4577 |
"Quarz"; |
| 4578 |
twochars(4)(crystal)(.5cry_ht#,cry_lt#,.5cry_ht#); |
| 4579 |
|
| 4580 |
"Lampe"; |
| 4581 |
twochars(6)(lamp)(cir_ht#,cir_lt#,cir_ht#); |
| 4582 |
|
| 4583 |
"Kreise mit Anschl"&ditto&"ussen"; |
| 4584 |
twochars(8)(circle)(cir_ht#,cir_lt#,cir_ht#); |
| 4585 |
|
| 4586 |
"Kreise mit Anschl"&ditto&"ussen variabel"; |
| 4587 |
twochars(10)(circle_var)(cir_ht#,cir_lt#,cir_ht#); |
| 4588 |
|
| 4589 |
"Stromquelle"; |
| 4590 |
twochars(12)(isource)(iso_ht#,iso_lt#,iso_ht#); |
| 4591 |
|
| 4592 |
"Stromquelle variabel"; |
| 4593 |
twochars(14)(isource_var)(iso_ht#,iso_lt#,iso_ht#); |
| 4594 |
|
| 4595 |
"Spannungsquelle"; |
| 4596 |
fourchars(16)(usource)(z3)(uso_ht#,uso_lt#,uso_ht#); |
| 4597 |
|
| 4598 |
"Spannungsquelle variabel"; |
| 4599 |
fourchars(20)(usource_var)(z3)(uso_ht#,uso_lt#,uso_ht#); |
| 4600 |
|
| 4601 |
"Schalter"; |
| 4602 |
twochars(24)(switch)(swt_ht#,swt_lt#,0); |
| 4603 |
|
| 4604 |
"Umschalter"; |
| 4605 |
eightchars(32)(dswitch)(dsw_wd#,.5dsw_ht#,.5dsw_ht#,0); |
| 4606 |
|
| 4607 |
"Stromquelle variante"; |
| 4608 |
twochars(44)(circle; |
| 4609 |
pickup pencircle scaled normalline; |
| 4610 |
draw z1--z3;)(cir_ht#,cir_lt#,cir_ht#); |
| 4611 |
|
| 4612 |
"Spannungsquelle variante"; |
| 4613 |
twochars(46)(circle; |
| 4614 |
pickup pencircle scaled normalline; |
| 4615 |
draw (z1--z3) rotatedaround (z2,90);)(cir_ht#,cir_lt#,cir_ht#); |
| 4616 |
|
| 4617 |
|
| 4618 |
"Gas-Lamp"; |
| 4619 |
fourchars(40)(gaslamp)(z0)(1.5lLE#,4lLE#,1.5lLE#); |
| 4620 |
|
| 4621 |
"Stromquelle variante"; |
| 4622 |
twochars(44)(circle; |
| 4623 |
pickup pencircle scaled normalline; |
| 4624 |
draw z1--z3;)(cir_ht#,cir_lt#,cir_ht#); |
| 4625 |
|
| 4626 |
"Spannungsquelle variante"; |
| 4627 |
twochars(46)(circle; |
| 4628 |
pickup pencircle scaled normalline; |
| 4629 |
draw (z1--z3) rotatedaround (z2,90);)(cir_ht#,cir_lt#,cir_ht#); |
| 4630 |
|
| 4631 |
"Anschl"&ditto&"usse Pfeil"; |
| 4632 |
fourchars(232) |
| 4633 |
(minout;)(z1)(.5ioc_ht#,2ioc_lt#,.5ioc_ht#); |
| 4634 |
|
| 4635 |
"Anschl"&ditto&"usse leer"; |
| 4636 |
fourchars(240) |
| 4637 |
(inout; |
| 4638 |
pickup pencircle scaled thinline; |
| 4639 |
draw fullcircle scaled ioc_dia shifted z0; |
| 4640 |
)(z2)(.5ioc_ht#,2ioc_lt#,.5ioc_ht#); |
| 4641 |
|
| 4642 |
"Anschl"&ditto&"usse voll"; |
| 4643 |
fourchars(244) |
| 4644 |
(inout; |
| 4645 |
pickup pencircle scaled ioc_dia; |
| 4646 |
draw z0; |
| 4647 |
)(z2)(.5ioc_ht#,2ioc_lt#,.5ioc_ht#); |
| 4648 |
|
| 4649 |
"Str"&ditto&"ome"; |
| 4650 |
fourchars(248)(value;)(z1)(val_ht#,val_lt#,val_ht#); |
| 4651 |
|
| 4652 |
"wwire half R"; |
| 4653 |
beginchar(112,.5lLE#,0pt,0pt); |
| 4654 |
z0=(0,0); |
| 4655 |
y4-y3=y2-y1=ww_spc; |
| 4656 |
x3-x1=.5lLE; |
| 4657 |
x0=x1=x2; |
| 4658 |
x3=x4; |
| 4659 |
y0=.5[y1,y2]=.5[y3,y4]; |
| 4660 |
pickup pensquare scaled normalline; |
| 4661 |
draw z1--z3; |
| 4662 |
draw z2--z4; |
| 4663 |
endchar; |
| 4664 |
|
| 4665 |
"wwire R"; |
| 4666 |
beginchar(113,1lLE#,0pt,0pt); |
| 4667 |
z0=(0,0); |
| 4668 |
y4-y3=y2-y1=ww_spc; |
| 4669 |
x3-x1=1lLE; |
| 4670 |
x0=x1=x2; |
| 4671 |
x3=x4; |
| 4672 |
y0=.5[y1,y2]=.5[y3,y4]; |
| 4673 |
pickup pensquare scaled normalline; |
| 4674 |
draw z1--z3; |
| 4675 |
draw z2--z4; |
| 4676 |
endchar; |
| 4677 |
|
| 4678 |
"wwire half L"; |
| 4679 |
beginchar(114,.5lLE#,0pt,0pt); |
| 4680 |
z0=(0,0); |
| 4681 |
y4-y3=y2-y1=ww_spc; |
| 4682 |
x3-x1=.5lLE; |
| 4683 |
x0=x3=x4; |
| 4684 |
x1=x2; |
| 4685 |
y0=.5[y1,y2]=.5[y3,y4]; |
| 4686 |
pickup pensquare scaled normalline; |
| 4687 |
draw z1--z3; |
| 4688 |
draw z2--z4; |
| 4689 |
endchar; |
| 4690 |
|
| 4691 |
"wwire half U"; |
| 4692 |
beginchar(115,0pt,.5lLE#,0pt); |
| 4693 |
z0=(0,0); |
| 4694 |
x4-x3=x2-x1=ww_spc; |
| 4695 |
y3-y1=.5lLE; |
| 4696 |
y0=y1=y2; |
| 4697 |
y3=y4; |
| 4698 |
x0=.5[x1,x2]=.5[x3,x4]; |
| 4699 |
pickup pensquare scaled normalline; |
| 4700 |
draw z1--z3; |
| 4701 |
draw z2--z4; |
| 4702 |
endchar; |
| 4703 |
|
| 4704 |
"wwire U"; |
| 4705 |
beginchar(116,0pt,1lLE#,0pt); |
| 4706 |
z0=(0,0); |
| 4707 |
x4-x3=x2-x1=ww_spc; |
| 4708 |
y3-y1=1lLE; |
| 4709 |
y0=y1=y2; |
| 4710 |
y3=y4; |
| 4711 |
x0=.5[x1,x2]=.5[x3,x4]; |
| 4712 |
pickup pensquare scaled normalline; |
| 4713 |
draw z1--z3; |
| 4714 |
draw z2--z4; |
| 4715 |
endchar; |
| 4716 |
|
| 4717 |
"wwire half D"; |
| 4718 |
beginchar(117,0pt,0pt,.5lLE#); |
| 4719 |
z0=(0,0); |
| 4720 |
x4-x3=x2-x1=ww_spc; |
| 4721 |
y3-y1=.5lLE; |
| 4722 |
y0=y3=y4; |
| 4723 |
y1=y2; |
| 4724 |
x0=.5[x1,x2]=.5[x3,x4]; |
| 4725 |
pickup pensquare scaled normalline; |
| 4726 |
draw z1--z3; |
| 4727 |
draw z2--z4; |
| 4728 |
endchar; |
| 4729 |
|
| 4730 |
|
| 4731 |
"dashed halfline R"; |
| 4732 |
beginchar(120,.5lLE#,0pt,0pt); |
| 4733 |
z0=(0,0); |
| 4734 |
z1=z0+(.25lLE,0); |
| 4735 |
pickup pensquare scaled normalline; |
| 4736 |
draw z0--z1; |
| 4737 |
endchar; |
| 4738 |
|
| 4739 |
"dashed line R"; |
| 4740 |
beginchar(121,1lLE#,0pt,0pt); |
| 4741 |
z0=(0,0); |
| 4742 |
z1=z0+(1lLE,0); |
| 4743 |
z2=.25[z0,z1]; |
| 4744 |
z3=.75[z0,z1]; |
| 4745 |
pickup pensquare scaled normalline; |
| 4746 |
draw z2--z3; |
| 4747 |
endchar; |
| 4748 |
|
| 4749 |
"dashed halfline L"; |
| 4750 |
beginchar(122,.5lLE#,0pt,0pt); |
| 4751 |
z0=(0,0); |
| 4752 |
z1=z0-(.25lLE,0); |
| 4753 |
pickup pensquare scaled normalline; |
| 4754 |
draw z0--z1; |
| 4755 |
endchar; |
| 4756 |
|
| 4757 |
"dashed halfline U"; |
| 4758 |
beginchar(123,0pt,.5lLE#,0pt); |
| 4759 |
z0=(0,0); |
| 4760 |
z1=z0+(0,.25lLE); |
| 4761 |
pickup pensquare scaled normalline; |
| 4762 |
draw z0--z1; |
| 4763 |
endchar; |
| 4764 |
|
| 4765 |
"dashed line U"; |
| 4766 |
beginchar(124,0pt,1lLE#,0pt); |
| 4767 |
z0=(0,0); |
| 4768 |
z1=z0+(0,1lLE); |
| 4769 |
z2=.25[z0,z1]; |
| 4770 |
z3=.75[z0,z1]; |
| 4771 |
pickup pensquare scaled normalline; |
| 4772 |
draw z2--z3; |
| 4773 |
endchar; |
| 4774 |
|
| 4775 |
"dashed halfline D"; |
| 4776 |
beginchar(125,0pt,0pt,.5lLE#); |
| 4777 |
z0=(0,0); |
| 4778 |
z1=z0-(0,.25lLE); |
| 4779 |
pickup pensquare scaled normalline; |
| 4780 |
draw z0--z1; |
| 4781 |
endchar; |
| 4782 |
|
| 4783 |
"Linie horizontal halb R"; |
| 4784 |
beginchar(128,.5lLE#,0pt,0pt); |
| 4785 |
z0=(0,0); |
| 4786 |
z1=z0+(.5lLE,0); |
| 4787 |
pickup pensquare scaled normalline; |
| 4788 |
draw z0--z1; |
| 4789 |
endchar; |
| 4790 |
|
| 4791 |
"Linie horizontal R"; |
| 4792 |
beginchar(129,1lLE#,0pt,0pt); |
| 4793 |
z0=(0,0); |
| 4794 |
z1=z0+(1lLE,0); |
| 4795 |
pickup pensquare scaled normalline; |
| 4796 |
draw z0--z1; |
| 4797 |
endchar; |
| 4798 |
|
| 4799 |
"Linie horizontal halb L"; |
| 4800 |
beginchar(130,.5lLE#,0pt,0pt); |
| 4801 |
z0=(0,0); |
| 4802 |
z1=z0-(.5lLE,0); |
| 4803 |
pickup pensquare scaled normalline; |
| 4804 |
draw z0--z1; |
| 4805 |
endchar; |
| 4806 |
|
| 4807 |
"Linie vertikal halb U"; |
| 4808 |
beginchar(131,0pt,.5lLE#,0pt); |
| 4809 |
z0=(0,0); |
| 4810 |
z1=z0+(0,.5lLE); |
| 4811 |
pickup pensquare scaled normalline; |
| 4812 |
draw z0--z1; |
| 4813 |
endchar; |
| 4814 |
|
| 4815 |
"Linie vertikal U"; |
| 4816 |
beginchar(132,0pt,1lLE#,0pt); |
| 4817 |
z0=(0,0); |
| 4818 |
z1=z0+(0,1lLE); |
| 4819 |
pickup pensquare scaled normalline; |
| 4820 |
draw z0--z1; |
| 4821 |
endchar; |
| 4822 |
|
| 4823 |
"Linie vertikal halb D"; |
| 4824 |
beginchar(133,0pt,0pt,.5lLE#); |
| 4825 |
z0=(0,0); |
| 4826 |
z1=z0-(0,.5lLE); |
| 4827 |
pickup pensquare scaled normalline; |
| 4828 |
draw z0--z1; |
| 4829 |
endchar; |
| 4830 |
|
| 4831 |
"B"&ditto&"undel horizontal"; |
| 4832 |
beginchar(134,0,.8bnd_lt#,0pt); |
| 4833 |
z0=(0,0); |
| 4834 |
z0=.5[z2,z3]; |
| 4835 |
z3-z2=(bnd_lt,0) rotated bnd_phi; |
| 4836 |
pickup pencircle scaled thinline; |
| 4837 |
draw z2--z3; |
| 4838 |
endchar; |
| 4839 |
|
| 4840 |
"B"&ditto&"undel vertikal"; |
| 4841 |
beginchar(135,.8bnd_lt#,0pt,0pt); |
| 4842 |
z0=(0,0); |
| 4843 |
z0=.5[z2,z3]; |
| 4844 |
z3-z2=(bnd_lt,0) rotated (90-bnd_phi); |
| 4845 |
pickup pencircle scaled thinline; |
| 4846 |
draw z2--z3; |
| 4847 |
endchar; |
| 4848 |
|
| 4849 |
"Linie fett horizontal R"; |
| 4850 |
beginchar(136,.5lLE#,0pt,0pt); |
| 4851 |
z0=(0,0); |
| 4852 |
z1=z0+(.5lLE,0); |
| 4853 |
pickup pensquare scaled 2normalline; |
| 4854 |
draw z0--z1; |
| 4855 |
endchar; |
| 4856 |
|
| 4857 |
"Linie fett horizontal R"; |
| 4858 |
beginchar(137,1lLE#,0pt,0pt); |
| 4859 |
z0=(0,0); |
| 4860 |
z1=z0+(1lLE,0); |
| 4861 |
pickup pensquare scaled 2normalline; |
| 4862 |
draw z0--z1; |
| 4863 |
endchar; |
| 4864 |
|
| 4865 |
"Linie fett horizontal halb L"; |
| 4866 |
beginchar(138,.5lLE#,0pt,0pt); |
| 4867 |
z0=(0,0); |
| 4868 |
z1=z0-(.5lLE,0); |
| 4869 |
pickup pensquare scaled 2normalline; |
| 4870 |
draw z0--z1; |
| 4871 |
endchar; |
| 4872 |
|
| 4873 |
"Linie fett vertikal halb U"; |
| 4874 |
beginchar(139,0pt,.5lLE#,0pt); |
| 4875 |
z0=(0,0); |
| 4876 |
z1=z0+(0,.5lLE); |
| 4877 |
pickup pensquare scaled 2normalline; |
| 4878 |
draw z0--z1; |
| 4879 |
endchar; |
| 4880 |
|
| 4881 |
"Linie fett vertikal U"; |
| 4882 |
beginchar(140,0pt,1lLE#,0pt); |
| 4883 |
z0=(0,0); |
| 4884 |
z1=z0+(0,1lLE); |
| 4885 |
pickup pensquare scaled 2normalline; |
| 4886 |
draw z0--z1; |
| 4887 |
endchar; |
| 4888 |
|
| 4889 |
"Linie fett vertikal halb D"; |
| 4890 |
beginchar(141,0pt,0pt,.5lLE#); |
| 4891 |
z0=(0,0); |
| 4892 |
z1=z0-(0,.5lLE); |
| 4893 |
pickup pensquare scaled 2normalline; |
| 4894 |
draw z0--z1; |
| 4895 |
endchar; |
| 4896 |
|
| 4897 |
"Oscillograph"; |
| 4898 |
beginchar(142,osc_dia#,.5osc_dia#,.5osc_dia#); |
| 4899 |
z0=(0,0); |
| 4900 |
z1=z0; |
| 4901 |
z5=.5[z1,z3]=.5[z2,z4]; |
| 4902 |
x2=x4; |
| 4903 |
y1=y3; |
| 4904 |
x3-x1=y4-y2=osc_dia; |
| 4905 |
.5osc_gt+osc_spc+osc_stm=.5osc_dia; |
| 4906 |
osc_stm=osc_t*osc_gt; |
| 4907 |
z6=z1+(osc_stm,0); |
| 4908 |
z7=z2+(0,osc_stm); |
| 4909 |
z8=z3+(-osc_stm,0); |
| 4910 |
z9=z4+(0,-osc_stm); |
| 4911 |
z6=.5[z10,z11]; x10=x11; x16-x17=y14-y15=x12-x13=y11-y10=osc_gt; |
| 4912 |
z7=.5[z12,z13]; y12=y13; |
| 4913 |
z8=.5[z14,z15]; x14=x15; |
| 4914 |
z9=.5[z16,z17]; y16=y17; |
| 4915 |
pickup pensquare scaled normalline; %drawing style by Andreas Tille |
| 4916 |
draw z1--z6; %code rewritten by SeTa |
| 4917 |
draw z2--z7; |
| 4918 |
draw z3--z8; |
| 4919 |
draw z4--z9; |
| 4920 |
pickup pencircle scaled normalline; |
| 4921 |
draw fullcircle scaled osc_dia shifted z5; |
| 4922 |
pickup pensquare scaled thickline; |
| 4923 |
draw z10--z11; |
| 4924 |
draw z12--z13; |
| 4925 |
draw z14--z15; |
| 4926 |
draw z16--z17; |
| 4927 |
endchar; |
| 4928 |
|
| 4929 |
"a small grey elephant: Thanks to Andreas Tille."; |
| 4930 |
% |
| 4931 |
% The code is a little bit crazy. |
| 4932 |
% |
| 4933 |
LE#:=.03mm#; |
| 4934 |
define_pixels(LE); |
| 4935 |
numeric nPnt; |
| 4936 |
def p(expr px,py) = x[nPnt]:=px*LE; y[nPnt]:=py*LE; nPnt:=nPnt+1 enddef; |
| 4937 |
|
| 4938 |
beginchar(252,540LE#,265LE#,274LE#); |
| 4939 |
pickup pencircle scaled 0.4pt; |
| 4940 |
path a, b; |
| 4941 |
picture cutpic; |
| 4942 |
nPnt:=0; |
| 4943 |
|
| 4944 |
p( 0, 0); % copyright by Sebastian Tannert |
| 4945 |
p( 0, 18); % Please think of the hard work! |
| 4946 |
% |
| 4947 |
p( -2, 46);p( -3, 92);p( 8,117);p( 28,152); |
| 4948 |
p( 38,171);p( 71,195);p(107,218);p(138,240);p(159,255);p(181,261); |
| 4949 |
p(193,264);p(211,268);p(231,263);p(249,264);p(273,259);p(292,255); |
| 4950 |
p(311,249);p(336,240);p(380,222);p(414,208);p(437,198);p(449,193); |
| 4951 |
p(461,190);p(473,185);p(490,173);p(506,157);p(519,125);p(526, 91); |
| 4952 |
p(530, 56);p(530, 35);p(523, 17);p(518, 1);p(509,-22);p(511,-46); |
| 4953 |
p(515,-71);p(514,-96);p(512,-112);p(511,-135);p(507,-150);p(498,-171); |
| 4954 |
p(485,-184);p(465,-197);p(448,-200);p(429,-194);p(418,-177);p(414,-168); |
| 4955 |
p(420,-159);p(427,-157);p(435,-163);p(439,-171);p(449,-164);p(461,-165); |
| 4956 |
p(470,-152);p(476,-139);p(476,-118);p(475,-97);p(465,-76);p(450,-62); |
| 4957 |
p(442,-50);p(427,-36);p(417,-29);p(409,-27);p(392,-12);p(383,-10); |
| 4958 |
p(374,-18);p(370,-34);p(363,-58);p(347,-92);p(343,-106);p(341,-126); |
| 4959 |
p(330,-162);p(323,-196);p(322,-210);p(317,-237);p(327,-257);p(325,-268); |
| 4960 |
p(310,-270);p(301,-272);p(284,-266);p(269,-258);p(268,-236);p(270,-210); |
| 4961 |
p(282,-185);p(300,-151);p(315,-119);p(322,-93);p(325,-79);p(326,-63); |
| 4962 |
p(315,-75);p(303,-101);p(292,-134);p(281,-164);p(269,-189);p(258,-220); |
| 4963 |
p(259,-250);p(260,-266);p(252,-269);p(235,-260);p(221,-266);p(203,-261); |
| 4964 |
p(194,-242);p(201,-227);p(206,-213);p(207,-190);p(215,-162);p(222,-147); |
| 4965 |
p(225,-123);p(229,-96);p(234,-77);p(234,-65);p(236,-47);p(236,-30); |
| 4966 |
p(236,-12);p(240,6);p(248,19);p(264,37);p(146,41);p(158,24); |
| 4967 |
p(176,-3);p(188,-29);p(193,-53);p(185,-80);p(175,-106);p(165,-137); |
| 4968 |
p(152,-173);p(143,-202);p(142,-222);p(136,-232);p(141,-253);p(132,-255); |
| 4969 |
p(125,-255);p(105,-240);p(91,-239);p(75,-228);p(68,-205);p(70,-178); |
| 4970 |
p(85,-156);p(96,-127);p(100,-112);p(95,-88);p(79,-62);p(60,-38); |
| 4971 |
p(48,-16);p(36,18);p(28,63);p(24,41);p(28,17);p(29,-6);p(31,-32); |
| 4972 |
p(26,-43);p(17,-65);p(15,-83);p(12,-106);p(7,-126);p(0,-141); |
| 4973 |
p(-9,-147);p(-16,-131);p(-24,-110);p(-22,-94);p(-17,-75);p(-6,-55); |
| 4974 |
p(-2,-34);p(2,-19);p(190,-63);p(209,-75);p(234,-69);p(31,-32); |
| 4975 |
p(31,-44);p(26,-67);p(37,-95);p(45,-117);p(43,-158);p(38,-193); |
| 4976 |
p(25,-224);p(29,-249);p(52,-266);p(71,-264);p(88,-266);p(113,-273); |
| 4977 |
p(133,-273);p(138,-268);p(132,-255);p(457,48);p(462,30);p(481,21); |
| 4978 |
p(477,40);p(449,32);p(456,11);p(478,5);p(464,60);p(486,61); |
| 4979 |
p(499,37);p(363,93);p(352,110);p(348,129);p(358,149);p(386,162); |
| 4980 |
p(414,173);p(427,178);p(443,167);p(456,157);p(461,142);p(450,126); |
| 4981 |
p(436,110);p(419,74);p(409,53);p(396,40);p(372,51);p(365,67); |
| 4982 |
p(358,148);p(375,139);p(387,124);p(401,128);p(411,146);p(418,163); |
| 4983 |
p(427,168);p(443,167);p(444,161);p(434,152);p(432,135);p(440,124); |
| 4984 |
p(451,128);p(460,141);p(455,157);p(350,138);p(459,138);p(-30,276); |
| 4985 |
p(539,-283);p(539,276);p(-30,-283);p(427,-41);p(436,-54); |
| 4986 |
|
| 4987 |
draw for i:=0 upto 109: z[i]..endfor |
| 4988 |
z110{up}..z167{curl.7}..z166..z165{curl.7}..z123{down}.. |
| 4989 |
for i:=124 upto 144: z[i]..endfor z145---z146..z147{down}.. |
| 4990 |
for i:=148 upto 164: z[i]..endfor z0; |
| 4991 |
|
| 4992 |
draw for i:=110 upto 116: z[i].. endfor z117; |
| 4993 |
draw for i:=118 upto 122: z[i].. endfor z123{down}; |
| 4994 |
|
| 4995 |
draw for i:=168 upto 182: z[i].. endfor z183; |
| 4996 |
|
| 4997 |
|
| 4998 |
draw for i:=194 upto 210: z[i].. endfor cycle; |
| 4999 |
|
| 5000 |
draw for i:=211 upto 217: z[i].. endfor z218; |
| 5001 |
|
| 5002 |
a:= z226..z197..z198..z199..z200..z201..z202..z203..z227; |
| 5003 |
b:= z226--z227; |
| 5004 |
vshade(b,a,4,unitsquare scaled 1.8); |
| 5005 |
|
| 5006 |
a:= z227..z206..z207..z208..z209..z210..z194.. |
| 5007 |
z195..z196..z226; |
| 5008 |
b:= z227--z226; |
| 5009 |
vshade(b,a,4,unitsquare scaled 1.8); |
| 5010 |
|
| 5011 |
a:= z228--z230; |
| 5012 |
b:= z231--z229; |
| 5013 |
vshade(a,b,4,unitsquare); |
| 5014 |
|
| 5015 |
cutpic=nullpicture; |
| 5016 |
|
| 5017 |
addto cutpic contour(z228+(0,10)--z230+(10,10)--z229--z231--cycle); |
| 5018 |
|
| 5019 |
pickup pencircle scaled 0.7pt |
| 5020 |
|
| 5021 |
addto cutpic contour (for i:=0 upto 109: z[i].. endfor |
| 5022 |
z110{up}..z167{curl.7}..z166..z165{curl.7}..z123{down}.. |
| 5023 |
for i:=124 upto 144: z[i].. endfor z145---z146..z147{down}.. |
| 5024 |
for i:=148 upto 164: z[i].. endfor cycle) withweight -1; |
| 5025 |
|
| 5026 |
addto cutpic doublepath |
| 5027 |
(for i:=0 upto 109: z[i].. endfor |
| 5028 |
z110{up}..z167{curl.7}..z166..z165{curl.7}..z123{down}.. |
| 5029 |
for i:=124 upto 144: z[i].. endfor z145---z146..z147{down}.. |
| 5030 |
for i:=148 upto 164: z[i].. endfor z0) withpen currentpen |
| 5031 |
withweight -1; |
| 5032 |
|
| 5033 |
addto cutpic doublepath z232..z233 withpen currentpen withweight -1; |
| 5034 |
|
| 5035 |
addto cutpic contour (for i:=168 upto 182: z[i].. endfor z183..z146..cycle) |
| 5036 |
withpen currentpen withweight -1; |
| 5037 |
|
| 5038 |
cull cutpic keeping (1,infinity) withweight -3; |
| 5039 |
|
| 5040 |
addto currentpicture also cutpic; |
| 5041 |
|
| 5042 |
pickup pencircle scaled .7pt; |
| 5043 |
draw z184..z185{z186-z184}..z186; |
| 5044 |
draw z186..z187{z184-z186}..z184; |
| 5045 |
|
| 5046 |
draw z188..z189..z190; |
| 5047 |
draw z191..z192..z193; |
| 5048 |
draw z232..z233; |
| 5049 |
|
| 5050 |
endchar; |
| 5051 |
|
| 5052 |
|
| 5053 |
"Masse"; |
| 5054 |
beginchar(253,.5gnd_wd#,0,gnd_ht#+gnd_spc#+gnd_spc#); |
| 5055 |
ground |
| 5056 |
pickup pensquare scaled normalline; |
| 5057 |
draw z0--z1; |
| 5058 |
draw z4--z5; |
| 5059 |
draw z6--z7; |
| 5060 |
draw z8--z9; |
| 5061 |
endchar; |
| 5062 |
|
| 5063 |
"MASSE"; |
| 5064 |
beginchar(254,.5GND_wd#,0,gnd_ht#); |
| 5065 |
ground |
| 5066 |
pickup pensquare scaled normalline; |
| 5067 |
draw z0--z1; |
| 5068 |
pickup pensquare scaled verythickline; |
| 5069 |
draw z10--z11; |
| 5070 |
endchar; |
| 5071 |
|
| 5072 |
"Verbindungspunkt"; |
| 5073 |
beginchar(255,cdt_lt#,.5cdt_ht#,.5cdt_ht#); |
| 5074 |
pickup pencircle scaled cdt_dia; |
| 5075 |
z0=(0,0); |
| 5076 |
drawdot z0; |
| 5077 |
endchar; |
| 5078 |
|
| 5079 |
end; |
| 5080 |
%</csyrest> |
| 5081 |
% |
| 5082 |
%^^A last update: Fri 03-13-1998 |
| 5083 |
%<*optic> |
| 5084 |
input csym; |
| 5085 |
|
| 5086 |
string optionname; optionname="optics"; |
| 5087 |
|
| 5088 |
font_identifier="cioptic"; |
| 5089 |
|
| 5090 |
input defcirc; |
| 5091 |
|
| 5092 |
% half of linelength of optical axis |
| 5093 |
hsoa:=.128CIu; |
| 5094 |
|
| 5095 |
% lenses |
| 5096 |
% thin convex lens |
| 5097 |
slens_ht# := 2CIu#; |
| 5098 |
slens_lt# := 2CIu#; |
| 5099 |
slens_phi := 60; |
| 5100 |
% lensthickness: |
| 5101 |
slens_spc := .55CIu; |
| 5102 |
define_pixels(slens_lt,slens_ht); |
| 5103 |
|
| 5104 |
% thick convex lens |
| 5105 |
blens_ht# := 2CIu#; |
| 5106 |
blens_lt# := 2CIu#; |
| 5107 |
blens_phi := 45; |
| 5108 |
blens_spc := .88CIu; |
| 5109 |
define_pixels(blens_lt,blens_ht); |
| 5110 |
|
| 5111 |
% thin concave lens |
| 5112 |
sklens_ht# := 2CIu#; |
| 5113 |
sklens_lt# := 2CIu#; |
| 5114 |
sklens_phi := 60; |
| 5115 |
sklens_spc := .58CIu; |
| 5116 |
sklens_bt := 1CIu; % Breite Bottom und Top |
| 5117 |
define_pixels(sklens_lt,sklens_ht); |
| 5118 |
|
| 5119 |
% mirror |
| 5120 |
mir_ht# := 2CIu#; |
| 5121 |
mir_lt# := 2CIu#; |
| 5122 |
mir_wd := .5CIu; % Schraffurl"ange |
| 5123 |
define_pixels(mir_ht,mir_lt); |
| 5124 |
|
| 5125 |
% boxes for optical modulator and laser |
| 5126 |
omb_wd# := 3CIu#; |
| 5127 |
omb_ht# := 2CIu#; |
| 5128 |
lab_wd# := 4CIu#; |
| 5129 |
lab_ht# := 2CIu#; |
| 5130 |
define_pixels(omb_wd,omb_ht,lab_wd,lab_ht); |
| 5131 |
|
| 5132 |
% polarizer |
| 5133 |
pol_ht# := 2CIu#; |
| 5134 |
pol_lt# := 2CIu#; |
| 5135 |
pol_spc := .2CIu; |
| 5136 |
define_pixels(pol_ht,pol_lt); |
| 5137 |
|
| 5138 |
% pinhole |
| 5139 |
pin_ht# := 2CIu#; |
| 5140 |
pin_lt# := 2CIu#; |
| 5141 |
pin_spx := .16CIu; |
| 5142 |
pin_spy := .08CIu; |
| 5143 |
pin_spz := .5CIu; |
| 5144 |
define_pixels(pin_ht,pin_lt); |
| 5145 |
|
| 5146 |
% camera |
| 5147 |
cam_ht# := 2CIu#; |
| 5148 |
cam_lt# := 3CIu#; |
| 5149 |
cam_spx := 2CIu; |
| 5150 |
cam_spy := 1CIu; |
| 5151 |
define_pixels(cam_ht,cam_lt); |
| 5152 |
|
| 5153 |
% screen |
| 5154 |
scr_ht# := 4CIu#; |
| 5155 |
scr_lt# := 2CIu#; |
| 5156 |
scr_spx := 1CIu; |
| 5157 |
scr_spy := 1CIu; |
| 5158 |
define_pixels(scr_ht,scr_lt); |
| 5159 |
|
| 5160 |
def rectangle(expr width, height, xs, ys) = |
| 5161 |
draw (xs,.5height+ys)--(width+xs,.5height+ys)--(width+xs,-.5height+ys)-- |
| 5162 |
(xs,-.5height+ys)--cycle; |
| 5163 |
enddef; |
| 5164 |
|
| 5165 |
def small_lens = |
| 5166 |
pickup pensquare scaled normalline; |
| 5167 |
numeric pl; |
| 5168 |
pl:=.5(slens_lt-slens_spc); |
| 5169 |
z0=(.5slens_lt,-.5slens_ht); |
| 5170 |
z1=(.5slens_lt,.5slens_ht); |
| 5171 |
z2=(.5CIu,0); z3=z2+(hsoa,0); |
| 5172 |
z4=(slens_lt-.5CIu,0); z5=z4-(hsoa,0); |
| 5173 |
draw z0{dir slens_phi}..z1; |
| 5174 |
draw z0{dir (180-slens_phi)}..z1; |
| 5175 |
opticalaxis(normalline)(0); |
| 5176 |
opticalaxis(normalline)(1CIu); |
| 5177 |
enddef; |
| 5178 |
|
| 5179 |
def half_small_lens = |
| 5180 |
pickup pensquare scaled normalline; |
| 5181 |
numeric pl; |
| 5182 |
pl:=.5(slens_lt-slens_spc); |
| 5183 |
z0=(.5slens_lt,-.5slens_ht); |
| 5184 |
z1=(.5slens_lt,.5slens_ht); |
| 5185 |
z4=(slens_lt-.5CIu,0); z5=z4-(hsoa,0); |
| 5186 |
draw z0{dir slens_phi}..z1; |
| 5187 |
draw z1--z0; |
| 5188 |
opticalaxis(normalline)(0); |
| 5189 |
opticalaxis(normalline)(1CIu); |
| 5190 |
enddef; |
| 5191 |
|
| 5192 |
def bold_lens = |
| 5193 |
pickup pensquare scaled normalline; |
| 5194 |
numeric pl; |
| 5195 |
pl:=.5(blens_lt-blens_spc); |
| 5196 |
z0=(.5blens_lt,-.5blens_ht); |
| 5197 |
z1=(.5blens_lt,.5blens_ht); |
| 5198 |
draw z0{dir blens_phi}..z1; |
| 5199 |
draw z0{dir (180-blens_phi)}..z1; |
| 5200 |
opticalaxis(normalline)(0); |
| 5201 |
opticalaxis(normalline)(1CIu); |
| 5202 |
enddef; |
| 5203 |
|
| 5204 |
def half_bold_lens = |
| 5205 |
pickup pensquare scaled normalline; |
| 5206 |
numeric pl; |
| 5207 |
pl:=.5(blens_lt-blens_spc); |
| 5208 |
z0=(.5blens_lt,-.5blens_ht); |
| 5209 |
z1=(.5blens_lt,.5blens_ht); |
| 5210 |
draw z0{dir blens_phi}..z1; |
| 5211 |
draw z1--z0; |
| 5212 |
opticalaxis(normalline)(0); |
| 5213 |
opticalaxis(normalline)(1CIu); |
| 5214 |
enddef; |
| 5215 |
|
| 5216 |
def small_konkav_lens = |
| 5217 |
pickup pensquare scaled normalline; |
| 5218 |
numeric pl, ql; |
| 5219 |
pl:=.5(sklens_lt-sklens_spc); |
| 5220 |
ql:=.5(sklens_lt-sklens_bt); |
| 5221 |
z0=(ql,-.5sklens_ht); |
| 5222 |
z1=(sklens_lt-ql,-.5sklens_ht); |
| 5223 |
z2=(ql,.5sklens_ht); |
| 5224 |
z3=(sklens_lt-ql,.5sklens_ht); |
| 5225 |
z4=(.5CIu,0); z5=z4+(hsoa,0); |
| 5226 |
z6=(sklens_lt-.5CIu,0); z7=z6-(hsoa,0); |
| 5227 |
draw z0{dir sklens_phi}..z2--z3{dir (180+sklens_phi)}..z1--z0; |
| 5228 |
draw z4--z5; draw z6--z7; |
| 5229 |
opticalaxis(normalline)(0); |
| 5230 |
opticalaxis(normalline)(1CIu); |
| 5231 |
enddef; |
| 5232 |
|
| 5233 |
def half_small_konkav_lens = |
| 5234 |
pickup pensquare scaled normalline; |
| 5235 |
numeric pl, ql; |
| 5236 |
pl:=.5(sklens_lt-sklens_spc); |
| 5237 |
ql:=.5(sklens_lt+sklens_bt); |
| 5238 |
z0=(.5sklens_lt,-.5sklens_ht); |
| 5239 |
z1=(ql,-.5sklens_ht); |
| 5240 |
z2=(.5sklens_lt,.5sklens_ht); |
| 5241 |
z3=(ql,.5sklens_ht); |
| 5242 |
draw z0--z2--z3{dir (180+sklens_phi)}..z1--z0; |
| 5243 |
opticalaxis(normalline)(0); |
| 5244 |
opticalaxis(normalline)(1CIu); |
| 5245 |
enddef; |
| 5246 |
|
| 5247 |
def mirror = |
| 5248 |
pickup pensquare scaled normalline; |
| 5249 |
opticalaxis(normalline)(0); |
| 5250 |
opticalaxisdown(normalline)(.5mir_lt,0); |
| 5251 |
halfmirror; |
| 5252 |
pickup pensquare scaled thinline; |
| 5253 |
for i=.125 step .125 until .875: |
| 5254 |
draw (i*mir_lt,(.5-i)*mir_ht)--(mir_wd+i*mir_lt,mir_wd+(.5-i)*mir_ht); |
| 5255 |
endfor |
| 5256 |
enddef; |
| 5257 |
|
| 5258 |
def halfmirror = |
| 5259 |
pickup pensquare scaled thickline; |
| 5260 |
draw (.5mir_wd,.5(mir_ht-mir_wd))--(mir_lt-.5mir_wd,.5(mir_wd-mir_ht)); |
| 5261 |
enddef; |
| 5262 |
|
| 5263 |
def halfmirrorline = |
| 5264 |
pickup pensquare scaled normalline; |
| 5265 |
opticalaxis(normalline)(0); |
| 5266 |
opticalaxisdown(normalline)(.5mir_lt,.5mir_ht); |
| 5267 |
opticalaxisdown(normalline)(.5mir_lt,0); |
| 5268 |
enddef; |
| 5269 |
|
| 5270 |
def polarizer = |
| 5271 |
pickup pensquare scaled thinline; |
| 5272 |
numeric pl; |
| 5273 |
pl:=.5(pol_lt-pol_spc); |
| 5274 |
z0=(pl,.5pol_ht); |
| 5275 |
z1=z0+(0,-pol_ht); |
| 5276 |
z2=z1+(pol_spc,0); |
| 5277 |
z3=z0+(pol_spc,0); |
| 5278 |
draw z0--z1--z2--z3--cycle; |
| 5279 |
% optical axis |
| 5280 |
opticalaxis(normalline)(0); |
| 5281 |
opticalaxis(normalline)(1CIu); |
| 5282 |
enddef; |
| 5283 |
|
| 5284 |
def pinhole = |
| 5285 |
pickup pensquare scaled thinline; |
| 5286 |
numeric pl; |
| 5287 |
pl:=.5(pin_lt-pin_spx); |
| 5288 |
fill (.5pin_lt,.5pin_spy)--(pl,.5pin_spz)--(pl,.5pin_ht)-- |
| 5289 |
(pl+pin_spx,.5pin_ht)--(pl+pin_spx,.5pin_spz)--cycle; |
| 5290 |
fill (.5pin_lt,-.5pin_spy)--(pl,-.5pin_spz)--(pl,-.5pin_ht)-- |
| 5291 |
(pl+pin_spx,-.5pin_ht)--(pl+pin_spx,-.5pin_spz)--cycle; |
| 5292 |
% optical axis |
| 5293 |
opticalaxis(normalline)(0); |
| 5294 |
opticalaxis(normalline)(1CIu); |
| 5295 |
enddef; |
| 5296 |
|
| 5297 |
def screenleft (expr gray) = |
| 5298 |
pickup pensquare scaled normalline; |
| 5299 |
path a, b; |
| 5300 |
numeric pl; |
| 5301 |
pl:=.5(scr_lt-scr_spx); |
| 5302 |
z0=(pl,.5scr_ht); |
| 5303 |
z1=(pl+scr_spx,scr_spy); |
| 5304 |
z2=(pl+scr_spx,-.5scr_ht); |
| 5305 |
z3=(pl,-scr_spy); |
| 5306 |
draw z0--z1--z2--z3--cycle; |
| 5307 |
a:=z0--z1; |
| 5308 |
b:=z2--z3; |
| 5309 |
vshade(b, a, gray, unitsquare); |
| 5310 |
enddef; |
| 5311 |
|
| 5312 |
def screenright (expr gray) = |
| 5313 |
pickup pensquare scaled normalline; |
| 5314 |
path a, b; |
| 5315 |
numeric pl; |
| 5316 |
pl:=.5(scr_lt-scr_spx); |
| 5317 |
z0=(pl,-.5scr_ht); |
| 5318 |
z1=(pl,scr_spy); |
| 5319 |
z2=(pl+scr_spx,.5scr_ht); |
| 5320 |
z3=(pl+scr_spx,-scr_spy); |
| 5321 |
draw z0--z1--z2--z3--cycle; |
| 5322 |
a:=z1--z2; |
| 5323 |
b:=z3--z0; |
| 5324 |
vshade(b, a, gray, unitsquare); |
| 5325 |
enddef; |
| 5326 |
|
| 5327 |
% optical Axis as dashed line |
| 5328 |
def opticalaxis(expr linethickness)(expr offset) = |
| 5329 |
pickup pensquare scaled linethickness; |
| 5330 |
draw (offset,0)--(offset+hsoa,0); |
| 5331 |
draw (offset+3hsoa,0)--(offset+5hsoa,0); |
| 5332 |
draw (offset+7hsoa,0)--(offset+1CIu,0); |
| 5333 |
enddef; |
| 5334 |
|
| 5335 |
% half optical Axis as dashed line |
| 5336 |
def halfopticalaxis(expr linethickness)(expr offset) = |
| 5337 |
pickup pensquare scaled linethickness; |
| 5338 |
draw (offset,0)--(offset+hsoa,0); |
| 5339 |
draw (offset+3hsoa,0)--(offset+.5CIu,0); |
| 5340 |
enddef; |
| 5341 |
|
| 5342 |
% optical Axis as dashed line downwards |
| 5343 |
def opticalaxisdown(expr linethickness)(expr xoffset, yoffset) = |
| 5344 |
pickup pensquare scaled linethickness; |
| 5345 |
draw (xoffset,yoffset)--(xoffset,yoffset-hsoa); |
| 5346 |
draw (xoffset,yoffset-3hsoa)--(xoffset,yoffset-5hsoa); |
| 5347 |
draw (xoffset,yoffset-7hsoa)--(xoffset,yoffset-1CIu); |
| 5348 |
enddef; |
| 5349 |
|
| 5350 |
% half optical Axis as dashed line downwards |
| 5351 |
def halfopticalaxisdown(expr linethickness)(expr xoffset, yoffset) = |
| 5352 |
pickup pensquare scaled linethickness; |
| 5353 |
draw (xoffset,yoffset)--(xoffset,yoffset-hsoa); |
| 5354 |
draw (xoffset,yoffset-3hsoa)--(xoffset,yoffset-.5CIu); |
| 5355 |
enddef; |
| 5356 |
|
| 5357 |
% Camera |
| 5358 |
def camera = |
| 5359 |
pickup pensquare scaled thickline; |
| 5360 |
numeric pl; |
| 5361 |
pl:=cam_lt-cam_spx; |
| 5362 |
draw (pl,.25cam_spy)--(0,.5cam_spy)--(0,-.5cam_spy)--(pl,-.25cam_spy); |
| 5363 |
draw (pl,.5cam_ht)--(pl,-.5cam_ht)--(cam_lt,-.5cam_ht)--(cam_lt,.5cam_ht)--cycle; |
| 5364 |
enddef; |
| 5365 |
|
| 5366 |
"SmalCIuns"; |
| 5367 |
twochars(0)(small_lens)(.5slens_ht#,slens_lt#,.5slens_ht#); |
| 5368 |
|
| 5369 |
"HalfSmalCIuns"; |
| 5370 |
fourchars(2)(half_small_lens)((slens_lt,0))(.5slens_ht#,slens_lt#,.5slens_ht#); |
| 5371 |
|
| 5372 |
"BoldLens"; |
| 5373 |
twochars(6)(bold_lens)(.5blens_ht#,blens_lt#,.5blens_ht#); |
| 5374 |
|
| 5375 |
"HalfBoldLens"; |
| 5376 |
fourchars(8)(half_bold_lens)((blens_lt,0))(.5blens_ht#,blens_lt#,.5blens_ht#); |
| 5377 |
|
| 5378 |
"SmallKonkavLens"; |
| 5379 |
twochars(12)(small_konkav_lens)(.5sklens_ht#,sklens_lt#,.5sklens_ht#); |
| 5380 |
|
| 5381 |
"HalfSmallKonkavLens"; |
| 5382 |
fourchars(14)(half_small_konkav_lens)((sklens_lt,0))(.5sklens_ht#,sklens_lt#,.5sklens_ht#); |
| 5383 |
|
| 5384 |
"Mirror"; |
| 5385 |
eightchars(85)(mirror)(.5mir_lt#,.5mir_ht#,.5mir_ht#,.5mir_lt#); |
| 5386 |
|
| 5387 |
"BeamSplitter"; |
| 5388 |
eightchars(36)(halfmirror;halfmirrorline)(.5mir_lt#,.5mir_ht#,.5mir_ht#,.5mir_lt#); |
| 5389 |
|
| 5390 |
"Polarizer"; |
| 5391 |
twochars(44)(polarizer)(.5pol_ht#,pol_lt#,.5pol_ht#); |
| 5392 |
|
| 5393 |
"Pinhole"; |
| 5394 |
twochars(46)(pinhole)(.5pin_ht#,pin_lt#,.5pin_ht#); |
| 5395 |
|
| 5396 |
"Camera"; |
| 5397 |
fourchars(66)(camera)((cam_lt,0))(.5cam_ht#,cam_lt#,.5cam_ht#); |
| 5398 |
|
| 5399 |
"ScreenLeft"; |
| 5400 |
twochars(72)(screenleft(2);opticalaxis(normalline)(0))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5401 |
|
| 5402 |
"ScreenRight"; |
| 5403 |
twochars(74)(screenright(2);opticalaxis(normalline)(1CIu))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5404 |
|
| 5405 |
"ScreenLeftBehind"; |
| 5406 |
twochars(76)(screenleft(2);halfopticalaxis(normalline)(1.5CIu))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5407 |
|
| 5408 |
"ScreenRightBehind"; |
| 5409 |
twochars(78)(screenright(2);halfopticalaxis(normalline)(0))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5410 |
|
| 5411 |
"VScreenLeft"; |
| 5412 |
twochars(80)(screenleft(4);opticalaxis(normalline)(0);halfopticalaxis(normalline)(1.5CIu))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5413 |
|
| 5414 |
"VScreenRight"; |
| 5415 |
twochars(82)(screenright(4);opticalaxis(normalline)(1CIu);halfopticalaxis(normalline)(0))(.5scr_ht#,scr_lt#,.5scr_ht#); |
| 5416 |
|
| 5417 |
"horizontal dashed half line to the right"; |
| 5418 |
beginchar(128,.5CIu#,0pt,0pt); |
| 5419 |
halfopticalaxis(normalline)(0); |
| 5420 |
endchar; |
| 5421 |
|
| 5422 |
"horizontal dashed long line to the right"; |
| 5423 |
beginchar(129,1CIu#,0pt,0pt); |
| 5424 |
opticalaxis(normalline)(0); |
| 5425 |
endchar; |
| 5426 |
|
| 5427 |
"horizontal dashed half line to the left"; |
| 5428 |
beginchar(130,.5CIu#,0pt,0pt); |
| 5429 |
halfopticalaxis(normalline)(-.5CIu); |
| 5430 |
endchar; |
| 5431 |
|
| 5432 |
"horizontal dashed half line up"; |
| 5433 |
beginchar(131,0pt,.5CIu#,0pt); |
| 5434 |
halfopticalaxisdown(normalline)(0,.5CIu); |
| 5435 |
endchar; |
| 5436 |
|
| 5437 |
"horizontal dashed long line up"; |
| 5438 |
beginchar(132,0pt,1CIu#,0pt); |
| 5439 |
opticalaxisdown(normalline)(0,1CIu); |
| 5440 |
endchar; |
| 5441 |
|
| 5442 |
"horizontal dashed half line down"; |
| 5443 |
beginchar(133,0pt,0pt,.5CIu#); |
| 5444 |
halfopticalaxisdown(normalline)(0,0); |
| 5445 |
endchar; |
| 5446 |
|
| 5447 |
"bold horizontal dashed half line to the right"; |
| 5448 |
beginchar(136,.5CIu#,0pt,0pt); |
| 5449 |
halfopticalaxis(2normalline)(0); |
| 5450 |
endchar; |
| 5451 |
|
| 5452 |
"bold horizontal dashed long line to the right"; |
| 5453 |
beginchar(137,1CIu#,0pt,0pt); |
| 5454 |
opticalaxis(2normalline)(0); |
| 5455 |
endchar; |
| 5456 |
|
| 5457 |
"bold horizontal dashed half line to the left"; |
| 5458 |
beginchar(138,.5CIu#,0pt,0pt); |
| 5459 |
halfopticalaxis(2normalline)(-.5CIu); |
| 5460 |
endchar; |
| 5461 |
|
| 5462 |
"bold horizontal dashed half line up"; |
| 5463 |
beginchar(139,0pt,.5CIu#,0pt); |
| 5464 |
halfopticalaxisdown(2normalline)(0,.5CIu); |
| 5465 |
endchar; |
| 5466 |
|
| 5467 |
"bold horizontal dashed long line up"; |
| 5468 |
beginchar(140,0pt,1CIu#,0pt); |
| 5469 |
opticalaxisdown(2normalline)(0,1CIu); |
| 5470 |
endchar; |
| 5471 |
|
| 5472 |
"bold horizontal dashed half line down"; |
| 5473 |
beginchar(141,0pt,0pt,.5CIu#); |
| 5474 |
halfopticalaxisdown(2normalline)(0,0); |
| 5475 |
endchar; |
| 5476 |
|
| 5477 |
% This is a part of mf-output from Gnuplot. It adds the possibility to |
| 5478 |
% use Text within METAFONT-Symbols |
| 5479 |
if unknown cmbase: input cmbase fi |
| 5480 |
|
| 5481 |
tracingstats:=1; |
| 5482 |
picture r[]; |
| 5483 |
|
| 5484 |
def put_text(expr ts,xstart,ystart,rot,justification) = |
| 5485 |
begingroup |
| 5486 |
text_width:=0;text_height:=0; |
| 5487 |
for ind:=0 step 1 until length(ts)-1: |
| 5488 |
dec_num:=ASCII substring (ind,ind+1) of ts; |
| 5489 |
if unknown r[dec_num]: dec_num:=32; fi |
| 5490 |
if dec_num=32: |
| 5491 |
text_width:=text_width+wd[65]; |
| 5492 |
text_height:=max(text_height,ht[65]+dp[65]); |
| 5493 |
elseif dec_num>=0: |
| 5494 |
text_width:=text_width+wd[dec_num]; |
| 5495 |
text_height:=max(text_height,ht[dec_num]+dp[dec_num]); |
| 5496 |
fi |
| 5497 |
endfor |
| 5498 |
if rot=90: |
| 5499 |
if justification=1: ynext:=ystart; |
| 5500 |
elseif justification=2: ynext:=round(ystart-text_width/2); |
| 5501 |
else: ynext:=round(ystart-text_width); |
| 5502 |
fi |
| 5503 |
xnext:=xstart+text_height/2; |
| 5504 |
else: |
| 5505 |
if justification=1: xnext:=xstart; |
| 5506 |
elseif justification=2: xnext:=round(xstart-text_width/2); |
| 5507 |
else: xnext:=round(xstart-text_width); |
| 5508 |
fi |
| 5509 |
ynext:=ystart-text_height/2; |
| 5510 |
fi |
| 5511 |
for ind:=0 step 1 until length(ts)-1: |
| 5512 |
dec_num:=ASCII substring (ind,ind+1) of ts; |
| 5513 |
if unknown r[dec_num]: dec_num:=32; fi |
| 5514 |
if dec_num=32: |
| 5515 |
xnext:=xnext+wd[65]*cosd rot; |
| 5516 |
ynext:=ynext+wd[65]*sind rot; |
| 5517 |
elseif dec_num>=0: |
| 5518 |
currentpicture:=currentpicture+r[dec_num] shifted(xnext,ynext) |
| 5519 |
rotatedaround ((xnext,ynext),rot); |
| 5520 |
xnext:=xnext+wd[dec_num]*cosd rot; |
| 5521 |
ynext:=ynext+wd[dec_num]*sind rot; |
| 5522 |
fi |
| 5523 |
endfor |
| 5524 |
endgroup |
| 5525 |
enddef; |
| 5526 |
|
| 5527 |
def endchar = |
| 5528 |
r[charcode]:=currentpicture; |
| 5529 |
wd[charcode]:=w;ht[charcode]:=h;dp[charcode]:=d; |
| 5530 |
endgroup; |
| 5531 |
enddef; |
| 5532 |
let endchar_ = endchar; |
| 5533 |
let generate = relax; |
| 5534 |
let roman = relax; |
| 5535 |
input cmss10.mf |
| 5536 |
if ligs>1: font_coding_scheme:="TeX text"; |
| 5537 |
else: font_coding_scheme:= |
| 5538 |
if ligs=0: "TeX typewriter text" |
| 5539 |
else: "TeX text without f-ligatures" fi; |
| 5540 |
fi |
| 5541 |
font_setup; |
| 5542 |
input romanu.mf %Roman uppercase. |
| 5543 |
input romanl.mf %Roman lowerrcase. |
| 5544 |
|
| 5545 |
def endchar = |
| 5546 |
% Next line should probably be removed if CM base is used |
| 5547 |
% l:=0; r:=w; |
| 5548 |
%Include the next two lines if you want to |
| 5549 |
%rotate the picture 90 deg.(Portrait to Landscape) |
| 5550 |
%currentpicture:=currentpicture rotated 90 shifted (h,0); |
| 5551 |
%tmp:=charht; charht:=charwd; charwd:=tmp; |
| 5552 |
scantokens extra_endchar; |
| 5553 |
if proofing>0: makebox(proofrule); fi |
| 5554 |
chardx:=w; |
| 5555 |
shipit; |
| 5556 |
if displaying>0: makebox(screenrule); showit; fi |
| 5557 |
endgroup |
| 5558 |
enddef; |
| 5559 |
let endchar_ = saveendchar; |
| 5560 |
let generate = input; |
| 5561 |
let roman = roman; |
| 5562 |
def t_ = transformed currenttransform enddef; |
| 5563 |
% End of Gnuplot-Part |
| 5564 |
|
| 5565 |
"Laser Box horizontal"; |
| 5566 |
beginchar(160,lab_wd#,.5lab_ht#,.5lab_ht#); |
| 5567 |
pickup pensquare scaled thickline; |
| 5568 |
rectangle(lab_wd,lab_ht,0,0); |
| 5569 |
pickup pencircle scaled normalline; |
| 5570 |
put_text("Laser",.5lab_wd,0,0,2); |
| 5571 |
endchar; |
| 5572 |
|
| 5573 |
"Laser Box vertical"; |
| 5574 |
beginchar(161,.5lab_ht#,lab_wd#,.5lab_ht#); |
| 5575 |
pickup pensquare scaled thickline; |
| 5576 |
rectangle(lab_ht,lab_wd,-.5lab_ht,.5lab_wd); |
| 5577 |
pickup pencircle scaled normalline; |
| 5578 |
put_text("Laser",0,.5lab_wd,90,2); |
| 5579 |
endchar; |
| 5580 |
|
| 5581 |
"Photometer Box horizontal"; |
| 5582 |
beginchar(162,omb_wd#,.5omb_ht#,.5omb_ht#); |
| 5583 |
pickup pensquare scaled thickline; |
| 5584 |
rectangle(omb_wd,omb_ht,0,0); |
| 5585 |
pickup pencircle scaled normalline; |
| 5586 |
put_text("PM",.5omb_wd,0,0,2); |
| 5587 |
endchar; |
| 5588 |
|
| 5589 |
"Photometer Box vertical"; |
| 5590 |
beginchar(163,.5omb_ht#,omb_wd#,.5omb_ht#); |
| 5591 |
pickup pensquare scaled thickline; |
| 5592 |
rectangle(omb_ht,omb_wd,-.5omb_ht,.5omb_wd); |
| 5593 |
pickup pencircle scaled normalline; |
| 5594 |
put_text("PM",0,.5omb_wd,90,2); |
| 5595 |
endchar; |
| 5596 |
|
| 5597 |
"Optical Modulator Box horizontal"; |
| 5598 |
beginchar(164,omb_wd#,.5omb_ht#,.5omb_ht#); |
| 5599 |
pickup pensquare scaled thickline; |
| 5600 |
rectangle(omb_wd,omb_ht,0,0); |
| 5601 |
pickup pensquare scaled normalline; |
| 5602 |
put_text("OM",.5omb_wd,0,0,2); |
| 5603 |
endchar; |
| 5604 |
|
| 5605 |
"Optical Modulator Box vertical"; |
| 5606 |
beginchar(165,omb_ht#,.5omb_wd#,.5omb_wd#); |
| 5607 |
pickup pensquare scaled thickline; |
| 5608 |
rectangle(omb_ht,omb_wd,0,0); %-.5omb_ht,.5omb_wd); |
| 5609 |
pickup pensquare scaled normalline; |
| 5610 |
put_text("OM",.5omb_ht,0,90,2); |
| 5611 |
endchar; |
| 5612 |
|
| 5613 |
end; |
| 5614 |
%</optic> |
| 5615 |
%^^A last update: Fri 03-13-1998 |
| 5616 |
% |
| 5617 |
%<*csycirc> |
| 5618 |
input csym; |
| 5619 |
|
| 5620 |
designsize:=2lLE#; |
| 5621 |
|
| 5622 |
fontdimen10: .4gat_ht#; |
| 5623 |
fontdimen11: .65gat_lt#; |
| 5624 |
|
| 5625 |
fontdimen12: .5pin_lt#; |
| 5626 |
fontdimen13: pin_spc#; |
| 5627 |
fontdimen14: .5ios_wd#+.5pin_lt#; |
| 5628 |
fontdimen15: mid_wd#+ios_wd#; |
| 5629 |
fontdimen16: ios_wd#; |
| 5630 |
fontdimen17: out_spc#; |
| 5631 |
|
| 5632 |
%fontdimen7: .4gat_ht#; |
| 5633 |
%fontdimen8: .5pin_lt#; |
| 5634 |
%fontdimen9: .5(pin_lt#+ios_wd#); |
| 5635 |
%fontdimen10: .5mid_wd#; |
| 5636 |
%fontdimen11: .5ios_wd#; |
| 5637 |
%fontdimen16: pin_spc#; |
| 5638 |
|
| 5639 |
def defcircleabout(expr p, rad)= |
| 5640 |
z[p]=.5[z[p+1],z[p+3]]=.5[z[p+2],z[p+4]]; |
| 5641 |
y[p+1]=y[p+3]; |
| 5642 |
x[p+2]=x[p+4]; |
| 5643 |
x[p]=lft(x[p+1])-rad; |
| 5644 |
y[p]=top(y[p+4])+rad; |
| 5645 |
enddef; |
| 5646 |
|
| 5647 |
def gate= |
| 5648 |
charic:=.5pin_spc#; |
| 5649 |
z0=(0,0); |
| 5650 |
x20=x15=x1=x6=x7= x0+pin_lt; |
| 5651 |
y8=y6=-y7= y0+.5gat_ht; |
| 5652 |
x8=x9=x10= x1+gat_lt-2pin_lt; |
| 5653 |
y15=-y20= y0+.5pin_spc; |
| 5654 |
x25-x0= gat_lt; |
| 5655 |
|
| 5656 |
y9=y7; y25=y10=y1=y0; |
| 5657 |
x0=x26=x27; |
| 5658 |
y26=y15; y27=y20; |
| 5659 |
|
| 5660 |
pickup pencircle scaled thickline; |
| 5661 |
defcircleabout(1,inv_rad); |
| 5662 |
defcircleabout(10,inv_rad); |
| 5663 |
defcircleabout(15,inv_rad); |
| 5664 |
defcircleabout(20,inv_rad); |
| 5665 |
enddef; |
| 5666 |
|
| 5667 |
def segment = |
| 5668 |
z0=(0,0); |
| 5669 |
x1-x0=pin_lt; y0=y1; |
| 5670 |
defcircleabout(1,inv_rad); % z2 z3 z4 z5 defined |
| 5671 |
z1=.5[z6,z7]; x6=x7=x8; |
| 5672 |
y7-y6=pin_spc; |
| 5673 |
y8-y1=out_spc; |
| 5674 |
x9-x8=ios_wd; y8=y9; |
| 5675 |
enddef; |
| 5676 |
|
| 5677 |
|
| 5678 |
def topbotsegs(expr fc, myht, mydp) = |
| 5679 |
beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp); |
| 5680 |
pickup pensquare scaled thickline; |
| 5681 |
segment |
| 5682 |
draw z6--z8--z9; |
| 5683 |
endchar; |
| 5684 |
beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp); |
| 5685 |
pickup pensquare scaled thickline; |
| 5686 |
segment |
| 5687 |
draw z6--z8--z9; |
| 5688 |
pickup pensquare scaled normalline; |
| 5689 |
draw z0--z1; |
| 5690 |
endchar; |
| 5691 |
beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp); |
| 5692 |
pickup pensquare scaled thickline; |
| 5693 |
segment |
| 5694 |
draw z6--z5; |
| 5695 |
draw z3--z8--z9; |
| 5696 |
pickup pencircle scaled normalline; |
| 5697 |
draw fullcircle scaled 2inv_rad shifted z1; |
| 5698 |
pickup pensquare scaled normalline; |
| 5699 |
draw z0--z4; |
| 5700 |
endchar; |
| 5701 |
beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp); |
| 5702 |
pickup pensquare scaled thickline; |
| 5703 |
segment |
| 5704 |
draw z6--z8--z9; |
| 5705 |
pickup pensquare scaled normalline; |
| 5706 |
draw z0--z1; |
| 5707 |
pickup pencircle scaled normalline; |
| 5708 |
draw z3--z2--z5; |
| 5709 |
endchar; |
| 5710 |
enddef; |
| 5711 |
|
| 5712 |
def midsegs(expr fc, myht, mydp) = |
| 5713 |
beginchar(fc+0,pin_lt#+ios_wd#,myht,mydp); |
| 5714 |
pickup pensquare scaled thickline; |
| 5715 |
segment |
| 5716 |
draw z6--z8; |
| 5717 |
endchar; |
| 5718 |
beginchar(fc+1,pin_lt#+ios_wd#,myht,mydp); |
| 5719 |
pickup pensquare scaled thickline; |
| 5720 |
segment |
| 5721 |
draw z6--z8; |
| 5722 |
pickup pensquare scaled normalline; |
| 5723 |
draw z0--z1; |
| 5724 |
endchar; |
| 5725 |
beginchar(fc+2,pin_lt#+ios_wd#,myht,mydp); |
| 5726 |
pickup pensquare scaled thickline; |
| 5727 |
segment |
| 5728 |
draw z6--z5; |
| 5729 |
draw z3--z8; |
| 5730 |
pickup pencircle scaled thickline; |
| 5731 |
draw fullcircle scaled 2inv_rad shifted z1; |
| 5732 |
pickup pensquare scaled normalline; |
| 5733 |
draw z0--z4; |
| 5734 |
endchar; |
| 5735 |
beginchar(fc+3,pin_lt#+ios_wd#,myht,mydp); |
| 5736 |
pickup pensquare scaled thickline; |
| 5737 |
segment |
| 5738 |
draw z6--z8; |
| 5739 |
pickup pensquare scaled normalline; |
| 5740 |
draw z0--z1; |
| 5741 |
pickup pencircle scaled normalline; |
| 5742 |
draw z3--z2--z5; |
| 5743 |
endchar; |
| 5744 |
enddef; |
| 5745 |
|
| 5746 |
|
| 5747 |
"obere Segmente Eing"&ditto&"ange"; |
| 5748 |
topbotsegs(0,out_spc#,.5pin_spc#); |
| 5749 |
|
| 5750 |
"obere Segmente Ausg"&ditto&"ange"; |
| 5751 |
{{ |
| 5752 |
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1))); |
| 5753 |
topbotsegs(16,out_spc#,.5pin_spc#); |
| 5754 |
}} |
| 5755 |
|
| 5756 |
"mittlere Segmente Eing"&ditto&"ange"; |
| 5757 |
midsegs(32,.5pin_spc#,.5pin_spc#); |
| 5758 |
|
| 5759 |
"mittlere Segmente Eing"&ditto&"ange"; |
| 5760 |
{{ |
| 5761 |
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1))); |
| 5762 |
midsegs(48,.5pin_spc#,.5pin_spc#); |
| 5763 |
}} |
| 5764 |
|
| 5765 |
"untere Segmente Eing"&ditto&"ange"; |
| 5766 |
{{ |
| 5767 |
addTF(reflectedabout(left,right)); |
| 5768 |
topbotsegs(64,.5pin_spc#,out_spc#); |
| 5769 |
}} |
| 5770 |
|
| 5771 |
"untere Segmente Ausg"&ditto&"ange"; |
| 5772 |
{{ |
| 5773 |
addTF(reflectedabout(left,right)); |
| 5774 |
addTF(reflectedabout((.5(ios_wd+pin_lt),0),(.5(ios_wd+pin_lt),1))); |
| 5775 |
topbotsegs(80,.5pin_spc#,out_spc#); |
| 5776 |
}} |
| 5777 |
|
| 5778 |
"oberes Zwischensegment"; |
| 5779 |
beginchar(96,mid_wd#,out_spc#,.5pin_spc#); |
| 5780 |
pickup pensquare scaled thickline; |
| 5781 |
draw (0,out_spc)--(mid_wd,out_spc); |
| 5782 |
endchar; |
| 5783 |
|
| 5784 |
"Zwischensegment"; |
| 5785 |
beginchar(97,mid_wd#,.5pin_spc#,.5pin_spc#); |
| 5786 |
endchar; |
| 5787 |
|
| 5788 |
"unteres Zwischensegment"; |
| 5789 |
beginchar(98,mid_wd#,.5pin_spc#,out_spc#); |
| 5790 |
pickup pensquare scaled thickline; |
| 5791 |
draw (0,-out_spc)--(mid_wd,-out_spc); |
| 5792 |
endchar; |
| 5793 |
|
| 5794 |
|
| 5795 |
"Gatter: Eingang, Ausgang"; |
| 5796 |
beginchar(128,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5797 |
gate; |
| 5798 |
pickup pensquare scaled thickline; |
| 5799 |
draw z6--z8--z9--z7--cycle; |
| 5800 |
pickup pensquare scaled normalline; |
| 5801 |
draw z0--z1; |
| 5802 |
draw z10--z25; |
| 5803 |
endchar; |
| 5804 |
|
| 5805 |
"Gatter: Eingang negiert, Ausgang"; |
| 5806 |
beginchar(129,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5807 |
gate; |
| 5808 |
pickup pensquare scaled thickline; |
| 5809 |
draw z3--z6--z8--z9--z7--z5; |
| 5810 |
pickup pencircle scaled thickline; |
| 5811 |
draw fullcircle scaled 2inv_rad shifted z1; |
| 5812 |
pickup pensquare scaled normalline; |
| 5813 |
draw z0--z4; |
| 5814 |
draw z10--z25; |
| 5815 |
endchar; |
| 5816 |
|
| 5817 |
"Gatter: Eingang, Ausgang negiert"; |
| 5818 |
beginchar(130,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5819 |
gate; |
| 5820 |
pickup pensquare scaled thickline; |
| 5821 |
draw z14--z9--z7--z6--z8--z12; |
| 5822 |
pickup pencircle scaled thickline; |
| 5823 |
draw fullcircle scaled 2inv_rad shifted z10; |
| 5824 |
pickup pensquare scaled normalline; |
| 5825 |
draw z0--z1; |
| 5826 |
draw z11--z25; |
| 5827 |
endchar; |
| 5828 |
|
| 5829 |
"Gatter: zwei Eing"&ditto&"ange, Ausgang"; |
| 5830 |
beginchar(131,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5831 |
gate; |
| 5832 |
pickup pensquare scaled thickline; |
| 5833 |
draw z6--z8--z9--z7--cycle; |
| 5834 |
pickup pensquare scaled normalline; |
| 5835 |
draw z15--z26; |
| 5836 |
draw z20--z27; |
| 5837 |
draw z10--z25; |
| 5838 |
endchar; |
| 5839 |
|
| 5840 |
"Gatter: zwei Eing"&ditto&"ange, Ausgang negiert"; |
| 5841 |
beginchar(132,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5842 |
gate; |
| 5843 |
pickup pensquare scaled thickline; |
| 5844 |
draw z14--z9--z7--z6--z8--z12; |
| 5845 |
pickup pencircle scaled thickline; |
| 5846 |
draw fullcircle scaled 2inv_rad shifted z10; |
| 5847 |
pickup pensquare scaled normalline; |
| 5848 |
draw z15--z26; |
| 5849 |
draw z20--z27; |
| 5850 |
draw z11--z25; |
| 5851 |
endchar; |
| 5852 |
|
| 5853 |
"Gatter alt AND: zwei Eing"&ditto&"ange, Ausgang"; |
| 5854 |
beginchar(133,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5855 |
gate; |
| 5856 |
pickup pensquare scaled thickline; |
| 5857 |
draw z1--z6{right}..z10{down}..{left}z7--cycle; |
| 5858 |
pickup pensquare scaled normalline; |
| 5859 |
draw z15--z26; |
| 5860 |
draw z20--z27; |
| 5861 |
draw z10--z25; |
| 5862 |
endchar; |
| 5863 |
|
| 5864 |
"Gatter alt NAND: zwei Eing"&ditto&"ange, Ausgang"; |
| 5865 |
beginchar(134,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5866 |
gate; |
| 5867 |
pickup pensquare scaled thickline; |
| 5868 |
draw z1--z6{right}..z10{down}..{left}z7--cycle; |
| 5869 |
pickup pensquare scaled normalline; |
| 5870 |
draw z15--z26; |
| 5871 |
draw z20--z27; |
| 5872 |
draw z10--z25; |
| 5873 |
pickup pencircle scaled 2inv_rad; |
| 5874 |
drawdot z10; |
| 5875 |
endchar; |
| 5876 |
|
| 5877 |
"Gatter alt OR: zwei Eing"&ditto&"ange, Ausgang"; |
| 5878 |
beginchar(135,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5879 |
gate; |
| 5880 |
z30=5[z26,z15]; |
| 5881 |
z31=5[z27,z20]; |
| 5882 |
z32= (z26--z30) intersectionpoint (z6{right}..{down}z10); |
| 5883 |
z33= (z27--z31) intersectionpoint (z10{down}..{left}z7); |
| 5884 |
pickup pensquare scaled thickline; |
| 5885 |
draw z1--z6{right}..z10{down}..{left}z7--cycle; |
| 5886 |
pickup pensquare scaled normalline; |
| 5887 |
draw z26--z32; |
| 5888 |
draw z27--z33; |
| 5889 |
draw z10--z25; |
| 5890 |
endchar; |
| 5891 |
|
| 5892 |
"Gatter alt NOR: zwei Eing"&ditto&"ange, Ausgang"; |
| 5893 |
beginchar(136,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5894 |
gate; |
| 5895 |
z30=5[z26,z15]; |
| 5896 |
z31=5[z27,z20]; |
| 5897 |
z32= (z26--z30) intersectionpoint (z6{right}..{down}z10); |
| 5898 |
z33= (z27--z31) intersectionpoint (z10{down}..{left}z7); |
| 5899 |
pickup pensquare scaled thickline; |
| 5900 |
draw z1--z6{right}..z10{down}..{left}z7--cycle; |
| 5901 |
pickup pensquare scaled normalline; |
| 5902 |
draw z26--z32; |
| 5903 |
draw z27--z33; |
| 5904 |
draw z10--z25; |
| 5905 |
pickup pencircle scaled 2inv_rad; |
| 5906 |
drawdot z10; |
| 5907 |
endchar; |
| 5908 |
|
| 5909 |
"Gatter alt EQ: zwei Eing"&ditto&"ange, Ausgang"; |
| 5910 |
beginchar(137,gat_lt#,.5gat_ht#,.5gat_ht#); |
| 5911 |
gate; |
| 5912 |
pickup pensquare scaled thickline; |
| 5913 |
draw z1--z6{right}..z10{down}..{left}z7--cycle; |
| 5914 |
pickup pensquare scaled normalline; |
| 5915 |
draw z15--z26; |
| 5916 |
draw z20--z27; |
| 5917 |
draw z10--z25; |
| 5918 |
x30=x31=x34=.2[x2,x13]; |
| 5919 |
y30=.7[y16,y2]; y30=y32; |
| 5920 |
y31=.7[y21,y2]; y31=y33; |
| 5921 |
x32=x33=x35=.8[x2,x13]; |
| 5922 |
y35=y34=y2; |
| 5923 |
pickup pencircle scaled normalline; |
| 5924 |
draw z30--z32; |
| 5925 |
draw z31--z33; |
| 5926 |
draw z34--z35; |
| 5927 |
endchar; |
| 5928 |
|
| 5929 |
"box symbol empty"; |
| 5930 |
beginchar(250,box_wd#,.5box_wd#,.5box_wd#); |
| 5931 |
z0=(0,0); |
| 5932 |
x0=x1=x2; x3=x4; |
| 5933 |
y0=.5[y2,y1]; |
| 5934 |
y1=y3; y2=y4; |
| 5935 |
y2-y1=x3-x1=box_wd; |
| 5936 |
pickup pensquare scaled thickline; |
| 5937 |
draw z1--z2--z4--z3--cycle; |
| 5938 |
endchar; |
| 5939 |
|
| 5940 |
"box symbol cutted by line"; |
| 5941 |
beginchar(251,box_wd#,.5box_wd#,.5box_wd#); |
| 5942 |
z0=(0,0); |
| 5943 |
x0=x1=x2; x3=x4; |
| 5944 |
y0=.5[y2,y1]; |
| 5945 |
y1=y3; y2=y4; |
| 5946 |
y2-y1=x3-x1=box_wd; |
| 5947 |
pickup pensquare scaled thickline; |
| 5948 |
draw z1--z2--z4--z3--cycle; |
| 5949 |
pickup pencircle scaled normalline; |
| 5950 |
draw z1--z4; |
| 5951 |
endchar; |
| 5952 |
|
| 5953 |
"Black Box analog"; |
| 5954 |
beginchar(252,bba_wd#,.5bba_ht#,.5bba_ht#); |
| 5955 |
z0=(0,0); x1=x0=x2; |
| 5956 |
z0=.5[z1,z2]; |
| 5957 |
y1-y2=y3-y4=bba_ht; y1=y3; |
| 5958 |
x3=x4=x0+bba_wd; |
| 5959 |
pickup pensquare scaled thickline; |
| 5960 |
draw z1--z2--z4--z3--cycle; |
| 5961 |
endchar; |
| 5962 |
|
| 5963 |
"Black Box digital"; |
| 5964 |
beginchar(253,bbd_wd#,.5bbd_ht#,.5bbd_ht#); |
| 5965 |
z0=(0,0); x1=x0=x2; |
| 5966 |
z0=.5[z1,z2]; |
| 5967 |
y1-y2=y3-y4=bbd_ht; y1=y3; |
| 5968 |
x3=x4=x0+bbd_wd; |
| 5969 |
pickup pensquare scaled thickline; |
| 5970 |
draw z1--z2--z4--z3--cycle; |
| 5971 |
endchar; |
| 5972 |
|
| 5973 |
"OPV"; |
| 5974 |
beginchar(254,opv_lt#,opv_ht#,opv_ht#); |
| 5975 |
charic:=opv_dis#; |
| 5976 |
numeric pl; |
| 5977 |
pl:=pin_lt; |
| 5978 |
z0=(0,0); |
| 5979 |
z1=z0+(pl,opv_dis); |
| 5980 |
z2=z0+(pl,opv_ht); |
| 5981 |
z3=z0+(pl+opv_frc*2opv_ht,0); |
| 5982 |
x4=x2; y4=-y2; |
| 5983 |
x5=x1; y5=-y1; |
| 5984 |
z6=z1-(pl,0); |
| 5985 |
z7=z5-(pl,0); |
| 5986 |
z8=z0+(opv_lt,0); |
| 5987 |
z9=z5+(3pt,0); |
| 5988 |
z10=z9+(4pt,0); |
| 5989 |
z11=z1+(3pt,0); |
| 5990 |
z12=z11+(4pt,0); |
| 5991 |
z13=z11+(2pt,2pt); |
| 5992 |
z14=z11+(2pt,-2pt); |
| 5993 |
pickup pensquare scaled thickline; |
| 5994 |
draw z2--z3--z4--cycle; |
| 5995 |
pickup pensquare scaled normalline; |
| 5996 |
draw z9--z10; |
| 5997 |
draw z11--z12; |
| 5998 |
draw z13--z14; |
| 5999 |
draw z6--z1; |
| 6000 |
draw z7--z5; |
| 6001 |
draw z3--z8; |
| 6002 |
endchar; |
| 6003 |
|
| 6004 |
"OPV"; |
| 6005 |
beginchar(255,opv_lt#,opv_ht#,opv_ht#); |
| 6006 |
charic:=opv_dis#; |
| 6007 |
numeric pl; |
| 6008 |
pl:=pin_lt; |
| 6009 |
z0=(0,0); |
| 6010 |
z1=z0+(pl,opv_dis); |
| 6011 |
z2=z0+(pl,opv_ht); |
| 6012 |
z3=z0+(pl+opv_frc*2opv_ht,0); |
| 6013 |
x4=x2; y4=-y2; |
| 6014 |
x5=x1; y5=-y1; |
| 6015 |
z6=z1-(pl,0); |
| 6016 |
z7=z5-(pl,0); |
| 6017 |
z8=z0+(opv_lt,0); |
| 6018 |
z9=z1+(3pt,0); |
| 6019 |
z10=z9+(4pt,0); |
| 6020 |
z11=z5+(3pt,0); |
| 6021 |
z12=z11+(4pt,0); |
| 6022 |
z13=z11+(2pt,2pt); |
| 6023 |
z14=z11+(2pt,-2pt); |
| 6024 |
pickup pensquare scaled thickline; |
| 6025 |
draw z2--z3--z4--cycle; |
| 6026 |
pickup pensquare scaled normalline; |
| 6027 |
draw z9--z10; |
| 6028 |
draw z11--z12; |
| 6029 |
draw z13--z14; |
| 6030 |
draw z6--z1; |
| 6031 |
draw z7--z5; |
| 6032 |
draw z3--z8; |
| 6033 |
endchar; |
| 6034 |
|
| 6035 |
end; |
| 6036 |
%</csycirc> |
| 6037 |
% |
| 6038 |
%<*indexhlp> |
| 6039 |
If you want to generate an index for the circ-package please |
| 6040 |
run "makeindex" with the style-file "circ.ist" on "circ.idx". |
| 6041 |
|
| 6042 |
Using EM-TeX the command line is: makeindx -s circ.ist circ.idx |
| 6043 |
|
| 6044 |
To get the right pagenumbers in the index and the table of |
| 6045 |
contents, run LaTeX on "circ.drv" and makeindex in the following |
| 6046 |
way: |
| 6047 |
|
| 6048 |
latex circ.drv |
| 6049 |
makeindx -s circ.ist circ.idx |
| 6050 |
latex circ.drv |
| 6051 |
makeindx -s circ.ist circ.idx |
| 6052 |
latex circ.drv |
| 6053 |
%</indexhlp> |