# Simulating the Interference Pattern of Fraunhofer Diffraction by a Single Slit

I'm attempting to simulate the Fraunhofer diffraction pattern due to a single slit. We know that the intensity at an angle θ is $I(\theta)=I_0Sinc^2(\beta)$ where $\beta=kb{Sin(\theta)\over 2}$

Considering the setup shown in the image where O is the origin (the precise center of the single slit) and p is some point on the viewing screen I reasoned that $Sin(\theta)={\sqrt{x^2+y^2}\over \sqrt{x^2+y^2+z^2}}$

So I plugged this into the above equation which gave me $I(\theta)=I_0Sinc^2(kb{({\sqrt{x^2+y^2}\over \sqrt{x^2+y^2+z^2}})\over 2})$

For my parameters I chose $k={2\pi\over 632.8*10^{-9}}$ which corresponds to the wave number for a typical He-Ne laser, $b=0.5 mm$ for the slit width and $z=40 cm$ for how back the screen was placed.
I then ran the following code in Mathematica to try and generate the viewing screen: DensityPlot[ Sinc[(2482.2950802700643 Sqrt[x^2 + y^2])/Sqrt[ 4/25 + x^2 + y^2]]^2, {x, -8, 8}, {y, -8, 8}, ColorFunction -> GrayLevel, PlotPoints -> 200, FrameLabel -> {"x", "y"}]

Which produced:

Pretty psychedelic but not what I was expecting. I was expecting the diffraction pattern to look more like:

So what exactly am I doing wrong and what function should I be doing a density plot of? Thank You

-
1. by using $x^2+y^2$, you assume a symmetry around the central, as if you were treating a hole instead of a slit. Use $x^2$ instead. 2. the ranges of x and y should not be that large (16 m). Choose a much smaller field of view such as 0.010 m. –  fffred Oct 4 '13 at 0:30
If I do that and I run DensityPlot[ Sinc[(2482.2950802700643 Sqrt[x^2])/Sqrt[4/25 + x^2]]^2, {x, -0.005, 0.005}, {y, -0.005, 0.005}, ColorFunction -> GrayLevel, PlotPoints -> 200, FrameLabel -> {"x", "y"}] Then I'll end up with Other Image Which I have seen in my text book as the diffraction pattern but still shouldn't what I get look like: What I posted before –  Bob Jenkins Oct 4 '13 at 0:43
One thing is still missing obviously, but it depends on the situation. Either you have a laser beam as a source, which will have a very small extend in the Y direction (so it makes just a line), or you have a lens after your slit in order to project the fringes at a given distance. In that case, there are some more changes to the formula. –  fffred Oct 4 '13 at 7:44
I do have a focusing lens placed a focal length (40 cm) beyond the single slit so that Fraunhofer diffraction could be viewed in the lab. Can you show me the changes that have to be made to the formula? Thank You –  Bob Jenkins Oct 4 '13 at 14:17
There was a related discussion there. In short, the effect of the lens is to transform angles into positions, $\sin\theta=x/f$ where $f=40$ cm. So plug this into your very first formula, and you will have a simple result. For the direction Y, you can assume that the light was coming from a parallel beam, i.e. no angle: $\theta_y=0$, so that only $y=0$ receives any light. –  fffred Oct 4 '13 at 23:31