Fraunhofer diffraction simulation in matlab

조회 수: 10 (최근 30일)
Lucrezia Cester
Lucrezia Cester 2020년 2월 17일
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