Update Giancoli v6 to use Circ.asy v0.2.
[course.git] / latex / problems / Giancoli_6 / problem19.58.tex
index 6a3ec24ad04a2479451045f8c0c7161927300ce5..9f136d1b3baf441bf9b12e656a8e561cd52fa141 100644 (file)
@@ -13,16 +13,18 @@ The original situation looks like
 \begin{asy}
 import Circ;
 real u = 0.5cm;
-TwoTerminal B = source((0,0), ang=90, type=DC, "$45\U{V}$", "$V$");
-pair a = B.end+(0,u);
-pair b = B.beg-(0,u);
-TwoTerminal Ra = resistor(a, "$38\U{k\Ohm}$", "$R_1$");
-TwoTerminal Rb = resistor(Ra.end, "$27\U{k\Ohm}$", "$R_2$");
-TwoTerminal I = current((Rb.end.x, (a.y+b.y)/2), ang=-90, "", "$I$");
-wire(Rb.end, I.beg, nsq);
-wire(I.end, b, udsq);
-wire(b, B.beg, nsq);
-wire(a, B.end, nsq);
+MultiTerminal B = source(dir=90, type=DC, label="$V$", value="$45\U{V}$");
+pair a = B.terminal[1]+(0,u);
+pair b = B.terminal[0]-(0,u);
+MultiTerminal Ra = resistor(a, label="$R_1$", value="$38\U{k\Ohm}$");
+MultiTerminal Rb = resistor(Ra.terminal[1], label="$R_2$",
+    value="$27\U{k\Ohm}$");
+MultiTerminal I = current((Rb.terminal[1].x, (a.y+b.y)/2), dir=-90,
+    value="$I$");
+wire(Rb.terminal[1], I.terminal[0], nsq);
+wire(I.terminal[1], b, udsq);
+wire(b, B.terminal[0], nsq);
+wire(a, B.terminal[1], nsq);
 \end{asy}
 \end{center}
 Using Kirchhoff's loop rule
@@ -42,21 +44,24 @@ With the voltmeter across $R_1$ we have
 \begin{asy}
 import Circ;
 real u = 0.5cm;
-TwoTerminal B = source((0,0), ang=90, type=DC, "$45\U{V}$", "$V$");
-pair a = B.end+(0,u);
-pair b = B.beg-(0,u);
-TwoTerminal Ra = resistor(a, "$38\U{k\Ohm}$", "$R_1$");
-TwoTerminal Ia = current(Ra.end, "", "$I_1$");
-TwoTerminal Rv = resistor(a+(0,4u), "$95\U{k\Ohm}$", "$R_v$");
-TwoTerminal Iv = current(Rv.end, "", "$I_v$");
-TwoTerminal Rb = resistor(Ia.end, "$27\U{k\Ohm}$", "$R_2$");
-TwoTerminal I = current((Rb.end.x, (a.y+b.y)/2), ang=-90, "", "$I_T$");
-wire(Rb.end, I.beg, nsq);
-wire(I.end, b, udsq);
-wire(b, B.beg, nsq);
-wire(a, B.end, nsq);
-wire(a, Rv.beg, nsq);
-wire(Iv.end, Ia.end, rlsq);
+MultiTerminal B = source((0,0), dir=90, type=DC, label="$V$",
+    value="$45\U{V}$");
+pair a = B.terminal[1]+(0,u);
+pair b = B.terminal[0]-(0,u);
+MultiTerminal Ra = resistor(a, label="$R_1$", value="$38\U{k\Ohm}$");
+MultiTerminal Ia = current(Ra.terminal[1], label="$I_1$");
+MultiTerminal Rv = resistor(a+(0,4u), label="$R_v$", value="$95\U{k\Ohm}$");
+MultiTerminal Iv = current(Rv.terminal[1], label="$I_v$");
+MultiTerminal Rb = resistor(Ia.terminal[1], label="$R_2$",
+    value="$27\U{k\Ohm}$");
+MultiTerminal I = current((Rb.terminal[1].x, (a.y+b.y)/2), dir=-90,
+    label="$I_T$");
+wire(Rb.terminal[1], I.terminal[0], nsq);
+wire(I.terminal[1], b, udsq);
+wire(b, B.terminal[0], nsq);
+wire(a, B.terminal[1], nsq);
+wire(a, Rv.terminal[0], nsq);
+wire(Iv.terminal[1], Ia.terminal[1], rlsq);
 \end{asy}
 \end{center}
 Using our formula for resistors in parallel, we can bundle $R_v$ and $R_1$ into a single resistor $R_1'$, where