How to calculate far field diffractions of specific figures?

5 vues (au cours des 30 derniers jours)
Ege Tunç
Ege Tunç le 7 Mar 2019
Modifié(e) : Ege Tunç le 7 Mar 2019
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');

Réponses (0)

Catégories

En savoir plus sur Graphics Object Programming dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by