%Simulation with LightPipes for Matlab.
%March 1998. F.A. van Goor.
%PoissonSpot.m
%The spot of Poisson.
clear all;

m=1;
nm=1e-9*m;
mm=1e-3*m;
cm=1e-2*m;

lambda=632.8*nm;
size=10*mm;
N=250;
a=1*mm;
dz=20*cm;
z0=20*cm;
F=LPBegin(size,lambda,N);
F=LPGaussHermite(0,0,1.0,size/1.0,F);
F=LPCircScreen(a,0,0,F);
figure('Position',[20 100 1492 462]);
for i=0:8
   z=z0+i*dz;
   F1=LPForvard(z,F);
   I=LPIntensity(1,F1);
   subplot(2,5,i+1);
   subimage(I);
   Str=sprintf('z=%4.1f cm',z/cm)
   title(Str);
   axis off;
end