<html><body>
<p>As mentioned in the manual <a href="http://www.geuz.org/getdp/doc/texinfo/getdp_6.html#IDX549">http://www.geuz.org/getdp/doc/texinfo/getdp_6.html#IDX549</a><br>
you can access local coordinates through X[], Y[] and Z[] functions. The rest is trivial.<br>
Since you require a unit vector pointing out of a certain center {Xs,Ys,Zs} towards the local <br>
point, you could use the following relation for the magnetization:<br>
Function{<br>
Hc = 999000;<br>
hc [Magnet] = Hc*Vector[(X[]-Xs)#1, (Y[]-Ys)#2, (Z[]-Zs)#3]/(Sqrt[#1*#1 + #2*#2 + #3*#3]);<br>
}</body></html>