real supRadius = 3mm;
-TwoTerminal V = source(ang=-180, type=DC, val="V");
-TwoTerminal R = resistor(V.beg, "R");
+MultiTerminal V = source(dir=-180, type=DC, label="$V$");
+MultiTerminal R = resistor(V.terminal[0], label="$R$");
+real rlen = R.terminal[1].x - R.terminal[0].x;
-real lBar = 0.6*abs(R.end-V.end);
+real lBar = 0.6*abs(R.terminal[1]-V.terminal[1]);
real hBar = 1mm;
-pair cBar = (V.end+R.end)/2 - (0,R.len);
+pair cBar = (V.terminal[1]+R.terminal[1])/2 - (0,rlen);
// top, left, and right points for the left support
pair tLsup = cBar - (lBar/2, hBar/2);
pair lLsup = tLsup + supRadius * dir(-120);
pair rLsup = tLsup + supRadius * dir(-60);
-wire(V.end, lLsup, udsq);
+wire(V.terminal[1], lLsup, udsq);
wire(lLsup, tLsup);
wire(tLsup, rLsup);
pair tRsup = cBar + (lBar/2, -hBar/2);
pair lRsup = tRsup + supRadius * dir(-120);
pair rRsup = tRsup + supRadius * dir(-60);
-wire(R.end, rRsup, udsq);
+wire(R.terminal[1], rRsup, udsq);
wire(rRsup, tRsup);
wire(tRsup, lRsup);
import ElectroMag;
import Circ;
-TwoTerminal Rv = resistor(ang=90, val="$10.0\U{\Ohm}$");
-TwoTerminal Rh = resistor(Rv.end, ang=-180, val="$25.0\U{\Ohm}$");
-TwoTerminal V = source(type=DC, "$120.0\U{V}$", draw=false);
-centerto(Rv, V, Rh.len); V.draw();
-TwoTerminal S = switchSPST(Rv.end, type=NO, "$S$");
-wire(V.beg, (2*Rh.len, Rv.beg.y), udsq);
-wire(V.end, Rh.end, udsq);
-wire(S.end, (2*Rh.len, S.end.y), nsq);
+MultiTerminal Rv = resistor(dir=90,
+ value=rotate(90)*Label("$10.0\U{\Ohm}$"));
+real rlen = Rv.terminal[1].y - Rv.terminal[0].y;
+MultiTerminal Rh = resistor(Rv.terminal[1], dir=-180, value="$25.0\U{\Ohm}$");
+MultiTerminal V = source(type=DC, value=Label("$120.0\U{V}$", align=W),
+ draw=false);
+two_terminal_centerto(Rv, V, rlen); V.draw();
+MultiTerminal S = switchSPST(Rv.terminal[1], type=open, "$S$");
+wire(V.terminal[0], (2*rlen, Rv.terminal[0].y), udsq);
+wire(V.terminal[1], Rh.terminal[1], udsq);
+wire(S.terminal[1], (2*rlen, S.terminal[1].y), nsq);
+dot(Rv.terminal[0]);
-real xBar = (S.end.x+2*Rh.len)/2;
+real xBar = (S.terminal[1].x+2*rlen)/2;
Vector Bs[];
int i, n = 4;
-real dy = 1.4*Rv.len/(n-1);
-real yBstart = Rv.mid.y - (n-1)*dy/2;
-real xB = xBar - Rh.len/2;
+real dy = 1.4*rlen/(n-1);
+real yBstart = Rv.center.y - (n-1)*dy/2;
+real xB = xBar - rlen/2;
for (i=0; i<n; i+=1) {
- Bs.push(BField((xB, yBstart+i*dy), mag=Rh.len));
+ Bs.push(BField((xB, yBstart+i*dy), mag=rlen));
if (i == n-1)
Bs[i].label = Label("\vect{B}", EndPoint, LeftSide);
}
Bs[i].draw();
}
-Block bar = Block((xBar, Rv.mid.y), width=1mm, height=1.2*Rv.len, fill=yellow);
+Block bar = Block((xBar, Rv.center.y), width=1mm, height=1.2*rlen,
+ fill=yellow);
bar.draw();
\end{asy}
\end{center}
wire(pUR, pLR);
wire(pLR, pLL);
-TwoTerminal I = current("$6.00\U{A}$", "", draw=false);
+MultiTerminal I = current(label="$6.00\U{A}$", draw=false);
I.centerto(pUL, (pUL+pUR)/2);
I.draw();
-I.name = "";
+I.label = "";
I.centerto((pLL+pLR)/2, pLL);
I.draw();
wbot.draw();
wbot_seg.draw();
-TwoTerminal Ibot = current((0,-Ysep/2), 180, "$24.0\U{A}$");
+MultiTerminal Ibot = current((0,-Ysep/2), 180, "$24.0\U{A}$");
Distance dSegbot = Distance((-Xsep-Xseg/2,-Ysep/2), (-Xsep+Xseg/2,-Ysep/2),
offset=2mm, L=Label("$1.50\U{mm}$", align=S));
dSegbot.draw();
wtop.draw();
wtop_seg.draw();
-TwoTerminal Itop = current((Ibot.end.x,Ysep/2), "$12.0\U{A}$");
+MultiTerminal Itop = current((Ibot.terminal[1].x,Ysep/2), "$12.0\U{A}$");
Distance dSegtop = Distance((-Xsep-Xseg/2,Ysep/2), (-Xsep+Xseg/2,Ysep/2),
offset=-2mm, Label("$1.50\U{mm}$", align=N));
dSegtop.draw();
Distance R = Distance((0,0), (r*Cos(45),r*Sin(45)), "$r$");
R.draw();
draw((-2r,0)--(-r,0){N}..(0,r){E}..{S}(r,0)--(2r,0));
-TwoTerminal Il = current((-1.5r,0), "I");
-TwoTerminal Ir = current((1.5r,0), "I");
+MultiTerminal Il = current((-1.5r,0), "I");
+MultiTerminal Ir = current((1.5r,0), "I");
dot("$P$", (0,0), S);
\end{asy}
\end{center}
Vs[i].draw();
}
-dot("P", Scale((x,0)), N);
+dot("P", Scale((x,0)), NW);
label("$a$", align=W, Scale((0,a/2)));
label("$a$", align=W, Scale((0,-a/2)));
wire(relpoint(arcpath, 0), A);
wire(relpoint(arcpath, 1), B);
-TwoTerminal R = resistor("$R$", draw=false);
+MultiTerminal R = resistor("$R$", draw=false);
R.centerto(A, B, offset=RSep);
R.draw();
-wire(A, R.beg, rlsq, RSep/2);
-wire(B, R.end, rlsq, RSep/2);
+wire(A, R.terminal[0], rlsq, RSep/2);
+wire(B, R.terminal[1], rlsq, RSep/2);
dot("$a$", A, N);
dot("$b$", B, S);
\begin{equation}
\Delta \Phi = \Delta A \cdot B = (A_f - A_i) B = -A_iB \;,
\end{equation}
-so the average \EMF is
+so the average \EMF\ is
\begin{equation}
\EMF = -\frac{\Delta \Phi}{\Delta t}
= \frac{A_iB}{\Delta t}