To compute the diffraction pattern from a circular disk in MATLAB, we can make use of the Fourier transform of the disk. The steps to achieve this are as follows:
fspecial function in MATLAB. The fspecial function can be used to create special types of matrices that are useful for image processing. We can create a disk shaped matrix using the 'disk' option, and specify the radius of the disk using the second argument. The resulting matrix is then thresholded to create a binary image.main.m175 chars7 lines
fft2 function.main.m87 chars3 lines
Note that we have used the fftshift function to shift the low-frequency components to the center of the image.
main.m75 chars3 lines
The resulting intensity matrix can be visualized using the imshow function.
main.m56 chars3 lines
The resulting image should show a bright central region (corresponding to the zero-order diffraction peak) and a series of concentric rings (corresponding to higher-order diffraction peaks). The size of the rings and the intensity distribution will depend on the size of the disk and the wavelength of light used.
gistlibby LogSnag