i think there is a bug in the calculation of B field.
the animated gif (click on the thumbnail to view) shows 2 different reading of B for the same position from the North pole.
horizontal B = 16.9
vertical B = 2.68
same direction from North pole, something is wrong, can help me? i read the code but no idea how to fix it :)
i attached my remix in case need, i am slowly add in
[b][color=blue]oh!!! i did it!!
fixed the bug in the calculation of B field.[/color][/b]
[quote author=Fu-Kwun Hwang link=topic=1582.msg5984#msg5984 date=1271774452]
What I did was make a transformation:
for all the coordinates (magnet, compass, field)
[code] double dx=x-(dipoles[i]*cs+dipoles[i]*sc)-(xMagnet*cs+yMagnet*sc);//FKH
double dy=y-(-dipoles[i]*sc +dipoles[i]*cs)-(-xMagnet*sc+yMagnet*cs);//FKH[/code]
not to worry. hurray!!