Fraunhofer diffraction simulation in matlab

10 vues (au cours des 30 derniers jours)
Lucrezia Cester
Lucrezia Cester le 17 Fév 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?

Réponses (0)

Catégories

En savoir plus sur Author Block Masks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by