summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-5-9.mp
blob: 33711dd71cbc4d96f2241da8d24c7fe76d6481c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% --- start of displayed preamble in the book ---
input makecirc;
initlatex("\usepackage{amsmath,amssymb}");
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
transformer.a(origin,mid,0);
diode.a(tf.a.ss+(5mm,1cm),normal,0,pinA,"D_1","");
diode.b(tf.a.si+(5mm,-1cm),normal,0,pinA,"D_2","");
impedance.a(D.a.K+(2cm,-4mm),-90,"Z_L","300\ohm");
wire(tf.a.ss,D.a.A,udsq);wire(tf.a.si,D.b.A,udsq);
wire(D.a.K,Z.a.l,rlsq);wire(Z.a.r,tf.a.m,udsq);
wire(D.b.K,D.a.K+(5mm,0),rlsq);
junction.a(D.a.K+(5mm,0),"")(top);
centerto.A(tf.a.pi,tf.a.ps)(-15mm,sac);
source.a(A,AC,90,"220 V","v");
wire(S.a.p,tf.a.ps,udsq);wire(S.a.n,tf.a.pi,udsq);
centreof.A((xpart S.a.p,ypart tf.a.ps),tf.a.ps,cur);
current.a(c.A,phi.A,"i(t)","5 A");
imesh(tf.a.ss+(1cm,0),15mm,1cm,cw,0,"I_{cc}");
endfig;
end;