
function rotz(fig)
%
% function rotz(fig)
%
% rotates the current cameraposition about the
% N-S axis in increments of pi/180. Runs forever.
% Default fig is fig=gcf.
%

if nargin<1 fig=gcf; end

nam=get(fig,'name');
if length(nam)<8 | any(nam(1:8)~='show  N=')
   fprintf('\nfigure %g is not named ''show N=...''\n\n',fig)
   return;
end

aks=get(fig,'child');
cam=get(aks,'cameraposition');
tta=pi/180;
M=[cos(tta) -sin(tta);sin(tta) cos(tta)];

shg
while 1
   cam(1:2)=cam(1:2)*M;
   set(aks,'cameraposition',cam);
   drawnow;
end