| 1 |
.PS |
| 2 |
# ex17.m4 |
| 3 |
cct_init |
| 4 |
|
| 5 |
[ |
| 6 |
nrows = 4 |
| 7 |
ncols = 9 |
| 8 |
linewid = linewid*0.6 # everything smaller |
| 9 |
define(`elen_',linewid) # shorter default length |
| 10 |
|
| 11 |
for j = 1 to nrows do { |
| 12 |
{ for i = 1 to ncols do { |
| 13 |
Point_(-120) resistor |
| 14 |
Point_( 0) inductor |
| 15 |
Point_( 120) capacitor |
| 16 |
if i < ncols then {Point_(0) diode} } |
| 17 |
} |
| 18 |
Point_(-120) move to rvec_(elen_,0) |
| 19 |
{ for i = 1 to ncols do { |
| 20 |
Point_(-60) capacitor |
| 21 |
Point_( 60) resistor } |
| 22 |
} |
| 23 |
Point_(-60) move to rvec_(elen_,0) |
| 24 |
} |
| 25 |
Point_(0) for i = 1 to ncols-1 do { inductor } |
| 26 |
] |
| 27 |
|
| 28 |
[ # an exercise of the `parallel_' macro: |
| 29 |
down_ # for labelling |
| 30 |
Point_(-80) # skew current direction |
| 31 |
|
| 32 |
parallel_(Sep=1.75*dimen_; |
| 33 |
parallel_( |
| 34 |
`capacitor(,C); rlabel(,,C_2)', |
| 35 |
`resistor; rlabel(,R_2)' ), |
| 36 |
parallel_( |
| 37 |
`resistor; rlabel(,R_1); move to rvec_(-dimen_/5,0) |
| 38 |
inductor(,W); rlabel(,L_1)', |
| 39 |
`reversed(`source',to rvec_(elen_,0),V,sourcerad_*2.5); rlabel(,v_s)' ) |
| 40 |
) |
| 41 |
|
| 42 |
] with .sw at last [].se+(elen_,0) |
| 43 |
.PE |