function [thetabx, thetaby] = thetabz(sgn,x,y,m,n)
  mm = double(m);
  nn = double(n);
if (sgn == -1)
  thetabx = (x+mm)/((x+mm)^2 + (y-nn)^2);
  thetaby = (nn-y)/((x+mm)^2 + (y-nn)^2);
elseif (sgn == 1)
  thetabx = (x+mm)/((x+ mm)^2 + (y+ nn)^2);
  thetaby = (y+nn)/((x+mm)^2 + (y+nn)^2);
end
