I'm stuck for some days trying to get the diffraction pattern from a binary grating / square period grating / multi-aperture square screen... whatever you want to call it.
Imagine I have a 8 * 5 square apertures grating. Something like this:
The intensity profile from a single aperture is easy to calculate:
% Clean all clc; close all; clear all; % Light Source lambda = 550e-9; % Wavelength [m] k = (2*pi)/lambda; % Wavenumber [m^-1] Io = 100; % Relative intensity % Aperture a = 1e-6; % Aperture size X-axis [m] b = 1e-6; % Aperture size Y-axis [m] % Screen R = 1e-3; % Distance aperture-screen [m] dsize = 0.5e-2; % Square size [m] dpix = 1000; % Dimension [pixel] X = -dsize:2*dsize/dpix:dsize; % Screen X-axis Y = X; % Screen Y-axis % Intensity Profile alpha = k*a*X/(2*pi*R); % Periodic parameter X-axis beta = k*b*Y/(2*pi*R); % Periodic parameter Y-axis I = Io*(sinc(alpha).^2)'*(sinc(beta).^2); % Intensity profile % Print fig = figure(); imshow(I);
To calculate the same for a 8 * 5 grating, I have to do a convolution of my unit-square aperture by a comb function. I will get an infinite pattern. Then I just have to multiply it by rectangular (sinc) function to get a non-infinite pattern. But I'm struggling with it.
I would like to get something to input in Matlab.
Could you advise me?