my journey:

1. added mbar.gif graphics into folder _data/mbar.gif

so now i can compile it n it works nicely.

question:

reference:http://upload.wikimedia.org/math/5/f/f/5ff6494ee391f0ac7cfd0da8851422f3.png

can explain is this the Biotâ€“Savart law you used to model the magnetic feild lines?

compare it with the code

double r2,r3,f;

// caluclate magnetic field at point xp,yp use Biot-Savart Law Fproportional to dlXr/r^3

public double calFx (double xp,double yp) {

f=0;

for(int i=0;i for(int j=0;j r2=(xp-xc[j])*(xp-xc[j])+(yp-yc[i])*(yp-yc[i])+zc[i]*zc[i];

r3=r2*Math.sqrt(r2);

f-=(yc[i]*(yp-yc[i])-zc[i]*zc[i])/r3;

}

}

return f;

}

public double calFy (double xp,double yp) {

f=0;

for(int i=0;i for(int j=0;j r2=(xp-xc[j])*(xp-xc[j])+(yp-yc[i])*(yp-yc[i])+zc[i]*zc[i];

r3=r2*Math.sqrt(r2);

f+=yc[i]*(xp-xc[j])/r3;

}

}

return f;

}

it looks different, sorry it is difficult to follow, as Biot-Savart Law i don't have a deep understanding

i am usuallly on MSN microsoft messager :

**lookang** , can add me as frd then maybe we can arrange to discuss the applet?