Fraunhofer diffraction simulation in matlab

11 ビュー (過去 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 Center および File ExchangeAuthor Block Masks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by