Fraunhofer diffraction simulation in matlab

10 次查看(过去 30 天)
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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Author Block Masks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by