How to calculate far field diffractions of specific figures?

6 ビュー (過去 30 日間)
Ege Tunç
Ege Tunç 2019 年 3 月 7 日
編集済み: Ege Tunç 2019 年 3 月 7 日
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 件)

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by