How to calculate far field diffractions of specific figures?

4 visualizzazioni (ultimi 30 giorni)
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');

Risposte (0)

Categorie

Scopri di più su Graphics Object Programming in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by