FDIFFR Fresnel Diffraction and Cornu Spiral
Requires: FDIFFR1
by Chuck DiMarzio Northeastern University November 2008
!! This file may be copied, used, or modified for educational and !! research purposes provided that this header information is not !! removed or altered, and provided that the book is cited in !! publications, as DiMarzio, Charles A., Optics for Engineers, !! CRC Press, Boca Raton, FL, 2011. !! http://www.crcpress.com !! Other distribution is prohibited without permission.
figs 46-48 ok. 49 is the cornu spiral 50 and 51 are cornu spiral and irradiance for small aperture 52 cornu with sample endpoints for large aperture, 53 matching irradiance plot for 52 54 is same as 53 but in dB 55 Image of large aperture
Note that apparently unused variables in this script are used in fdiffr1.m
Contents
Start
counter=46; lambda=0.5145e-6; % Meters - Argon ion green line k=2*pi/lambda; % First, the Sine and Cosine Integrals xa=(0.01:0.002:8); ci=cos(xa.^2);si=sin(xa.^2); fig46=figure;plot(xa,ci,'k-',xa,si,'k--'); xlabel('u');ylabel('cos(u^2), sin(u^2)'); %print('-depsc',[epspath,'8-',num2str(counter),'-fresd.eps']);counter=counter+1; % % The integrand for a fresnel zone plate % fig47=figure;plot(xa,max(ci,0),'k-'); xlabel('u');ylabel('Zone Plate'); %print('-depsc',[epspath,'8-',num2str(counter),'-fresd.eps']);counter=counter+1; % % The zone plate % z=10; xx=(-0.01:0.0001:0.01); [cx,cy]=meshgrid(xx,xx); rsq=cx.^2+cy.^2; cz=cos(k*rsq/2/z); fig48=figure;imagesc(xx*100,xx*100,(cz>0)&(rsq<0.01^2));axis image;colormap(gray); xlabel('x, cm'); ylabel('y, cm'); %print('-depsc',['8-',num2str(counter),'-fresd.eps']);counter=counter+1; % % The Cornu Spiral % xa=(0.01:0.002:10); xb=(1:5); xc=(0.5:4.5); [c,s]=fresnelCS(xa); cornu=[-fliplr(c),0,c]+1i*[-fliplr(s),0,s]; [cb,sb]=fresnelCS(xb); % Integer values cornub=[-fliplr(cb),0,cb]+1i*[-fliplr(sb),0,sb]; [cc,sc]=fresnelCS(xc); % Integer values cornuc=[-fliplr(cc),cc]+1i*[-fliplr(sc),sc]; fig49=figure;plot(real(cornu),imag(cornu),'k-',... real(cornub),imag(cornub),'ko',... real(cornuc),imag(cornuc),'k+','LineWidth',2); axis image;axis(0.8*[-1,1,-1,1]); %print('-depsc',['8-',num2str(counter),'-fresd.eps']);counter=counter+1; % Small aperture case. Fraunhofer diffraction would have worked D=100e-6; % Meters - Aperture diameter z=5; % Meters - Distance to diffraction pattern xp=[0,5,16,22,32,40]*1e-3; % Specific points to plot sym=['b-+';'g-x';'r-d';'c-s';'m-*';'k-o']; % Point Symbols for these points x=(0:0.1:40)*1e-3; % Whole range of x values cornuaxis=[0.44,0.54,0.46,0.56]; % Everything is in one corner a=D/2; fig50=figure;fig_cornu=fig50; fig51=figure;fig_irrad=fig51; fdiffr1; % Large aperture case. D=2e-2; % Meters - Aperture diameter z=5; % Meters - Distance to diffraction pattern xp=[0,4,8,10,12]*1e-3; sym=['g-x';'r-d';'c-s';'m-*';'y-o']; % Point Symbols for these points x=(0:0.00005:2)*1e-2; cornuaxis=0.8*[-1,1,-1,1]; % Display the whole thing a=D/2; fig52=figure;fig_cornu=fig52; fig53=figure;fig_irrad=fig53; fdiffr1; % Plot this one in dB fig54=figure;plot([-fliplr(x),x]*1e3,10*log10([fliplr(irrad),irrad]),'k-'); xlabel('x, mm');ylabel('Relative Irradiance, dB') %print('-depsc',['8-',num2str(counter),'-fresd.eps']);counter=counter+1; % % Large aperture case lower resolution D=2e-2; % Meters - Aperture diameter z=5; % Meters - Distance to diffraction pattern x=(0:0.005:2)*1e-2; a=D/2; x1=(x+a)*sqrt(k/2/z); x2=(x-a)*sqrt(k/2/z); [r1,i1]=fresnelCS(abs(x1));r1=r1.*sign(x1);i1=i1.*sign(x1); [r2,i2]=fresnelCS(abs(x2));r2=r2.*sign(x2);i2=i2.*sign(x2); irrad=(2*k/4/pi/z)^2*u0*((r2-r1).^2+(i2-i1).^2); fig55=figure;imagesc([-fliplr(x),x]*1e3,(-16:4:20),... repmat([fliplr(irrad),irrad],10,1)); colormap(gray);colorbar; xlabel('x, mm'),ylabel('y, mm'); %print('-depsc',['8-',num2str(counter),'-fresd.eps']);counter=counter+1; %









