From: W. Trevor King Date: Wed, 11 Apr 2012 18:17:52 +0000 (-0400) Subject: Update MetaPost to Asymptote in Serway and Jewett v4's problem 19.9. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b255f433af670c7d161b3ef62b9f1a25843b2e9;p=course.git Update MetaPost to Asymptote in Serway and Jewett v4's problem 19.9. --- diff --git a/latex/problems/Serway_and_Jewett_4/problem19.09.tex b/latex/problems/Serway_and_Jewett_4/problem19.09.tex index 0b230ce..23c0349 100644 --- a/latex/problems/Serway_and_Jewett_4/problem19.09.tex +++ b/latex/problems/Serway_and_Jewett_4/problem19.09.tex @@ -7,46 +7,35 @@ circular orbit about a proton, where the radius of the orbit is $r = electron, what is the speed of the electron? \end{problem*} % problem 19.9 -\empaddtoprelude{ - pair A, B, C; - numeric r; - r := 1cm; - A := origin; - B := (r, 0); - C := (-r, 0); - draw A--B; - def drawCbot = - draw A--C; - label.bot("r", (A+C)/2); - enddef; - def drawCtop = - draw_pcharge(A, 6pt); - label.rt("v", draw_velocity(B-(0,1), B, .7*r)); - draw fullcircle scaled (2*r) shifted A; - draw_ncharge(B, 3pt); - enddef; -} - \begin{nosolution} \begin{center} -\begin{empfile}[3ns] -\begin{emp}(0cm,0cm) - drawCbot; - drawCtop; -\end{emp} -\end{empfile} +\begin{asy} +import ElectroMag; + +real u = 2cm; +Charge a = pCharge(); a.draw(); +draw(scale(u)*unitcircle, dashed); +Charge b = nCharge((u, 0)); b.draw(); +Distance dab = Distance(a.center(), b.center(), scale=u, L="$r$"); dab.draw(); +Vector v = Velocity(b.center(), mag=u, dir=90, L="$v$"); v.draw(); +\end{asy} \end{center} \end{nosolution} \begin{solution} \begin{center} -\begin{empfile}[3] -\begin{emp}(0cm,0cm) - drawCbot; - label.top("F", draw_force(A, B, -r/2)); - drawCtop; -\end{emp} -\end{empfile} +\begin{asy} +import ElectroMag; + +real u = 2cm; +Charge a = pCharge(); a.draw(); +draw(scale(u)*unitcircle, dashed); +Charge b = nCharge((u, 0)); b.draw(); +Distance dab = Distance(a.center(), (0,u), scale=u, L="$r$"); dab.draw(); +Vector v = Velocity(b.center(), mag=u, dir=90, L="$v$"); v.draw(); +Charge cs[] = {a, b}; +CoulombForces(cs, scale=u, unit=u/4); +\end{asy} \end{center} \Part{a}