Fraunhofer diffraction simulation in matlab

9 Ansichten (letzte 30 Tage)
Lucrezia Cester
Lucrezia Cester am 17 Feb. 2020
Hello,
I have simulated how light would diffract by going through a phase mask. Below is the code.
lambda=0.6*10^-6; % wavelength, unit:m
delta=80*lambda; % sampling period,unit:m
z=2; % 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
%OB = continuos_phaseshift;
FD=fftshift(fft2(fftshift(exp(1i*continuos_phaseshift))));
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);
Now, I get some output of what the diffraction looks like at 1 meter from the diffracting surface. But now I want this new ouput to go through the same phase mask again.
Does anyone know how to achieve this?

Antworten (0)

Kategorien

Mehr zu Author Block Masks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by