From 954cb494fcf4524f0e0d9f0b2e3a0e686a524659 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 11 Apr 2012 14:04:49 -0400 Subject: [PATCH] Update MetaPost to Asymptote in Serway and Jewett v4's problem 19.4. --- .../Serway_and_Jewett_4/problem19.04.tex | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/latex/problems/Serway_and_Jewett_4/problem19.04.tex b/latex/problems/Serway_and_Jewett_4/problem19.04.tex index 95736d3..842d7da 100644 --- a/latex/problems/Serway_and_Jewett_4/problem19.04.tex +++ b/latex/problems/Serway_and_Jewett_4/problem19.04.tex @@ -6,35 +6,31 @@ and keeps the nucleus from bursting apart. What is the magnitude of $F$? \end{problem*} % problem 19.4 -\empaddtoprelude{ - pair A, B; - A := origin; - B := (3cm, 0); - def drawB = - draw_pcharge(A, 6pt); - draw_pcharge(B, 6pt); - label.bot("r", draw_length(A, B, 10pt)); - enddef; -} - \begin{nosolution} \begin{center} -\begin{empfile}[2ns] -\begin{emp}(0cm, 0cm) - drawB; -\end{emp} -\end{empfile} +\begin{asy} +import ElectroMag; + +real u = 0.5cm; +Charge a = pCharge(); a.draw(); +Charge b = pCharge((3u, 0)); b.draw(); +Distance dab = Distance(a.center(), b.center(), scale=u, L="$r$"); dab.draw(); +\end{asy} \end{center} \end{nosolution} \begin{solution} \begin{center} -\begin{empfile}[2] -\begin{emp}(0cm, 0cm) - label.top("F", draw_force(A, B, 20pt)); - drawB; -\end{emp} -\end{empfile} +\begin{asy} +import ElectroMag; + +real u = 1cm; +Charge a = pCharge(); a.draw(); +Charge b = pCharge((1.25u, 0)); b.draw(); +Distance dab = Distance(a.center(), b.center(), scale=u, L="$r$"); dab.draw(); +Charge cs[] = {a, b}; +CoulombForces(cs, scale=u, unit=u); +\end{asy} \end{center} \begin{equation} -- 2.26.2