real dx = u;
real dy = 1.5u;
-TwoTerminal bat = battery("$V$");
-TwoTerminal c1 = capacitor("$C_1$", draw=false);
-centerto(bat, c1, dy); c1.draw();
-wire(bat.end, c1.end, rlsq, dx/2);
-wire(bat.beg, c1.beg, rlsq, -dx/2);
-label("(a)", bat.mid + (0, -dy/2));
+MultiTerminal bat = battery("$V$");
+MultiTerminal c1 = capacitor("$C_1$", draw=false);
+two_terminal_centerto(bat, c1, dy); c1.draw();
+wire(bat.terminal[1], c1.terminal[1], rlsq, dx/2);
+wire(bat.terminal[0], c1.terminal[0], rlsq, -dx/2);
+label("(a)", bat.center + (0, -dy/2));
c1.shift(3*dx); c1.draw();
-TwoTerminal c2 = capacitor("$C_2$", draw=false);
-centerto(c1, c2, -dy); c2.draw();
-wire(c2.end, c1.end, rlsq, dx/2);
-wire(c2.beg, c1.beg, rlsq, -dx/2);
-label("(b)", c2.mid + (0, -dy/2));
+MultiTerminal c2 = capacitor("$C_2$", draw=false);
+two_terminal_centerto(c1, c2, -dy); c2.draw();
+wire(c2.terminal[1], c1.terminal[1], rlsq, dx/2);
+wire(c2.terminal[0], c1.terminal[0], rlsq, -dx/2);
+label("(b)", c2.center + (0, -dy/2));
\end{asy}
\end{center}
\end{problem*}
real dx = u;
real dy = 1.5u;
-TwoTerminal bat = battery("$V$");
-TwoTerminal c1 = capacitor("$C_1$", draw=false);
-centerto(bat, c1, dy); c1.draw();
-wire(bat.end, c1.end, rlsq, dx/2);
-wire(bat.beg, c1.beg, rlsq, -dx/2);
-label("(a)", bat.mid + (0, -dy/2));
-label("$Q_{1a}$", c1.end, NE);
-label("$-Q_{1a}$", c1.beg, NW);
+MultiTerminal bat = battery("$V$");
+MultiTerminal c1 = capacitor("$C_1$", draw=false);
+two_terminal_centerto(bat, c1, dy); c1.draw();
+wire(bat.terminal[1], c1.terminal[1], rlsq, dx/2);
+wire(bat.terminal[0], c1.terminal[0], rlsq, -dx/2);
+label("(a)", bat.center + (0, -dy/2));
+label("$Q_{1a}$", c1.terminal[1], NE);
+label("$-Q_{1a}$", c1.terminal[0], NW);
c1.shift(3*dx); c1.draw();
-TwoTerminal c2 = capacitor("$C_2$", draw=false);
-centerto(c1, c2, -dy); c2.draw();
-wire(c2.end, c1.end, rlsq, dx/2);
-wire(c2.beg, c1.beg, rlsq, -dx/2);
-label("(b)", c2.mid + (0, -dy/2));
-label("$Q_{1b}$", c1.end, NE);
-label("$-Q_{1b}$", c1.beg, NW);
-label("$Q_{2b}$", c2.end, SE);
-label("$-Q_{2b}$", c2.beg, SW);
+MultiTerminal c2 = capacitor("$C_2$", draw=false);
+two_terminal_centerto(c1, c2, -dy); c2.draw();
+wire(c2.terminal[1], c1.terminal[1], rlsq, dx/2);
+wire(c2.terminal[0], c1.terminal[0], rlsq, -dx/2);
+label("(b)", c2.center + (0, -dy/2));
+label("$Q_{1b}$", c1.terminal[1], NE);
+label("$-Q_{1b}$", c1.terminal[0], NW);
+label("$Q_{2b}$", c2.terminal[1], SE);
+label("$-Q_{2b}$", c2.terminal[0], SW);
\end{asy}
\end{center}
\begin{asy}
import Circ;
real u = 3cm;
- TwoTerminal ra = resistor((0,0), ang=0, "$r_1 = 1.0\U{\Ohm}$", "");
- TwoTerminal Ba = source(
- ra.end, ang=0, type=DC, "", "$\mathcal{E}_1 = 12\U{V}$");
- TwoTerminal rb = resistor(ra.beg+(0,-u), ang=0, "$r_2 = 2.0\U{\Ohm}$", "");
- TwoTerminal Bb = source(
- rb.end, ang=0, type=DC, "", "$\mathcal{E}_2 = 18\U{V}$");
- TwoTerminal R = resistor(
- Bb.end+(0.5u,0.25u), ang=90, "", "$R = 6.6\U{\Ohm}$");
- wire(rb.beg, ra.beg, rlsq, dist=-24pt);
- wire(Bb.end, R.beg, rlsq);
- wire(Ba.end, R.end, rlsq);
+ MultiTerminal ra = resistor(Label("$r_1 = 1.0\U{\Ohm}$", align=S));
+ MultiTerminal Ba = source(
+ ra.terminal[1], type=DC, label="$\mathcal{E}_1 = 12\U{V}$");
+ MultiTerminal rb = resistor(ra.terminal[0]+(0,-u),
+ Label("$r_2 = 2.0\U{\Ohm}$", align=S));
+ MultiTerminal Bb = source(
+ rb.terminal[1], type=DC, label="$\mathcal{E}_2 = 18\U{V}$");
+ MultiTerminal R = resistor(
+ Bb.terminal[1]+(0.5u,0.25u), dir=90, label="$R = 6.6\U{\Ohm}$");
+ wire(rb.terminal[0], ra.terminal[0], rlsq, dist=-24pt);
+ wire(Bb.terminal[1], R.terminal[0], rlsq);
+ wire(Ba.terminal[1], R.terminal[1], rlsq);
\end{asy}
\end{center}
\end{problem*}
\begin{asy}
import Circ;
real u = 3cm;
-TwoTerminal Bc = source((0,0), ang=90, type=DC, "", "$3.0\U{V}$");
-TwoTerminal Rcb = resistor(Bc.beg, ang=-90, "$10\U{\Ohm}$", "");
-TwoTerminal Rca = resistor(Bc.end, ang=180, "", "$2\U{\Ohm}$");
-pair Jtop = Rca.end, Jbot = (Jtop.x,Rcb.end.y);
-TwoTerminal Rb = resistor(Jtop, ang=-90, "$6\U{\Ohm}$", "");
-TwoTerminal Ba = source(Jtop, ang=180, type=DC, "", "$6.0\U{V}$");
-TwoTerminal Rab = resistor(Jbot, ang=180, "$8\U{\Ohm}$", "");
-TwoTerminal Raa = resistor(Rab.end, ang=90, "$12\U{\Ohm}$", "");
-wire(Ba.end, Raa.end, rlsq);
-wire(Rab.beg, Jbot, nsq);
-wire(Jbot, Rb.end, nsq);
-wire(Jbot, Rcb.end, rlsq);
+MultiTerminal Bc = source(dir=90, type=DC, value="$3.0\U{V}$");
+MultiTerminal Rcb = resistor(Bc.terminal[0], dir=-90,
+ value=Label("$10\U{\Ohm}$", align=E));
+MultiTerminal Rca = resistor(Bc.terminal[1], dir=180, value="$2\U{\Ohm}$");
+pair Jtop = Rca.terminal[1], Jbot = (Jtop.x,Rcb.terminal[1].y);
+MultiTerminal Rb = resistor(Jtop, dir=-90,
+ value=Label("$6\U{\Ohm}$", align=E));
+MultiTerminal Ba = source(Jtop, dir=180, type=DC, value="$6.0\U{V}$");
+MultiTerminal Rab = resistor(Jbot, dir=180,
+ value=Label("$8\U{\Ohm}$", align=S));
+MultiTerminal Raa = resistor(Rab.terminal[1], dir=90,
+ value=Label("$12\U{\Ohm}$", align=W));
+wire(Ba.terminal[1], Raa.terminal[1], rlsq);
+wire(Rab.terminal[0], Jbot, nsq);
+wire(Jbot, Rb.terminal[1], nsq);
+wire(Jbot, Rcb.terminal[1], rlsq);
\end{asy}
\end{center}
\end{nosolution}
\begin{center}
\begin{asy}
import Circ;
-TwoTerminal Bc = source((0,0), ang=90, type=DC, "", "$3.0\U{V}$");
-TwoTerminal Rcb = resistor(Bc.beg, ang=-90, "$10\U{\Ohm}$", "");
-TwoTerminal Rca = resistor(Bc.end, ang=180, "", "$2\U{\Ohm}$");
-pair Jtop = Rca.end, Jbot = (Jtop.x,Rcb.end.y);
-TwoTerminal Ic = current((Jbot+Rcb.end)/2, "", "$I_3$");
-TwoTerminal Rb = resistor(Jtop, ang=-90, "$6\U{\Ohm}$", "");
-TwoTerminal Ib = current(Rb.end, ang=-90, "", "$I_2$");
-TwoTerminal Ba = source(Jtop, ang=180, type=DC, "", "$6.0\U{V}$");
-TwoTerminal Ia = current(Ba.end, ang=180, "$I_1$", "");
-TwoTerminal Rab = resistor(Jbot, ang=180, "$8\U{\Ohm}$", "");
-TwoTerminal Raa = resistor(Rab.end, ang=90, "$12\U{\Ohm}$", "");
-wire(Ia.end, Raa.end, rlsq);
-wire(Jbot, Ib.end, nsq);
-wire(Jbot, Ic.beg, nsq);
-wire(Ib.end, Rb.end, nsq);
-wire(Ic.end, Rcb.end, rlsq);
+MultiTerminal Bc = source(dir=90, type=DC, value="$3.0\U{V}$");
+MultiTerminal Rcb = resistor(Bc.terminal[0], dir=-90,
+ value=Label("$10\U{\Ohm}$", align=E));
+MultiTerminal Rca = resistor(Bc.terminal[1], dir=180, value="$2\U{\Ohm}$");
+pair Jtop = Rca.terminal[1], Jbot = (Jtop.x,Rcb.terminal[1].y);
+MultiTerminal Ic = current((Jbot+Rcb.terminal[1])/2, Label("$I_3$", align=S));
+MultiTerminal Rb = resistor(Jtop, dir=-90,
+ value=Label("$6\U{\Ohm}$", align=E));
+MultiTerminal Ib = current(Rb.terminal[1], dir=-90, "$I_2$");
+MultiTerminal Ba = source(Jtop, dir=180, type=DC, value="$6.0\U{V}$");
+MultiTerminal Ia = current(Ba.terminal[1], dir=180, "$I_1$");
+MultiTerminal Rab = resistor(Jbot, dir=180,
+ value=Label("$8\U{\Ohm}$", align=S));
+MultiTerminal Raa = resistor(Rab.terminal[1], dir=90,
+ value=Label("$12\U{\Ohm}$", align=W));
+wire(Ia.terminal[1], Raa.terminal[1], rlsq);
+wire(Jbot, Ib.terminal[1], nsq);
+wire(Jbot, Ic.terminal[0], nsq);
+wire(Ib.terminal[1], Rb.terminal[1], nsq);
+wire(Ic.terminal[1], Rcb.terminal[1], rlsq);
dot("a", Jbot, S);
\end{asy}
\end{center}
\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
\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
\begin{asy}
import Circ;
real u = 1cm;
- TwoTerminal B = source((0,0), DC, 0, "", "$V$");
- TwoTerminal r = resistor(B.end, normal, 0, "", "$r$");
- TwoTerminal R = resistor((0,u), normal, 0, "$R$", "");
- TwoTerminal I = current((r.end.x, R.end.y), 180, "", "$I$");
- wire(B.beg, R.beg, udsq);
- wire(r.end, I.beg, udsq);
- wire(I.end, R.end, nsq);
+ MultiTerminal B = source(type=DC, label="$V$");
+ MultiTerminal r = resistor(B.terminal[1], type=normal, label="$r$");
+ MultiTerminal R = resistor((0,u), type=normal, label="$R$");
+ MultiTerminal I = current((r.terminal[1].x, R.terminal[1].y), dir=180,
+ label=Label("$I$", align=N));
+ wire(B.terminal[0], R.terminal[0], udsq);
+ wire(r.terminal[1], I.terminal[0], udsq);
+ wire(I.terminal[1], R.terminal[1], nsq);
\end{asy}
\end{center}
Make a circuit using a known resistance $R$ to connect the two