% Level curves r = 1 for the first 21 exponential sums (Fig. 2)
% using the 'Events' capability and integration of complex
% dependent variables
global n
nmin = 1;  nmax = 21;  tol = 1e-6;
axis equal;  hold on; % arc = [];
options= odeset('RelTol',tol,'AbsTol',tol,'Events','on');
for n = nmin:nmax,
   sf = 0.94574*(n +.5*log(2*pi*n) + 3); 
   [s,z] = ode45('level', [0 sf],0,options);
   plot(z);
% arclengths and bounds sf
   % arc = [arc; s(length(s)), sf]; 
end; 

