Interference and Diffraction

Initial Setup.

The screen is a distance L away, and is illuminated with laser light with λ .  Put all distances into millimeters for consistency and convenience.   Lastly, we will look at a range of 'y' values on the screen running from -ymax to +ymax.

L = 2000;
λ = 550 * 10^(-6);
ymax = 100;  (* Needed for plots below *)

Assume ‘n’ slits.  Use ‘z’ to describe the position of the slits.  If n is even, they are  positioned at ±d/2, +- 3d/2, etc.  If n is odd, they are positioned at {0, ±d, ±2d} etc. 
Add the waves from the ‘n’ slits.

zlist[n_, d_] :=
If[EvenQ[n],Table[(i/2)*d, {i, -(n-1), (n-1), 2}],
Table[i*d, {i, -(n-1)/2, (n-1)/2, 1}]]

Intensity[y_, n_, d_, λ_, L_]:=
Module[{amp, zs, k, off, t},
zs = zlist[n, d];
k = 2 π/λ;
off = If[EvenQ[n], Sqrt[L^2 + (d/2)^2], L];
amp[t_] = Sum[Cos[k *(Sqrt[L^2 + (y - zs[[i]])^2] - off)-t], {i, 1, Length[zs]}];
(*Print[StringForm["``, ``, ``, ``, ``, ``,``", zs, off, y, n, d, λ, L-off]]; *)
Sum[amp[t]^2, {t, 0, 2π, π/32}]/64
(* amp[t] *) 
]

Dynamic[n]
gratings = ParallelTable[
ListPlot[
Table[{y, Intensity[y, n, 1/10, λ, L]}, {y, -35, 35, 1/10}],
 PlotLabel -> n, PlotRange -> All, Joined -> True, Mesh -> None],
{n, 1, 10, 1}];

Manipulate[Show[gratings[[n]], ImageSize -> Scaled[0.8]], {n, 2, 10, 1, Appearance -> "Open"}]