function s2zanim(speed)
% s2zanim(speed)   Animate mapping from s to z plane
% 2006-11-16 Dan Ellis dpwe@ee.columbia.edu

if nargin < 1
  speed = 0;
end

nmax = 30;
ss = repmat([-nmax:nmax],2*nmax+1,1) + j*repmat([-nmax:nmax]',1,2*nmax+1);

ss = ss/15;

for lscale = -1.5:.01:0
  
  scf = 10^lscale;
  
  zz = (1+scf*ss)./(1-scf*ss);
  
  plot(1+real(zz(:)-1)/scf,imag(zz(:)/scf),'x');
  
  % Make sure double buffering is on for this figure
  set(gcf, 'DoubleBuffer', 'On');
  
  axis([-2.2 2.2 -2.2 2.2])
  grid on
  drawnow;


end
