Debian Codegraph @

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

raw
1 .PS
2 # ex10.m4
3 cct_init
4
5 [
6 dt = 360/5
7 r = 0.75
8
9 N0: dot(at (Rect_(r,90)))
10 N1: dot(at (Rect_(r,(90-dt))))
11 N2: dot(at (Rect_(r,(90-2*dt))))
12 N3: dot(at (Rect_(r,(90-3*dt))))
13 N4: dot(at (Rect_(r,(90-4*dt))))
14
15 line from N0 to N1 then to N2 then to N3 then to N4 then to N0
16 L14: line from N1 to N4
17 L24: line from N2 to N4
18 C02: crossover(from N0 to N2,,L14)
19 C13: crossover(from N1 to N3,,C02,L24)
20 C03: crossover(from N0 to N3,,L14,L24)
21 ]
22
23 [
24 up_
25 rgbdraw(1,0,0,
26 Q1: bi_tr(,R) # Q1 upward with base to the right
27 llabel(,Q_1) ) # Label to left of last []
28 rgbdraw(0,0,1,
29 Q2: bi_tr with .C at Q1.C+(elen_*7/4,0) # Q2 with base to left
30 rlabel(,Q_2) )
31
32 ground(at Q1.E)
33 ground(at Q2.E)
34
35 line right_ dimen_/3 from Q1.B # Extend the base conductors
36 B1: Here
37 line left_ dimen_/3 from Q2.B
38 B2: Here
39
40 resistor(up_ elen_*0.75 from Q1.C); llabel(,"$R_L$" wid 0.16) # Load resistors
41 line to (Q2.C,Here) "$V_{\hbox{cc}}$" below
42 resistor(down_ to Q2.C); llabel(,R_L)
43
44 move to Q1.C+(0,dimen_/5)
45 { resistor(right_ to (B1,Here)); llabel(,R_1)
46 X: line to B2 } # Label the line to be jumped
47 resistor(from (Q2.C,Here) left_ to (B2,Here)); rlabel(,R_1)
48 crossover(to B1,R,X)
49
50 resistor(down_ elen_*0.75); rlabel(,R_2) # Bias resistors
51 {"$-V_{\hbox{cc}}$" rjust}
52 line to (B2,Here)
53 resistor(up_ to B2); rlabel(,R_2)
54 ] with .sw at last [].se+(0.75,0)
55
56 .PE