for (int i=0; i<as.length; i+=1)
as[i].draw();
-CoulombEFields((-1.5u, 1.4u), c=cs, scale=2u, unit=u/2);
+CoulombEFields((-0.5u, 1.2u), c=cs, scale=2u, unit=u/2);
//Vector Fba = CoulombForce(b,a, scale=2u, unit=u);
//Fba.draw();
CoulombForces(c=cs, scale=2u, unit=u);
string s;
for (int i=0; i<c.length; i+=1) {
s = "$E_{" + format("%d", i+1) + "}$";
- E = CoulombEField(a, c[i], L=s, scale=scale, unit=unit);
+ E = CoulombEField(
+ a, c[i], L=Label(s, position=EndPoint, align=LeftSide),
+ scale=scale, unit=unit);
E.draw();
}
}
for(int j=0; j<c.length; j+=1) {
if (i==j) continue;
s = "$F_{" + format("%d", i+1) + "," + format("%d", j+1) + "}$";
- F = CoulombForce(c[i], c[j], L=s, scale=scale, unit=unit);
+ F = CoulombForce(
+ c[i], c[j], L=Label(s, position=EndPoint, align=LeftSide),
+ scale=scale, unit=unit);
F.draw();
}
}