From 3ce7f701c22d3fd0a40be35e6a6ea198d8010fb2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Apr 2012 00:01:22 -0400 Subject: [PATCH] Assorted changes to get problems working with new, flexible labels. --- latex/problems/Giancoli_6/problem19.24.tex | 15 ++++--- latex/problems/Giancoli_6/problem19.31.tex | 32 +++++++------- .../Serway_and_Jewett_4/problem12.18.tex | 2 +- .../Serway_and_Jewett_4/problem13.16.tex | 6 +-- .../Serway_and_Jewett_4/problem14.08.tex | 4 +- .../Serway_and_Jewett_4/problem14.20.tex | 2 +- .../Serway_and_Jewett_4/problem19.07.tex | 4 +- .../Serway_and_Jewett_4/problem28.57.tex | 6 +-- .../problem12.V1.tex | 20 ++++----- .../problem12.06.T.tex | 11 ++--- .../problem12.47.T.tex | 10 ++--- .../problem28.62.T.tex | 4 +- .../question09.11.T.tex | 7 ++-- .../Serway_and_Jewett_8/problem02.11.tex | 8 ++-- .../Serway_and_Jewett_8/problem03.24.tex | 18 ++++---- .../Serway_and_Jewett_8/problem03.28.tex | 8 ++-- .../Serway_and_Jewett_8/problem03.29.tex | 6 ++- .../Serway_and_Jewett_8/problem03.36.tex | 11 +++-- .../Serway_and_Jewett_8/problem03.43.tex | 6 ++- .../Serway_and_Jewett_8/problem05.25.tex | 2 +- .../Serway_and_Jewett_8/problem05.30.tex | 4 +- .../Serway_and_Jewett_8/problem06.11.tex | 2 +- .../Serway_and_Jewett_8/problem06.21.tex | 4 +- .../Serway_and_Jewett_8/problem23.09.tex | 10 ++--- .../Serway_and_Jewett_8/problem23.17.tex | 10 ++--- .../Serway_and_Jewett_8/problem23.50.tex | 8 ++-- .../Serway_and_Jewett_8/problem23.59.tex | 6 +-- .../Serway_and_Jewett_8/problem29.02.tex | 8 ++-- .../Serway_and_Jewett_8/problem29.03.tex | 12 +++--- .../Serway_and_Jewett_8/problem29.22.tex | 2 +- .../Young_and_Freedman_12/problem21.84.tex | 42 ++++++++++--------- .../Young_and_Freedman_12/problem21.86.tex | 8 ++-- .../Young_and_Freedman_12/problem23.21.tex | 12 +++--- .../Young_and_Freedman_12/problem23.60.tex | 6 +-- .../Young_and_Freedman_12/problem23.63.tex | 2 +- .../Young_and_Freedman_12/problem27.35.tex | 6 +-- .../Young_and_Freedman_12/problem27.68.tex | 2 +- .../Young_and_Freedman_12/problem27.73.tex | 4 +- .../Young_and_Freedman_12/problem28.12.tex | 12 +++--- .../Young_and_Freedman_12/problem28.62.tex | 15 +++---- .../Young_and_Freedman_12/problem29.10.tex | 8 ++-- .../Young_and_Freedman_12/problem29.21.tex | 2 +- .../Young_and_Freedman_12/problem29.25.tex | 4 +- .../wking/problem.sprung-pendulum.tex | 31 +++++++------- 44 files changed, 207 insertions(+), 195 deletions(-) diff --git a/latex/problems/Giancoli_6/problem19.24.tex b/latex/problems/Giancoli_6/problem19.24.tex index 15bc710..1dc6d58 100644 --- a/latex/problems/Giancoli_6/problem19.24.tex +++ b/latex/problems/Giancoli_6/problem19.24.tex @@ -4,12 +4,15 @@ Determine the terminal voltage of each battery in Fig.~19-44. \begin{asy} import Circ; real u = 3cm; - TwoTerminal ra = resistor((0,0), normal, 0, "$r_1 = 1.0\U{\Ohm}$", ""); - TwoTerminal Ba = source(ra.end, DC, 0, "", "$\mathcal{E}_1 = 12\U{V}$"); - TwoTerminal rb = resistor(ra.beg+(0,-u), normal, 0, "$r_2 = 2.0\U{\Ohm}$", ""); - TwoTerminal Bb = source(rb.end, DC, 0, "", "$\mathcal{E}_2 = 18\U{V}$"); - TwoTerminal R = resistor(Bb.end+(0.5u,0.25u), normal, 90, "", "$R = 6.6\U{\Ohm}$"); - wireU(rb.beg, ra.beg, -24pt, rlsq); + 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); \end{asy} diff --git a/latex/problems/Giancoli_6/problem19.31.tex b/latex/problems/Giancoli_6/problem19.31.tex index 28a539f..d9636f2 100644 --- a/latex/problems/Giancoli_6/problem19.31.tex +++ b/latex/problems/Giancoli_6/problem19.31.tex @@ -7,14 +7,14 @@ Calculate the currents in each resistor of Fig.~19-49. \begin{asy} import Circ; real u = 3cm; -TwoTerminal Bc = source((0,0), DC, 90, "", "$3.0\U{V}$"); -TwoTerminal Rcb = resistor(Bc.beg, normal, -90, "$10\U{\Ohm}$", ""); -TwoTerminal Rca = resistor(Bc.end, normal, 180, "", "$2\U{\Ohm}$"); +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, normal, -90, "$6\U{\Ohm}$", ""); -TwoTerminal Ba = source(Jtop, DC, 180, "", "$6.0\U{V}$"); -TwoTerminal Rab = resistor(Jbot, normal, 180, "$8\U{\Ohm}$", ""); -TwoTerminal Raa = resistor(Rab.end, normal, 90, "$12\U{\Ohm}$", ""); +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); @@ -28,16 +28,16 @@ wire(Jbot, Rcb.end, rlsq); \begin{asy} import Circ; TwoTerminal Bc = source((0,0), DC, 90, "", "$3.0\U{V}$"); -TwoTerminal Rcb = resistor(Bc.beg, normal, -90, "$10\U{\Ohm}$", ""); -TwoTerminal Rca = resistor(Bc.end, normal, 180, "", "$2\U{\Ohm}$"); +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, 0, "", "$I_3$"); -TwoTerminal Rb = resistor(Jtop, normal, -90, "$6\U{\Ohm}$", ""); -TwoTerminal Ib = current(Rb.end, -90, "", "$I_2$"); -TwoTerminal Ba = source(Jtop, DC, 180, "", "$6.0\U{V}$"); -TwoTerminal Ia = current(Ba.end, 180, "$I_1$", ""); -TwoTerminal Rab = resistor(Jbot, normal, 180, "$8\U{\Ohm}$", ""); -TwoTerminal Raa = resistor(Rab.end, normal, 90, "$12\U{\Ohm}$", ""); +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); diff --git a/latex/problems/Serway_and_Jewett_4/problem12.18.tex b/latex/problems/Serway_and_Jewett_4/problem12.18.tex index 1e6b4ce..fb64459 100644 --- a/latex/problems/Serway_and_Jewett_4/problem12.18.tex +++ b/latex/problems/Serway_and_Jewett_4/problem12.18.tex @@ -23,7 +23,7 @@ real u = 1cm; real a = u/2; Surface surf = Surface(pFrom=(-.7u,-a/2), pTo=(2u,-a/2)); -Block b = Block(center=(0,0), side=a); +Block b = Block(center=(0,0), width=a); Spring spring = Spring(pFrom=(b.center+(a/2,0)), pTo=(2u,0)); Vector Fspring = Force(b.center, mag=2a, dir=0, L="$F_s$"); Vector Fexternal = Force(b.center, mag=2a, dir=180, L="$F_e$"); diff --git a/latex/problems/Serway_and_Jewett_4/problem13.16.tex b/latex/problems/Serway_and_Jewett_4/problem13.16.tex index 0df674e..02ba8fe 100644 --- a/latex/problems/Serway_and_Jewett_4/problem13.16.tex +++ b/latex/problems/Serway_and_Jewett_4/problem13.16.tex @@ -18,11 +18,11 @@ real dx = 12pt; // length of bonus string for hanging mass & wall above string real r = 12pt; // radius of hanging mass Mass m = Mass(radius=r, L="m"); -pair junction = m.center + (0, r+dx); +pair junction = m.center() + (0, r+dx); real theta = asin(D/L) * 180 / pi; pair wall_join_r = junction + L/2*dir(90-theta); pair surf_ur = wall_join_r + (0, dx); -pair surf_lr = (surf_ur.x, m.center.y - r - dx); +pair surf_lr = (surf_ur.x, m.center().y - r - dx); Surface s_r = Surface(pFrom=surf_lr, pTo=surf_ur); pair wall_join_l = xscale(-1)*wall_join_r; pair surf_ul = xscale(-1)*surf_ur; @@ -30,7 +30,7 @@ pair surf_ll = xscale(-1)*surf_lr; Surface s_l = Surface(pFrom=surf_ul, pTo=surf_ll); Distance d = Distance(pFrom=wall_join_l, pTo=wall_join_r, L="$3L/4$"); -draw(m.center -- junction); +draw(m.center() -- junction); draw(wall_join_l -- junction -- wall_join_r); s_r.draw(); s_l.draw(); diff --git a/latex/problems/Serway_and_Jewett_4/problem14.08.tex b/latex/problems/Serway_and_Jewett_4/problem14.08.tex index 9529e5d..3708d0c 100644 --- a/latex/problems/Serway_and_Jewett_4/problem14.08.tex +++ b/latex/problems/Serway_and_Jewett_4/problem14.08.tex @@ -32,8 +32,8 @@ label("$S_b$", SpeakerB, W); dot(Listener); label("Listener", Listener, E); dAB.draw(); -dAL.draw(rotateLabel=false); -dBL.draw(rotateLabel=false); +dAL.draw(); +dBL.draw(); \end{asy} \end{center} \Part{a} diff --git a/latex/problems/Serway_and_Jewett_4/problem14.20.tex b/latex/problems/Serway_and_Jewett_4/problem14.20.tex index a7281ff..b1a4e09 100644 --- a/latex/problems/Serway_and_Jewett_4/problem14.20.tex +++ b/latex/problems/Serway_and_Jewett_4/problem14.20.tex @@ -31,7 +31,7 @@ for (i=0; i<=n; ++i) { Block vib = Block((-w/2,0), width=w, height=w/3, L="vibrator"); Block obj = Block((L+(1+cos(pi/4))*A, -L/3), width=vib.height, L="$m$"); -Distance dL = Distance((0,vib.height/2), (L,vib.height/2), L="$L$"); +Distance dL = Distance((0,vib.height/2), (L,vib.height/2), L=Label("$L$", N)); draw(p, blue); draw(yscale(-1)*p, blue+dotted); diff --git a/latex/problems/Serway_and_Jewett_4/problem19.07.tex b/latex/problems/Serway_and_Jewett_4/problem19.07.tex index f30773f..c36bacb 100644 --- a/latex/problems/Serway_and_Jewett_4/problem19.07.tex +++ b/latex/problems/Serway_and_Jewett_4/problem19.07.tex @@ -21,7 +21,7 @@ real qb = -18e-9; Charge a = aCharge((0,0)*u, q=qa, L="$q_1$"); Charge b = aCharge((0.03,0)*u, q=qb, L="$q_2$"); -Distance r = Distance(a.center, b.center, L="$r$"); +Distance r = Distance(a.center(), b.center(), L="$r$"); Vector Fab = CoulombForce(a, b, scale=Fscale, L="$F$"); Vector Fba = CoulombForce(b, a, scale=Fscale, L="$F$"); Fab.mag /= 10.0; // Not part of Fscale b/c of rounding @@ -55,7 +55,7 @@ real qb = -18e-9; Charge a = aCharge((0,0)*u, q=(qa+qb)/2, L="$Q/2$"); Charge b = aCharge((0.03,0)*u, q=(qa+qb)/2, L="$Q/2$"); -Distance r = Distance(a.center, b.center, L="$r$"); +Distance r = Distance(a.center(), b.center(), L="$r$"); Vector Fab = CoulombForce(a, b, scale=Fscale, L="$F$"); Vector Fba = CoulombForce(b, a, scale=Fscale, L="$F$"); diff --git a/latex/problems/Serway_and_Jewett_4/problem28.57.tex b/latex/problems/Serway_and_Jewett_4/problem28.57.tex index 4804571..7d56197 100644 --- a/latex/problems/Serway_and_Jewett_4/problem28.57.tex +++ b/latex/problems/Serway_and_Jewett_4/problem28.57.tex @@ -48,10 +48,8 @@ for (i=0; i