% sBatch3 - batch file makes plots for spline demonstration poster


load testpoints
x = x0; y = y0; z = z0;
 
vaz = 45; vel = 40;
axislim = [-2000 2000 -2000 2000 -2000 2000];
 
Position = [  50   429   284   237 ];
for i = 1:8, 
   H = figure(i); 
   whitebg('white');
   set(H, 'Position',Position ); 
end;

figure(1);


% 8 figures should be plotted, 2 per one iteration
[az, el, r] = cart2sph(x,y,z);
sM = sFit( az, el, r, 32, 1/100*mean(mean(r)), 'plot' );

n = 2*(round(log(32)/log(2))-1);

rect = [ 49.7273   44.3636  199.5000  156.7500 ];
filename = 'poster';
NoOfZeros = 2;

for i = 1:n,
   [A,map] = capture(i);
   B = imcrop(A, rect);
   bmpwrite(B, map, sprintf([filename '%0' num2str(NoOfZeros) 'd.bmp'],i) );
end;
