Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/Drive.m4

raw
1 .PS
2 # `Drive.m4'
3 cct_init
4
5 define(`synchmachine',`[ r = ifelse(`$1',,`dimen_*3/4',(`$1')/2)
6 C: circle rad r
7 Point_(120)
8 line from C to C+vec_(r*2/9,0); reversed(`inductor',to rvec_(r*2/3,0))
9 W2: Here
10 Point_(240)
11 line from C to C+vec_(r*2/9,0); reversed(`inductor',to rvec_(r*2/3,0))
12 W3: Here
13 line from C right_ r*2/9; inductor(right_ r*2/3)
14 W1: Here ]')
15
16 bht = sourcerad_*10
17 dlen = dimen_*2/3
18 define(`Diodepair',`[ diode(up_ dlen); line up bht-2*dlen; diode(up_ dlen) ]')
19
20 define(`gbt',`bi_trans(`$1',`$2',CBUHdE`$3')')
21 define(`dotrad_',dotrad_*0.5/linewid)
22 define(`GBTpair',`[linewid = 0.5*3/4
23 Q1: gbt(up_ bht/2,,D)
24 Q2: gbt(up_ bht/2,,D) with .C at Q1.E
25 ]')
26
27 SW: ground
28 line up
29 W: Here
30 line right dimen_/3; dot
31 ssep = sourcerad_*2.5
32 { line up ssep; S1: source(right_ dimen_,AC) }
33 { S2: source(right_ dimen_,AC) }
34 { line down ssep; S3: source(right_ dimen_,AC) }
35
36 dsep = dimen_/2
37 D1: Diodepair at S2.e
38 D2: Diodepair at D1+(dsep,0); dot(at D2.n); dot(at D2.s)
39 D3: Diodepair at D2+(dsep,0); dot(at D3.n); dot(at D3.s)
40 dot(at (D1,S1))
41 dot(at (D2,S2)); line to S2.e
42 dot(at (D3,S3)); line to S3.e
43
44 line from D1.n to D3.n
45 inductor(right_ dimen_)
46 T: dot
47 capacitor(to (Here,D1.s),C)
48 dot
49
50 gsep = dimen_*1.25
51 G1: GBTpair with .Q1.C at T+(dimen_,0)
52 G2: GBTpair at G1+(gsep,0)
53 G3: GBTpair at G2+(gsep,0)
54
55 line from G3.Q1.C to T
56 dot(at (G1.Q1.C,T))
57 dot(at (G2.Q1.C,T))
58 line from G3.Q2.E to D1.s
59 dot(at (G1.Q1.E,D1.s))
60 dot(at (G2.Q1.E,D1.s))
61
62 M: synchmachine with .C at G3.e+(dimen_*2,0)
63 sg = dimen_/8
64 L: (0.5<G3.e,M.w>,D1.s)-(sg,0)
65 line from M.W1 to (M.W1,L) then to L \
66 then up M.C.y-L.y-sg then to G3.Q2.C+(0,-sg); dot
67 line from M.W3 down M.W3.y-L.y-sg*2 then to L+(sg*2,sg*2)\
68 then up M.C.y-L.y-sg*2 then to G2.Q2.C; dot
69 line from M.W2 to (L,M.W2) \
70 then down M.W2.y-G1.Q2.C.y-sg then to G1.Q2.C+(0,sg); dot
71
72 line right dimen_/3 from M.e then down M.e.y-SW.y
73 ground
74 .PE