%%
%% This is file `cibimos.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% circ.dtx  (with options: `csybimos')
%% Copyright 1997-98  Sebastian Tannert / Andreas Tille
%% 
%% This file is part of the CIRC package
%% -------------------------------------
%%   This package is distributed in the hope that it will be useful,
%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%% 
%%   For error reports concerning UNCHANGED versions of this file no
%%   more than one year old, see CIRC.DVI.
%% 
%% IMPORTANT COPYRIGHT NOTICE:
%% 
%% You are NOT ALLOWED to distribute this file alone.
%% 
%% You are allowed to distribute this file under the condition that it
%% is distributed together with all the files listed in circ.txt.
%% 
%% If you receive only some of these files from someone, complain!
%% 
%% You are NOT ALLOWED to change this file.
font_identifier:="cibimos";

string optionname; optionname:="";

input defcirc.mf;

input csym;
designsize:=1lLE#;

def mosfet =  % ok
  z0=(0,0);
  x1=x2=x3=x4;
  y2-y1=mos_SD;
  y4-y3=mos_sd;
  .5[z2,z1]=.5[z4,z3];
  y6=y4; y7=y3;
  x4-x6=x3-x7;
  .5[z8,z9]=.5[z6,z7]=z5;
  x9=x8;
  y8-y6=mos_soSD;
  x10=x11;
  x0+mos_Gsub=x10+mos_ox=x7;
  x1-x0=mos_GSx;
  y0=y10=y1+mos_GSy;
  y6-y11=y10-y7;
  z12=.5[z1,z2];
  z6=.5[z13,z8];
  z7=.5[z14,z9];
  z15-z16=z8-z13;
  z5=.5[z15,z16];
  pickup pencircle scaled mos_rad;
  drawdot round(z3);
  pickup pensquare scaled normalline;
  draw z1--z3--z7;
  draw z2--z4--z6;
  draw z0--z10--z11;
  draw z5--z12--z3;
  pickup pensquare scaled thickline;
enddef;

def mosfet_V =  % ok
  mosfet;
  draw z8--z9;
enddef;

def mosfet_A =  % ok
  mosfet;
  draw z8--z13;
  draw z9--z14;
  draw z15--z16;
enddef;

def fet =  % ok
    z0=(0,0);
    z1=z0+(fet_Gsub,0);
    y2=y1;
    x2=x3=x4=x0+fet_GSx;
    y3=y2-fet_GSy;
    z2-z3=z4-z5;
    y4-y3=fet_SD;
    y6=y5;
    x1=x6;
    x8=x7;
    y8=y1-fet_soSD;
    .5[z4,z3]=.5[z5,z2];
    .5[z7,z8]=.5[z1,z6];
    z9=z1-(fet_sarr+tri_lt,0);
    pickup pensquare scaled normalline;
    draw z0--z1--z2--z3;
    draw z6--z5--z4;
    pickup pensquare scaled thickline;
    draw z7--z8;
enddef;

def transistor_without_basis =  % "uberarbeiten
  numeric pl;
  pl:=.5(tst_ht-tst_iht);
  z1-z2=(0,tst_iht);
  z0=.5[z1,z2];
  z3=tst_fac[z0,z1];
  z4=tst_fac[z0,z2];
  z5=z1+(tst_wd,0);
  z6=z2+(tst_wd,0);
  z7=z5+(0,pl);
  z8=z6+(0,-pl);
  z9=tst_dis[z4,z6];
  pickup pensquare scaled normalline;
  draw z1--z2;
  draw z3--z5--z7;
  draw z4--z6--z8;
  pickup pencircle scaled thinline;
  triangle(z9,tst_rad,tri_phi,angle(z6-z4));
enddef;

def npn_no_basis =  % "uberarbeiten
  numeric tst_rad,tst_dis;
  tst_rad:=-tri_lt;
  tst_dis:=npn_dis;
  z0=(0,0);
  transistor_without_basis;
enddef;

def npn_photo =  % "uberarbeiten
numeric pl;
  z0=(0,0);
  pl:=.5(tst_ht-tst_iht);
  y0=y1=y2=y3;
  x1=x0+tst_ht;
  x2-x0=x1-x3=pl;
  y5=y4=y6=y7=y8=y0+tst_wd;
  x5-x6=tst_iht;
  x4=.5[x5,x6]=.5[x0,x1];
  x7=tst_fac[x4,x5];
  x8=tst_fac[x4,x6];
  z9=tst_dis[z2,z8];
  pickup pensquare scaled normalline;
  draw z0--z2--z8--z7--z3--z1;
  draw z5--z6;
  pickup pencircle scaled thinline;
  triangle(z9,tst_rad,tri_phi,angle(z8-z2));
enddef;

def pnp_no_basis =  % "uberarbeiten
  numeric tst_rad,tst_dis;
  tst_rad:=tri_lt;
  tst_dis:=pnp_dis;
  z0=(0,0);
  transistor_without_basis;
enddef;

def npn =  % "uberarbeiten
  numeric tst_rad,tst_dis;
  tst_rad:=-tri_lt;
  tst_dis:=npn_dis;
  z0=(tst_wd,0);
  z20=(0,0);
  transistor_without_basis;
  pickup pensquare scaled normalline;
  draw z20--z0;
enddef;

def pnp =  % "uberarbeiten
  numeric tst_rad,tst_dis;
  tst_rad:=tri_lt;
  tst_dis:=pnp_dis;
  z0=(tst_wd,0);
  z20=(0,0);
  transistor_without_basis;
  pickup pensquare scaled normalline;
  draw z20--z0;
enddef;

"Transistor NPN ohne Basis";
eightchars(0)
   (npn_no_basis)
   (tst_wd#,.5tst_ht#,.5tst_ht#,0);

"Transistor PNP ohne Basis";
eightchars(8)
   (pnp_no_basis)
   (tst_wd#,.5tst_ht#,.5tst_ht#,0);

"Transistor NPN";
eightchars(16)
   (npn)
   (tst_wd#+tst_wd#,.5tst_ht#,.5tst_ht#,0);

"Transistor PNP";
eightchars(24)
   (pnp)
   (tst_wd#+tst_wd#,.5tst_ht#,.5tst_ht#,0);

"FET n-Kanal";
eightchars(32)
   (fet;
    pickup pencircle scaled thinline;
    triangle(z1,tri_lt,tri_phi,180);
   )
   (fet_GSx#,fet_GSy#,fet_SD#-fet_GSy#,0);

"FET p-Kanal";
eightchars(40)
   (fet;
    pickup pencircle scaled thinline;
    triangle(z9,tri_lt,tri_phi,0);
   )
   (fet_GSx#,fet_GSy#,fet_SD#-fet_GSy#,0);

"MOSFET n-Kanal V";
eightchars(48)
   (mosfet_V;
    pickup pencircle scaled thinline;
    triangle(z5,tri_lt,tri_phi,0);
   )
   (mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0);

"MOSFET p-Kanal V";
eightchars(56)
   (mosfet_V;
    pickup pencircle scaled thinline;
    triangle(z12,tri_lt,tri_phi,180);
   )
   (mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0);

"MOSFET n-Kanal A";
eightchars(64)
   (mosfet_A;
    pickup pencircle scaled thinline;
    triangle(z5,tri_lt,tri_phi,0);
   )
   (mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0);

"MOSFET p-Kanal A";
eightchars(72)
   (mosfet_A;
    pickup pencircle scaled thinline;
    triangle(z12,tri_lt,tri_phi,180);
   )
   (mos_GSx#,mos_GSy#,mos_SD#-mos_GSy#,0);

current_char_code:=80;

twopincharfourfour("npnPH")("T")("E")("C")("photo transistor")
  (tst_ht#,tst_wd#+1.6lLE#,0)
(
shiftpoint:=z1;
npn_photo;
lightarrows(z4+(.8lLE,1.7lLE),240);
)

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