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 :)
thanks

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]
$x'=x \cos\theta+ y\sin\theta$
$y'=-x\sin\theta+ y\cos\theta$