Intensity Distribution for Multiple Slit Diffraction

Manipulate[
Pane[
Column[{
intensityPlot[intensityData[b,g,k,a]],
If[se,patternPlot[patternData[b,g,k,a]],Null]}],ImageSize->{370,370}],

{{b,0.01,"slit width (mm)"},0.005,0.05,0.005,Appearance->"Labeled",ImageSize->Tiny},
{{g,0.03,"slit spacing (mm)"},0.025,0.1,0.005,Appearance->"Labeled",ImageSize->Tiny},
{{a,40,"image width (mm)"},2,80,2,Appearance->"Labeled",ImageSize->Tiny},
{{k,2,"number of slits"},{1,2,3,4,5,6,10,15},SetterBar,ControlPlacement->Top},{{se,False,"show screen"},{True,False},ControlPlacement->Top},
ControlPlacement->Left,
SynchronousUpdating->False,
TrackedSymbols:>{b,g,k,a,se},
Initialization:>(
vectorSum=Compile[{{x,_Real},{b,_Real},{g,_Real},{k,_Integer}},
(∑_(j=0)^(k-1))(∑_(i=1)^40)Exp[3174.6 π I(Sqrt[(10^6)+(((x-(-(((k-1)g)/2) +j g -(b/2)+((b i)/41))))^2)])]];

intensityData[SlitWidth_,SlitSpacing_,SlitNumber_,ImageWidth_]:=Module[{positionOnScreen},
Table[{positionOnScreen,(((Abs[(1/(40 SlitNumber))vectorSum[positionOnScreen,SlitWidth,SlitSpacing,SlitNumber]]))^2)},{positionOnScreen,-ImageWidth,ImageWidth,.1}]];

intensityPlot[data_]:=ListLinePlot[data,
InterpolationOrder->3,
PlotRange->{0,1.1},
AxesLabel->{None,"I"},
Filling->Axis,
ImageSize->{370,250}];

patternData[SlitWidth_,SlitSpacing_,SlitNumber_,ImageWidth_]:=Flatten[Table[Map[{#[[1]],i,#[[2]]}&,intensityData[SlitWidth,SlitSpacing,SlitNumber,ImageWidth]],{i,0,1}],1];

patternPlot[data_]:=ListDensityPlot[data,
FrameTicks->{Automatic,None},
PlotRange->{0,Full},
ColorFunction->GrayLevel,
AspectRatio->.2,
ImageSize->{370,100}];
)]

CAPTION

The mathematical treatment of Fraunhofer diffraction can be used to calculate intensity patterns of both single-slit and multiple-slit diffraction. The relevant formulas are difficult to derive with the methods available in college mathematics. As an alternative, this Demonstration uses Richard P. Feynman's method of "integrating over paths". This approach is more physical than mathematical, but leads to the same results.

DETAILS

For each slit, the vectors of 40 waves are summed up at a given point on the screen and then the vector sum over all slits gives the intensity at that point. You can calculate one vector for each slit and achieve a fairly good representation of the intensity distribution. A larger number of waves yields better agreement with experimental results and shows the modulation of intensity depending on the slit width of the grating.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Intensity Distribution for Multiple Slit Diffraction" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/IntensityDistributionForMultipleSlitDiffraction/

Contributed by: Hans-Joachim Domke

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »