Fraunhofer diffraction through scattering media

2 views (last 30 days)
close all; clear all;
lambda=0.6*10^-6; % wavelength, unit:m
delta=80*lambda; % sampling period,unit:m
z=1; % propagation distance, unit:m
M=512; % space size
c=1:M;
r=1:M;
[C, R]=meshgrid(c, r);
THOR=(((R-M/2-1).^2+(C-M/2-1).^2).^0.5)*delta;
OB=zeros(M); % Object
for a=1:M;
for b=1:M;
if THOR(a,b)<=5*10^-4; % aperture radius unit:m
OB(a,b)=1;
end
end
end
FD=fftshift(fft2(fftshift(OB)));
FD=abs(FD);
FD=FD/max(max(FD));
C=C*lambda*z/M/delta*1000;
R=R*lambda*z/M/delta*1000;
figure; mesh(R, C, FD);
figure; imshow(FD);
title(Modulus of the Fraunhofer diffraction pattern)
Hello,
so the above code simulates Fraunhofer diffraction through a circular aperture. (Code taken from a book). Instead of the circular aperture I want to simulate a phase mask like such
%making a continuos phase mask
continuos_phaseshift = zeros(500,500);
for a = 1:500
for b = 1:500
continuos_phaseshift(a,b) = sin(a);
end
end
but when I replace the circular aperture with this phase mask, I get a weird looking result back. I was expecting a speckle pattern instead as you can see from the figure if you replace this piece of code to the piece of code of the circular aperture, I just get two slits. Any idea what is wrong with this?

Answers (0)

Categories

Find more on Object Containers in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!