%Cicular aperture grapher %made by Alex Fritzler 10/9/2014 %Modified by Steven Sahyun 141010 D = 69; %distance to screen in cm rmax = 2; %scan distance in cm [X,Y] = meshgrid(-rmax:0.1:rmax); r = sqrt(X.^2 + Y.^2)+eps; thetar = atan(r./D); d = 40000; % Aperture size in nm lambda = 655; % wavelength in nm k = 2*pi/lambda; I_0 = 1; J_1r = besselj(1, k*d*sin(thetar)); %Bessel function of the first kind. I_thetar = I_0*((2.*(J_1r))./(k*d*sin(thetar))).^2;% Eq. 6.18 p. 143 %phi = 0:0.1:2*pi; %x = r.*cos(phi); %y = r.*sin(phi); %plot(r, J_1r); % This plots the Bessel function of the first kind. %plot(r, I_thetar); % This will plot a 2-d graph of the circular irradiance z = I_thetar; meshz(z); % This plots a 3D mesh picture of the irradiance. Fig. 6.11 %surf(z); % This plots a surface 3D plot % Un-comment the lines below to get a "smooth and shiny" plot: %surf(z,'FaceColor','interp','EdgeColor','none','FaceLighting','phong') %daspect([5 5 0.1]) %axis tight %camlight('left') %view(120,30) % To accentuate the "ripples" set z axes to be log scale % set(gca, 'XScale', 'lin', 'YScale', 'lin', 'ZScale', 'log')