// ---------------------- Charges -------------------------
+// charged particle
struct Charge {
pair center;
real q;
}
}
+// positive charge
Charge pCharge(pair center=(0,0), real q=1, real radius=2mm, pen outline=currentpen, Label L="")
{
Charge c = Charge(center=center, q=q, radius=radius, outline=outline, L=L, fill=red);
return c;
}
+// negative charge
Charge nCharge(pair center=(0,0), real q=-1, real radius=2mm, pen outline=currentpen, Label L="")
{
Charge c = Charge(center=center, q=q, radius=radius, outline=outline, L=L, fill=blue);
return c;
}
+// auto-signed charge
+Charge aCharge(pair center=(0,0), real q=1, real radius=2mm, pen outline=currentpen, Label L="")
+{
+ if (q > 0) {
+ Charge c = pCharge(center, q, radius, outline, L);
+ } else {
+ Charge c = nCharge(center, q, radius, outline, L);
+ }
+ return c;
+}
+
// ---------------------- Vectors -------------------------
+// electric field
Vector EField(pair center=(0,0), real mag=5mm, real dir=0, Label L="")
{
Vector v = Vector(center=center, mag=mag, dir=dir, L=L, outline=rgb(1,0.5,0.2)); // orange
return v;
}
+// magnetic field
Vector BField(pair center=(0,0), real mag=5mm, real dir=0, Label L="")
{
Vector v = Vector(center=center, mag=mag, dir=dir, L=L, outline=rgb(0.1,1,0.2)); // green
return v;
}
-Vector Velocity(pair center=(0,0), real mag=5mm, real dir=0, Label L="")
-{
- Vector v = Vector(center=center, mag=mag, dir=dir, L=L, outline=rgb(1,0.1,0.2)); // red
- return v;
-}
-
// ---------------------- Forces -------------------------
-Vector Force(pair center=(0,0), real mag=5mm, real dir=0, Label L="")
-{
- Vector v = Vector(center=center, mag=mag, dir=dir, L=L, outline=rgb(0.1,0.2,1)); // blue
- return v;
-}
-
// Force of a on b
Vector CoulombForce(Charge a, Charge b, Label L="", real scale=1mm, real unit=1mm)
{
}
}
-// ---------------------- Measures -------------------------
-
-// Distance derived from CAD.MeasuredLine
-struct Distance {
- pair pFrom;
- pair pTo;
- real scale;
- pen outline;
- Label L;
-
- void operator init(pair pFrom=(0,0), pair pTo=(5mm,0), real scale=5mm, pen outline=currentpen, Label L="") {
- this.pFrom = pFrom;
- this.pTo = pTo;
- this.outline = outline;
- this.L = L;
- }
-
- void draw(picture pic=currentpicture) {
- picture picF;
- picture picL;
- label(picL, L);
- pair pLabelSize = 1.2 * (max(picL)-min(picL));
- pair pDiff = pTo - pFrom;
- path p = (0,0)--pDiff;
- draw(picF, p, outline, Arrows);
- label(pic = picF,
- L = rotate(degrees(pDiff)) * L,
- position =
- pDiff/2
- + unit(rotate(90)*pDiff) * pLabelSize.y / 2);
- add(pic, picF, pFrom);
- }
-}
-
-struct Angle {
- pair B;
- pair A;
- pair C;
- real radius; // radius < 0 for exterior angles.
- pen outline;
- Label L;
-
- void operator init(pair B, pair A, pair C, real radius=5mm, pen outline=currentpen, Label L="") {
- this.B = B;
- this.A = A;
- this.C = C;
- this.radius = radius;
- this.outline = outline;
- this.L = L;
- }
-
- void draw(picture pic=currentpicture) {
- picture picF;
- picture picL;
- label(picL, L);
- pair pLabelSize = 1.2 * (max(picL)-min(picL));
- path p = arc(B-A, (0,0), C-A, radius);
- real t = reltime(p, 0.5);
- pair P = midpoint(p);
- pair tang = dir(p, t);
-
- draw(picF, p, outline);
- label(pic = picF,
- L = rotate(tang) * L,
- position =
- P + unit(P) * pLabelSize.y / 2);
- add(pic, picF, A);
- }
-}
-
-// TODO: ihat, ijhat
-
-// ---------------------- Shapes -------------------------
-
-// TODO: ring, plate, block, cylinder, spring, table
-
Find the electric force between the two after they have come to equilibrium.
\end{problem*} % problem 19.7
-\empaddtoprelude{
- pair A, B;
- A := origin;
- B := (3cm, 0);
-}
+% A := origin;
+% B := (3cm, 0);
\begin{solution}
\Part{a}
\begin{center}
-\begin{empfile}[1a]
-\begin{emp}(0cm, 0cm)
- label.top("F", draw_force(A, B, -30pt));
- draw_pcharge(A, 5pt);
- label.llft(btex $q_1$ etex, A+6pt*dir(-135));
- draw_ncharge(B, 6pt);
- label.lrt(btex $q_2$ etex, B+6pt*dir(-45));
- label.bot("r", draw_length(A, B, 10pt));
-\end{emp}
-\end{empfile}
+\begin{asy}
+import Mechanics;
+import ElectroMag;
+
+real u = 1cm; // Length of 1 m on the page
+real Fscale = .3cm; // Length of 1 N on the page
+qa = 12e-9;
+qb = -18e-9
+
+Charge a = aCharge((0,0)*u, q=qa, L="$q_1$");
+Charge b = aCharge((0,0.03)*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$");
+
+r.draw();
+Fab.draw();
+Fba.draw();
+a.draw();
+b.draw();
+\end{asy}
\end{center}
\begin{equation}
F = k_e \frac{q_1 q_2}{r^2}
\Part{b}
\begin{center}
-\begin{empfile}[1b]
-\begin{emp}(0cm, 0cm)
- label.top("F", draw_force(A, B, 10pt));
- draw A--B withcolor (.7,.7,.7) withpen pencircle scaled 1pt;
- draw_ncharge(A, 3pt);
- label.llft(btex $Q/2$ etex, A+6pt*dir(-135));
- draw_ncharge(B, 3pt);
- label.lrt(btex $Q/2$ etex, B+6pt*dir(-45));
- label.bot("r", draw_length(A, B, 10pt));
-\end{emp}
-\end{empfile}
+\begin{asy}
+import Mechanics;
+import ElectroMag;
+
+real u = 1cm; // Length of 1 m on the page
+real Fscale = .3cm; // Length of 1 N on the page
+qa = 12e-9;
+qb = -18e-9
+
+Charge a = aCharge((0,0)*u, q=(qa+qb)/2, L="$Q/2$");
+Charge b = aCharge((0,0.03)*u, q=(qa+qb)/2, 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$");
+
+r.draw();
+Fab.draw();
+Fba.draw();
+a.draw();
+b.draw();
+\end{asy}
\end{center}
The total charge on the both spheres is $Q = q_1 + q_2 = -6.0\U{nC}$.
The spheres are identical, so at equilibrium, there will be $Q/2 =