From ea7512ec1f7be827e296692f78f0d26469bda43d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Apr 2012 03:21:11 -0400 Subject: [PATCH] More problem cleanups (mostly labeling). I've checked through most of the figures, and I haven't seen any obvious mistakes. There are still a few problems in Serway & Jewett v4 that need to be upgraded from MetaPost to Asymptote, though. --- latex/problems/Giancoli_6/problem19.31.tex | 2 +- latex/problems/Giancoli_6/problem19.58.tex | 22 ++++---- .../Serway_and_Jewett_4/equation27.07.tex | 2 +- .../Serway_and_Jewett_4/problem12.18.tex | 2 +- .../Serway_and_Jewett_4/problem13.40.tex | 6 +-- .../Serway_and_Jewett_4/problem14.08.tex | 17 +++---- .../Serway_and_Jewett_4/problem14.20.tex | 3 +- .../Serway_and_Jewett_4/problem19.07.tex | 20 +++----- .../Serway_and_Jewett_4/problem19.11.tex | 8 +-- .../problem12.V2.tex | 6 ++- .../problem12.06.T.tex | 11 ++-- .../problem12.47.T.tex | 10 ++-- .../problem24.57.T.tex | 3 +- .../question09.11.T.tex | 2 +- .../Serway_and_Jewett_8/problem02.11.tex | 12 +++-- .../Serway_and_Jewett_8/problem03.24.tex | 24 ++++++--- .../Serway_and_Jewett_8/problem03.28.tex | 3 +- .../Serway_and_Jewett_8/problem05.25.tex | 3 +- .../Serway_and_Jewett_8/problem05.30.tex | 15 ++++-- .../Serway_and_Jewett_8/problem05.47.tex | 27 ++++++---- .../Serway_and_Jewett_8/problem06.08.tex | 3 +- .../Serway_and_Jewett_8/problem06.11.tex | 9 ++-- .../Serway_and_Jewett_8/problem23.10.tex | 9 ++-- .../Serway_and_Jewett_8/problem23.11.tex | 4 +- .../Serway_and_Jewett_8/problem29.03.tex | 4 +- .../Serway_and_Jewett_8/problem29.22.tex | 3 +- .../Serway_and_Jewett_8/problem30.61.tex | 15 ++++-- .../Young_and_Freedman_12/problem21.84.tex | 50 +++++-------------- .../Young_and_Freedman_12/problem21.86.tex | 3 +- .../Young_and_Freedman_12/problem23.25.tex | 2 +- .../Young_and_Freedman_12/problem27.39.tex | 3 +- .../Young_and_Freedman_12/problem27.73.tex | 6 ++- .../Young_and_Freedman_12/problem28.12.tex | 6 +-- .../wking/problem.sprung-pendulum.tex | 14 ++++-- 34 files changed, 174 insertions(+), 155 deletions(-) diff --git a/latex/problems/Giancoli_6/problem19.31.tex b/latex/problems/Giancoli_6/problem19.31.tex index d9636f2..5a6024b 100644 --- a/latex/problems/Giancoli_6/problem19.31.tex +++ b/latex/problems/Giancoli_6/problem19.31.tex @@ -27,7 +27,7 @@ wire(Jbot, Rcb.end, rlsq); \begin{center} \begin{asy} import Circ; -TwoTerminal Bc = source((0,0), DC, 90, "", "$3.0\U{V}$"); +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); diff --git a/latex/problems/Giancoli_6/problem19.58.tex b/latex/problems/Giancoli_6/problem19.58.tex index 437ca5c..6a3ec24 100644 --- a/latex/problems/Giancoli_6/problem19.58.tex +++ b/latex/problems/Giancoli_6/problem19.58.tex @@ -13,12 +13,12 @@ The original situation looks like \begin{asy} import Circ; real u = 0.5cm; -TwoTerminal B = source((0,0), DC, 90, "$45\U{V}$", "$V$"); +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, normal, 0, "$38\U{k\Ohm}$", "$R_1$"); -TwoTerminal Rb = resistor(Ra.end, normal, 0, "$27\U{k\Ohm}$", "$R_2$"); -TwoTerminal I = current((Rb.end.x, (a.y+b.y)/2), -90, "", "$I$"); +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); @@ -42,15 +42,15 @@ With the voltmeter across $R_1$ we have \begin{asy} import Circ; real u = 0.5cm; -TwoTerminal B = source((0,0), DC, 90, "$45\U{V}$", "$V$"); +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, normal, 0, "$38\U{k\Ohm}$", "$R_1$"); -TwoTerminal Ia = current(Ra.end, 0, "", "$I_1$"); -TwoTerminal Rv = resistor(a+(0,4u), normal, 0, "$95\U{k\Ohm}$", "$R_v$"); -TwoTerminal Iv = current(Rv.end, 0, "", "$I_v$"); -TwoTerminal Rb = resistor(Ia.end, normal, 0, "$27\U{k\Ohm}$", "$R_2$"); -TwoTerminal I = current((Rb.end.x, (a.y+b.y)/2), -90, "", "$I_T$"); +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); diff --git a/latex/problems/Serway_and_Jewett_4/equation27.07.tex b/latex/problems/Serway_and_Jewett_4/equation27.07.tex index e0e40e7..dd242ea 100644 --- a/latex/problems/Serway_and_Jewett_4/equation27.07.tex +++ b/latex/problems/Serway_and_Jewett_4/equation27.07.tex @@ -37,7 +37,7 @@ real E = 1; pair P = (0,0); Vector Et = EField(t*P, u*E, 0, L="$E_t$"); -Vector Eb = EField(t*P, u*E, 140, L="$E_b$"); +Vector Eb = EField(t*P, u*E, 140, L=Label("$E_b$", align=LeftSide)); Angle a = Angle(Et.pTip(), Et.center, Eb.pTip(), Et.mag/2, L="$\Delta \phi$"); Et.draw(); diff --git a/latex/problems/Serway_and_Jewett_4/problem12.18.tex b/latex/problems/Serway_and_Jewett_4/problem12.18.tex index fb64459..a5f1f10 100644 --- a/latex/problems/Serway_and_Jewett_4/problem12.18.tex +++ b/latex/problems/Serway_and_Jewett_4/problem12.18.tex @@ -25,7 +25,7 @@ real a = u/2; Surface surf = Surface(pFrom=(-.7u,-a/2), pTo=(2u,-a/2)); 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 Fspring = Force(b.center, mag=2a, dir=0, L=Label("$F_s$", align=N)); Vector Fexternal = Force(b.center, mag=2a, dir=180, L="$F_e$"); Fspring.draw(); diff --git a/latex/problems/Serway_and_Jewett_4/problem13.40.tex b/latex/problems/Serway_and_Jewett_4/problem13.40.tex index da74b43..26b1757 100644 --- a/latex/problems/Serway_and_Jewett_4/problem13.40.tex +++ b/latex/problems/Serway_and_Jewett_4/problem13.40.tex @@ -28,11 +28,7 @@ draw(scale(u)*unitcircle, dotted); pair source = u*dir(theta/2); pair target = u*dir(-theta/2); -Angle a = Angle(source, (0,0), (source+target)/2, radius=1cm, L=" $\theta/2$"); -// space before text in the label because inline-asymptote doesn't know -// how big the label will be when it sets the positions. See -// http://asymptote.sourceforge.net/doc/LaTeX-usage.html -// So we add some space by hand. +Angle a = Angle(source, (0,0), (source+target)/2, L="$\theta/2$"); a.draw(); draw(target--(0,0)--source); draw((0,0)--((source+target)/2)); diff --git a/latex/problems/Serway_and_Jewett_4/problem14.08.tex b/latex/problems/Serway_and_Jewett_4/problem14.08.tex index 3708d0c..325a26f 100644 --- a/latex/problems/Serway_and_Jewett_4/problem14.08.tex +++ b/latex/problems/Serway_and_Jewett_4/problem14.08.tex @@ -18,19 +18,18 @@ pair SpeakerA = (0,0); pair SpeakerB = (0,2u); pair Listener = (3u,0); -// Extra label text for spacing with inline asymptote -Distance dAB = Distance(SpeakerA, SpeakerB, Label("$L=2\U{m}$", "L=2 m")); -Distance dAL = Distance(Listener, SpeakerA, Label("$d_a=3\U{m}$", "da=3 m")); -Distance dBL = Distance(SpeakerB,Listener, - Label("$\qquad\qquad\qquad\qquad\qquad d_b=\sqrt{L^2+d_a^2}=3.606\U{m}$", - "$d_b=\sqrt{L^2+d_a^2}=3.606mm$")); +Distance dAB = Distance(SpeakerA, SpeakerB, L=Label("$L=2\U{m}$", align=W)); +Distance dAL = Distance(SpeakerA, Listener, + L=Label("$d_a=3\U{m}$", position=Relative(0.4), align=S)); +Distance dBL = Distance(SpeakerB, Listener, + Label("$d_b=\sqrt{L^2+d_a^2}=3.606\U{m}$", align=NE)); dot(SpeakerA); -label("$S_a$", SpeakerA, W); +label("$S_a$", SpeakerA, align=SW); dot(SpeakerB); -label("$S_b$", SpeakerB, W); +label("$S_b$", SpeakerB, align=NW); dot(Listener); -label("Listener", Listener, E); +label("Listener", Listener, align=S); dAB.draw(); dAL.draw(); dBL.draw(); diff --git a/latex/problems/Serway_and_Jewett_4/problem14.20.tex b/latex/problems/Serway_and_Jewett_4/problem14.20.tex index b1a4e09..cbeb4ab 100644 --- a/latex/problems/Serway_and_Jewett_4/problem14.20.tex +++ b/latex/problems/Serway_and_Jewett_4/problem14.20.tex @@ -31,7 +31,8 @@ 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=Label("$L$", N)); +Distance dL = Distance((0,vib.height/2), (L,vib.height/2), + L=Label("$L$", align=LeftSide)); 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 c36bacb..7d69dea 100644 --- a/latex/problems/Serway_and_Jewett_4/problem19.07.tex +++ b/latex/problems/Serway_and_Jewett_4/problem19.07.tex @@ -22,14 +22,9 @@ 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$"); -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 -Fba.mag /= 10.0; - +Charge cs[] = {a, b}; +CoulombForces(c=cs, scale=b.center().x, unit=2cm/abs(qa*qb)); r.draw(); -Fab.draw(); -Fba.draw(); a.draw(); b.draw(); \end{asy} @@ -53,15 +48,12 @@ real Fscale = 5e9cm; // Length of 1 N on the page real qa = 12e-9; 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$"); +Charge a = aCharge((0,0)*u, q=(qa+qb)/2, L=Label("$Q/2$", align=N)); +Charge b = aCharge((0.03,0)*u, q=(qa+qb)/2, L=Label("$Q/2$", align=S)); 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$"); - +Charge cs[] = {a, b}; +CoulombForces(c=cs, scale=b.center().x, unit=3cm/(qa+qb)^2); r.draw(); -Fab.draw(); -Fba.draw(); a.draw(); b.draw(); \end{asy} diff --git a/latex/problems/Serway_and_Jewett_4/problem19.11.tex b/latex/problems/Serway_and_Jewett_4/problem19.11.tex index 52473bf..e22e698 100644 --- a/latex/problems/Serway_and_Jewett_4/problem19.11.tex +++ b/latex/problems/Serway_and_Jewett_4/problem19.11.tex @@ -13,7 +13,7 @@ real u = 2cm; draw_ijhat(); Charge a = aCharge(q=-2.5, "$q_1$"); a.draw(); Charge b = aCharge(q=6.0, (1u, 0), "$q_2$"); b.draw(); -Distance dab = Distance(a.center(), b.center(), offset=12pt, L="$1\U{m}$"); +Distance dab = Distance(a.center(), b.center(), offset=24pt, L="$1\U{m}$"); dab.draw(); \end{asy} \end{center} @@ -28,11 +28,11 @@ real u = 2cm; draw_ijhat(); Charge a = aCharge(q=-2.5, "$q_1$"); a.draw(); Charge b = aCharge(q=6.0, (1u, 0), "$q_2$"); b.draw(); -Distance dab = Distance(a.center(), b.center(), offset=12pt, L="$1\U{m}$"); +Distance dab = Distance(a.center(), b.center(), offset=24pt, L="$1\U{m}$"); dab.draw(); pair c = (-1.82u, 0); -Distance dac = Distance(c, a.center(), offset=24pt, L="$r_1$"); dac.draw(); -Distance dbc = Distance(c, b.center(), offset=36pt, L="$r_2$"); dbc.draw(); +Distance dac = Distance(c, a.center(), offset=36pt, L="$r_1$"); dac.draw(); +Distance dbc = Distance(c, b.center(), offset=48pt, L="$r_2$"); dbc.draw(); Charge cs[] = {a, b}; CoulombEFields(c, cs, scale=u, unit=u); dot(c); diff --git a/latex/problems/Serway_and_Jewett_4_venkat/problem12.V2.tex b/latex/problems/Serway_and_Jewett_4_venkat/problem12.V2.tex index b65b070..5119730 100644 --- a/latex/problems/Serway_and_Jewett_4_venkat/problem12.V2.tex +++ b/latex/problems/Serway_and_Jewett_4_venkat/problem12.V2.tex @@ -150,9 +150,11 @@ real A = sqrt(x**2 + (v/w)**2); pair p = (x*u, -v/w*u); real r = A*u; -Vector xaxis = Vector((-1.4r,0), mag=2.8r, dir=0, gray(0.6), "$x$"); +Vector xaxis = Vector((-1.4r,0), mag=2.8r, dir=0, gray(0.6), + L=Label("$x$", position=EndPoint, align=RightSide)); xaxis.draw(); -Vector yaxis = Vector((0,1.4r), mag=2.8r, dir=-90, gray(0.6), "$v/\omega$"); +Vector yaxis = Vector((0,1.4r), mag=2.8r, dir=-90, gray(0.6), + L=Label("$v/\omega$", position=EndPoint, align=RightSide)); yaxis.draw(); draw(scale(r)*unitcircle); diff --git a/latex/problems/Serway_and_Jewett_4_wking/problem12.06.T.tex b/latex/problems/Serway_and_Jewett_4_wking/problem12.06.T.tex index 0a7e525..3c3ac99 100644 --- a/latex/problems/Serway_and_Jewett_4_wking/problem12.06.T.tex +++ b/latex/problems/Serway_and_Jewett_4_wking/problem12.06.T.tex @@ -17,12 +17,15 @@ real u = 1cm; real a=6.4; // degrees real force=2u; // magnitude -Pendulum p = makePendulum(angleDeg=a, length=2u, stringL="$L$"); +Pendulum p = makePendulum(angleDeg=a, length=2u, + stringL=Label("$L$", align=E, embed=Shift)); p.mass.lc.radius = 0; -Vector fg = Force(p.mass.center()/2, dir=-90, mag=force, L="$F_g$"); +Vector fg = Force(p.mass.center()/2, dir=-90, mag=force, + L=Label("$F_g$", position=EndPoint, align=W)); Vector fgtan = Force(p.mass.center()/2, dir=a-180, mag=force*sin(a), - L=Label("$F_{\tan}$")); -Vector v = Velocity(p.mass.center(), dir=a, mag=0.5u, L="$v$"); + L=Label("$F_{\tan}$", position=EndPoint, align=W)); +Vector v = Velocity(p.mass.center(), dir=a, mag=0.5u, + L=Label("$v$", position=EndPoint, align=S)); fg.draw(); fgtan.draw(); diff --git a/latex/problems/Serway_and_Jewett_4_wking/problem12.47.T.tex b/latex/problems/Serway_and_Jewett_4_wking/problem12.47.T.tex index cd09341..dd8636c 100644 --- a/latex/problems/Serway_and_Jewett_4_wking/problem12.47.T.tex +++ b/latex/problems/Serway_and_Jewett_4_wking/problem12.47.T.tex @@ -32,11 +32,13 @@ import Mechanics; real u = 1cm; Pendulum p = makePendulum(angleDeg=25, length=2u, - angleL="$\theta$", stringL="$r$"); + angleL="$\theta$", stringL=Label("$r$", embed=Shift)); Spring s = Spring(pFrom=p.mass.center(), pTo=p.mass.center()+2u, - unstretchedLength=2u, L="$k$"); -Vector fs = Force(p.mass.center(), dir=180, mag=5mm, L="$F_s$"); -Vector fg = Force(p.mass.center(), dir=-90, mag=7mm, L="$F_g$"); + unstretchedLength=2u, L="$k$"); +Vector fs = Force(p.mass.center(), dir=180, mag=5mm, + L=Label("$F_s$", position=EndPoint, align=W)); +Vector fg = Force(p.mass.center(), dir=-90, mag=7mm, + L=Label("$F_g$", position=EndPoint, align=W)); s.draw(); fs.draw(); diff --git a/latex/problems/Serway_and_Jewett_4_wking/problem24.57.T.tex b/latex/problems/Serway_and_Jewett_4_wking/problem24.57.T.tex index 535f3b9..48e96b7 100644 --- a/latex/problems/Serway_and_Jewett_4_wking/problem24.57.T.tex +++ b/latex/problems/Serway_and_Jewett_4_wking/problem24.57.T.tex @@ -52,7 +52,8 @@ real L = v/f; // m, wavelength real xstart = 8r; real mag = 16r; -Vector x = Vector(center=(xstart*u,0), mag=mag*u, dir=180, L="signal"); +Vector x = Vector(center=(xstart*u,0), mag=mag*u, dir=180, + L=Label("signal", position=EndPoint, align=N)); path a = scale(r*u)*unitcircle; // antenna draw(a); diff --git a/latex/problems/Serway_and_Jewett_4_wking/question09.11.T.tex b/latex/problems/Serway_and_Jewett_4_wking/question09.11.T.tex index 6e91c69..d501ffd 100644 --- a/latex/problems/Serway_and_Jewett_4_wking/question09.11.T.tex +++ b/latex/problems/Serway_and_Jewett_4_wking/question09.11.T.tex @@ -9,7 +9,7 @@ real u = .5cm; Spring Su = Spring(pFrom=(0,0), pTo=(4u,0), k=500, L=Label("$m$", N)); Spring Sc = Spring(pFrom=(0,-2u), pTo=(3u,-2u), k=500, L=Label("$m'$", N)); Distance d = Distance(pFrom=(4u,-2u), pTo=(3u,-2u), scale=u, - L=rotate(90)*Label("$1\U{cm}$", S)); + L=rotate(90)*Label("$1\U{cm}$", align=S)); Su.draw(); Sc.draw(); d.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem02.11.tex b/latex/problems/Serway_and_Jewett_8/problem02.11.tex index fe2c3fb..baf2c93 100644 --- a/latex/problems/Serway_and_Jewett_8/problem02.11.tex +++ b/latex/problems/Serway_and_Jewett_8/problem02.11.tex @@ -36,14 +36,18 @@ pair h2 = (p, T-(L-p)/vh); // hare restart event dot((0,0)); // start dot(f); // finish -Vector T1 = Vector((0,0), mag=length(f), dir=degrees(f), "tortoise"); +Vector T1 = Vector((0,0), mag=length(f), dir=degrees(f), + L=Label("tortoise")); T1.draw(); -Vector H1 = Vector((0,0), mag=length(h1), dir=degrees(h1), "hare"); +Vector H1 = Vector((0,0), mag=length(h1), dir=degrees(h1), + L=Label("hare", align=S)); H1.draw(); -Vector H2 = Vector(h1, mag=length(h2-h1), dir=degrees(h2-h1), "pause"); +Vector H2 = Vector(h1, mag=length(h2-h1), dir=degrees(h2-h1), + L=Label("pause", align=E)); H2.draw(); -Vector H3 = Vector(h2, mag=length(f-h2), dir=degrees(f-h2), "hare"); +Vector H3 = Vector(h2, mag=length(f-h2), dir=degrees(f-h2), + L=Label("hare", align=N)); H3.draw(); xaxis("$x$"); diff --git a/latex/problems/Serway_and_Jewett_8/problem03.24.tex b/latex/problems/Serway_and_Jewett_8/problem03.24.tex index 46df154..acca8de 100644 --- a/latex/problems/Serway_and_Jewett_8/problem03.24.tex +++ b/latex/problems/Serway_and_Jewett_8/problem03.24.tex @@ -18,11 +18,14 @@ real u = 0.25cm; pair a = (2u, 6u); pair b = (3u, -2u); -Vector A = Vector((0,0), mag=length(a), dir=degrees(a), "$\vect{A}$"); +Vector A = Vector((0,0), mag=length(a), dir=degrees(a), + L=Label("$\vect{A}$", align=W)); A.draw(); -Vector B = Vector(a, mag=length(b), dir=degrees(b), "$\vect{B}$"); +Vector B = Vector(a, mag=length(b), dir=degrees(b), + L=Label("$\vect{B}$", align=N)); B.draw(); -Vector C = Vector((0,0), mag=length(a+b), dir=degrees(a+b), "$\vect{C}$"); +Vector C = A + B; +C.label = Label("$\vect{C}$", align=SE); C.draw(); \end{asy} \hspace{1cm} @@ -33,11 +36,14 @@ real u = 0.25cm; pair a = (2u, 6u); pair b = (3u, -2u); -Vector A = Vector((0,0), mag=length(a), dir=degrees(a), "$\vect{A}$"); +Vector A = Vector((0,0), mag=length(a), dir=degrees(a), + L=Label("$\vect{A}$", align=E)); A.draw(); -Vector B = Vector(a-b, mag=length(b), dir=degrees(b), "$\vect{B}$"); +Vector B = Vector(a-b, mag=length(b), dir=degrees(b), + L=Label("$\vect{B}$", align=N)); B.draw(); -Vector D = Vector((0,0), mag=length(a-b), dir=degrees(a-b), "$\vect{D}$"); +Vector D = A - B; +D.label = Label("$\vect{D}$", align=W); D.draw(); \end{asy} \end{center} @@ -88,11 +94,13 @@ pair D = -d; Angle a = Angle((1,0), (0,0), d, red, "$-82.9\dg$"); a.draw(); -Vector vd = Vector((0,0), mag=length(d), dir=degrees(d), "$(1,-8)$"); +Vector vd = Vector((0,0), mag=length(d), dir=degrees(d), + L=Label("$(1,-8)$", position=EndPoint, align=W)); vd.draw(); Angle A = Angle((1,0), (0,0), D, blue, "$97.1\dg$"); A.draw(); -Vector vD = Vector((0,0), mag=length(D), dir=degrees(D), "$(-1,8)$"); +Vector vD = Vector((0,0), mag=length(D), dir=degrees(D), + L=Label("$(-1,8)$", position=EndPoint, align=W)); vD.draw(); Angle r = Angle(d, (0, 0), D, radius=15mm, green, "$180.0\dg$"); r.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem03.28.tex b/latex/problems/Serway_and_Jewett_8/problem03.28.tex index d061906..ac7603e 100644 --- a/latex/problems/Serway_and_Jewett_8/problem03.28.tex +++ b/latex/problems/Serway_and_Jewett_8/problem03.28.tex @@ -25,7 +25,8 @@ draw((0,-5u)--(0, 20u), dashed); // line of scrimmage Vector vDrop = Vector((0,0), mag=length(drop), dir=degrees(drop), "drop"); vDrop.draw(); Vector vScramble = Vector( - drop, mag=length(scramble), dir=degrees(scramble), "scramble"); + drop, mag=length(scramble), dir=degrees(scramble), + L=Label("scramble", align=W)); vScramble.draw(); Vector vPass = Vector(drop+scramble, mag=length(pass), dir=degrees(pass), "pass"); diff --git a/latex/problems/Serway_and_Jewett_8/problem05.25.tex b/latex/problems/Serway_and_Jewett_8/problem05.25.tex index d1fbf92..259026c 100644 --- a/latex/problems/Serway_and_Jewett_8/problem05.25.tex +++ b/latex/problems/Serway_and_Jewett_8/problem05.25.tex @@ -66,7 +66,8 @@ Angle A1 = Angle(dir(180-theta1), (0,0), dir(180+theta2), radius=10mm, Angle A3 = Angle((0,-1), (0,0), dir(-90+theta2), "$\theta_2$"); Vector F1 = Force((0,0), mag=T1, dir=180-theta1, "$\vect{F}_1$"); -Vector F2 = Force((0,0), mag=T2, dir=theta2, "$\vect{F}_2$"); +Vector F2 = Force((0,0), mag=T2, dir=theta2, + L=Label("$\vect{F}_2$", position=EndPoint, align=N)); Vector F3 = Force((0,0), mag=T3, dir=-90, "$\vect{F}_3$"); a1.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem05.30.tex b/latex/problems/Serway_and_Jewett_8/problem05.30.tex index 4f8afa0..780433c 100644 --- a/latex/problems/Serway_and_Jewett_8/problem05.30.tex +++ b/latex/problems/Serway_and_Jewett_8/problem05.30.tex @@ -71,9 +71,11 @@ real m1 = 2; real m2 = 6; real t = g*m1*m2/(m1+m2)*(1+Sin(theta)); -Vector T = Force((0,0), mag=t, dir=90, "$T$"); +Vector T = Force((0,0), mag=t, dir=90, + L=Label("$T$", position=EndPoint, align=E)); T.draw(); -Vector G = Force((0,0), mag=m1*g, dir=-90, "$m_1 g$"); +Vector G = Force((0,0), mag=m1*g, dir=-90, + L=Label("$m_1 g$", position=EndPoint, align=E)); G.draw(); dot("$m_1$", (0,0), W); \end{asy} @@ -88,11 +90,14 @@ real m1 = 2; real m2 = 6; real t = g*m1*m2/(m1+m2)*(1+Sin(theta)); -Vector T = Force((0,0), mag=t, dir=180-theta, "$T$"); +Vector T = Force((0,0), mag=t, dir=180-theta, + L=Label("$T$", position=EndPoint, align=NE)); T.draw(); -Vector N = Force((0,0), mag=m2*g*Cos(theta), dir=90-theta, "$N$"); +Vector N = Force((0,0), mag=m2*g*Cos(theta), dir=90-theta, + L=Label("$N$", position=EndPoint, align=E)); N.draw(); -Vector G = Force((0,0), mag=m2*g, dir=-90, "$m_2 g$"); +Vector G = Force((0,0), mag=m2*g, dir=-90, + L=Label("$m_2 g$", position=EndPoint, align=E)); G.draw(); dot("$m_2$", (0,0), SE); \end{asy} diff --git a/latex/problems/Serway_and_Jewett_8/problem05.47.tex b/latex/problems/Serway_and_Jewett_8/problem05.47.tex index d6c2147..8a0c51b 100644 --- a/latex/problems/Serway_and_Jewett_8/problem05.47.tex +++ b/latex/problems/Serway_and_Jewett_8/problem05.47.tex @@ -44,10 +44,14 @@ real m2 = 18; real mu = 0.1; real t = f*m1/(m1+m2); -Vector G = Force((0,0), mag=m1*g*vscale, dir=-90, "$m_1g$"); -Vector N = Force((0,0), mag=m1*g*vscale, dir=90, "$\vect{N}_1$"); -Vector T = Force((0,0), mag=t, dir=0, "$T$"); -Vector F = Force((0,0), mag=mu*m1*g, dir=180, "$\vect{F}_{f1}$"); +Vector G = Force((0,0), mag=m1*g*vscale, dir=-90, + L=Label("$m_1g$", position=EndPoint, align=S)); +Vector N = Force((0,0), mag=m1*g*vscale, dir=90, + L=Label("$\vect{N}_1$", position=EndPoint, align=NE)); +Vector T = Force((0,0), mag=t, dir=0, + L=Label("$T$", position=EndPoint, align=NE)); +Vector F = Force((0,0), mag=mu*m1*g, dir=180, + L=Label("$\vect{F}_{f1}$", position=EndPoint, align=W)); G.draw(); N.draw(); @@ -69,11 +73,16 @@ real mu = 0.1; real t = f*m1/(m1+m2); real dy=1mm; -Vector G = Force((0,0), mag=m2*g*vscale, dir=-90, "$m_2g$"); -Vector N = Force((0,0), mag=m2*g*vscale, dir=90, "$\vect{N}_2$"); -Vector E = Force((0,0), mag=f, dir=0, "$\vect{F}$"); -Vector T = Force((0,dy), mag=t, dir=180, "$T$"); -Vector F = Force((0,-dy), mag=mu*m2*g, dir=180, "$\vect{F}_{f2}$"); +Vector G = Force((0,0), mag=m2*g*vscale, dir=-90, + L=Label("$m_2g$", position=EndPoint, align=S)); +Vector N = Force((0,0), mag=m2*g*vscale, dir=90, + L=Label("$\vect{N}_2$", position=EndPoint, align=NE)); +Vector E = Force((0,0), mag=f, dir=0, + L=Label("$\vect{F}$", position=EndPoint, align=NE)); +Vector T = Force((0,dy), mag=t, dir=180, + L=Label("$T$", position=EndPoint, align=NW)); +Vector F = Force((0,-dy), mag=mu*m2*g, dir=180, + L=Label("$\vect{F}_{f2}$", position=EndPoint, align=SW)); G.draw(); N.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem06.08.tex b/latex/problems/Serway_and_Jewett_8/problem06.08.tex index 42c3117..7c25938 100644 --- a/latex/problems/Serway_and_Jewett_8/problem06.08.tex +++ b/latex/problems/Serway_and_Jewett_8/problem06.08.tex @@ -33,7 +33,8 @@ real mg = 1.3u; draw((0,0)--(0, mg)); Angle t = Angle(dir(90), (0,0), dir(90+theta), "$\theta$"); t.draw(); -Vector T = Force((0,0), mag=mg/Cos(theta), dir=(90+theta), "$T$"); +Vector T = Force((0,0), mag=mg/Cos(theta), dir=(90+theta), + L=Label("$T$", align=SW)); T.draw(); Vector G = Force((0,0), mag=mg, dir=(-90), "$mg$"); G.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem06.11.tex b/latex/problems/Serway_and_Jewett_8/problem06.11.tex index 5fa65c6..062639b 100644 --- a/latex/problems/Serway_and_Jewett_8/problem06.11.tex +++ b/latex/problems/Serway_and_Jewett_8/problem06.11.tex @@ -15,7 +15,7 @@ import Mechanics; real u = 1cm; Mass m = Mass((u,0), "$m$"); -Vector F = Force(m.center(), mag=0.7u, dir=180, "$F_f$"); +Vector F = Force(m.center(), mag=0.7u, dir=180, L=Label("$F_f$", align=SW)); draw(scale(u)*unitcircle); Distance r = Distance((0,0), u*dir(45), "$r$"); @@ -37,11 +37,12 @@ real u = 1cm; real theta = 25; real mg = 1.3u; -Vector F = Force((0,0), mag=0.7u, dir=180, "$F_f$"); +Vector F = Force((0,0), mag=0.7u, dir=180, + L=Label("$F_f$", position=EndPoint)); F.draw(); -Vector G = Force((0,0), mag=1u, dir=-90, "$mg$"); +Vector G = Force((0,0), mag=1u, dir=-90, L=Label("$mg$", position=EndPoint)); G.draw(); -Vector N = Force((0,0), mag=1u, dir=90, "$N$"); +Vector N = Force((0,0), mag=1u, dir=90, L=Label("$N$", position=EndPoint)); N.draw(); dot((0,0)); diff --git a/latex/problems/Serway_and_Jewett_8/problem23.10.tex b/latex/problems/Serway_and_Jewett_8/problem23.10.tex index dc6e5ed..808ac02 100644 --- a/latex/problems/Serway_and_Jewett_8/problem23.10.tex +++ b/latex/problems/Serway_and_Jewett_8/problem23.10.tex @@ -40,9 +40,12 @@ import Mechanics; real theta = 5; real E_mag = 0.1cm; -Vector T = Vector((0,0), mag=E_mag/Sin(theta), dir=90+theta, "$T$"); -Vector G = Vector((0,0), mag=E_mag/Tan(theta), dir=-90, "$mg$"); -Vector E = Vector((0,0), mag=3*E_mag, dir=0, "$F_E$"); +Vector T = Vector((0,0), mag=E_mag/Sin(theta), dir=90+theta, + L=Label("$T$", position=EndPoint)); +Vector G = Vector((0,0), mag=E_mag/Tan(theta), dir=-90, + L=Label("$mg$", position=EndPoint)); +Vector E = Vector((0,0), mag=3*E_mag, dir=0, + L=Label("$F_E$", position=EndPoint, align=E)); T.draw(); G.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem23.11.tex b/latex/problems/Serway_and_Jewett_8/problem23.11.tex index fa42222..3de9197 100644 --- a/latex/problems/Serway_and_Jewett_8/problem23.11.tex +++ b/latex/problems/Serway_and_Jewett_8/problem23.11.tex @@ -18,8 +18,8 @@ Charge q1 = aCharge((0,0), q=3, "$q_1$"); Charge q2 = aCharge((d,0), q=1, "$q_2$"); Charge q3 = aCharge((x,0), q=0, "$q_3$"); -Distance dx = Distance((0,0), (x,0), offset=-30pt, "$x$"); -Distance dd = Distance((0,0), (d,0), offset=-12pt, "$d$"); +Distance dx = Distance((0,0), (x,0), offset=30pt, "$x$"); +Distance dd = Distance((0,0), (d,0), offset=12pt, "$d$"); dx.draw(); dd.draw(); diff --git a/latex/problems/Serway_and_Jewett_8/problem29.03.tex b/latex/problems/Serway_and_Jewett_8/problem29.03.tex index 7559214..b43eab8 100644 --- a/latex/problems/Serway_and_Jewett_8/problem29.03.tex +++ b/latex/problems/Serway_and_Jewett_8/problem29.03.tex @@ -24,7 +24,7 @@ real u=1cm; Vector f = Force(mag=u, dir=90, Label("$\vect{F}_B$", EndPoint, N)); f.draw(); -Vector v = Velocity(mag=u, phi=90, Label("$\vect{v}$", EndPoint, S)); +Vector v = Velocity(mag=u, phi=90, Label("$\vect{v}$", EndPoint, E)); v.draw(); label("\Part{b}", (0,0), S); \end{asy} @@ -36,7 +36,7 @@ real u=1cm; Vector f = Force(mag=u, dir=180, Label("$\vect{F}_B$", EndPoint, N)); f.draw(); -Vector v = Velocity(mag=u, phi=-90, Label("$\vect{v}$", EndPoint, S)); +Vector v = Velocity(mag=u, phi=-90, Label("$\vect{v}$", EndPoint, E)); v.draw(); label("\Part{c}", (0,0), S); \end{asy} diff --git a/latex/problems/Serway_and_Jewett_8/problem29.22.tex b/latex/problems/Serway_and_Jewett_8/problem29.22.tex index 92281a5..1831a54 100644 --- a/latex/problems/Serway_and_Jewett_8/problem29.22.tex +++ b/latex/problems/Serway_and_Jewett_8/problem29.22.tex @@ -34,7 +34,8 @@ for (int i=0; i