summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-5-2.mp
blob: b4d7fe656be1df451f9bae40b5314053471ad12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
% --- start of displayed preamble in the book ---
input makecirc;
initlatex("");
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
meains.a((0cm,11.5cm),volt,0,"Volt");
junction((3.5cm,11.5cm),"junction")(top);

rheostat.a((0cm,10.5cm),Rrheo,-90);
diode.a((3cm,10.5cm),normal,0,pinA,"D_1","");

transistor.a((0cm,9cm),pnp,0);
ground.a((3.5cm,9cm),simple,0);

battery.a((0cm,7.5cm),0,"Battery","");
transformer.a((3cm,7.5cm),normal,-90);

lamp.a((0cm,6cm),0,"Lamp","");
current.a((3.5cm,6cm),0,"Current","");

generator.a((0cm,4.5cm),0,"Generator","");
impedance.a((3cm,4.5cm),0,"Impedance","");

switch.a((0cm,3cm),NO,0,"NO","");
motor.a((3cm,3cm),0,"Motor","");

inductor.a((0cm,1.5cm),Up,0,"L","");
source.a((3cm,1.5cm),AC,0,"AC","");

resistor.a(origin,normal,0,"R","10\ohm");
capacitor.a((3cm,0),normal,0,"C","");

endfig;
end;