Update MetaPost to Asymptote in Serway and Jewett v4's problem 19.9.
authorW. Trevor King <wking@drexel.edu>
Wed, 11 Apr 2012 18:17:52 +0000 (14:17 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 11 Apr 2012 18:17:52 +0000 (14:17 -0400)
latex/problems/Serway_and_Jewett_4/problem19.09.tex

index 0b230cea11870b69caa522473611e64fd3c6e068..23c03495dfc7cf6b8c5d557b9e3650c3cd98e7a6 100644 (file)
@@ -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}