How to calculate far field diffractions of specific figures?
10 次查看(过去 30 天)
显示 更早的评论
For our single/double slit experiment, TA wanted us to simulate diffractions of figures, like rectange, triangle and most important one is hexagon.
We got a code to modify but we can't get these shapes since the code is written for circular or eliptic shapes. Probably a basic modification inside for loop will be enough. Any ideas?
clc
close all
clear all
%------------------------------------------------------------------------
lambda=500e-9; k=(2*pi)/lambda; % wavelength of light in vaccuum
a=1e-6; % radius of diffracting circular aperture
Io=100.0; % relative intensity
R=1.0e-3; % distance of screen from aperture
Y=(-0.25e-2:1e-5:0.25e-2);
Z=(-0.25e-2:1e-5:0.25e-2);% coordinates of the screen
I(1:length(Y),1:length(Z))=0;
% calculating diffracted intensity
for i=1:length(Y)
for j=1:length(Z)
q=(Y(i).^2+Z(j).^2).^0.5;
beta=k*a*q/R;
I(i,j)=Io.*((besselj(1,beta)/beta).^2);
end
end
%------------------------------------------------------------------------
figure(1)
imshow(I)
title('Fraunhofer Diffraction of circular aperture','fontsize',14)
fh = figure(1);
set(fh, 'color', 'white');
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!