Single & Multiple Slit Diffraction

Off[General::spell, General::spell1]
Needs["Graphics`MultipleListPlot`"]

Single Slit

Clear[y, x, α, a]

α = (((π a)/λ)) Sin[
            x];
y = y0 (((Sin[α]/α))^2);

\(plot2 = 
      Plot[{
y /. {λ -> 0.6328, a -> 2.5, 
              y0 -> 1. }, 
y /. {λ -> 
                0.6328, a -> 5.0, 
              y0 -> 
                1. }
}, 
{x, \(-1\), 1}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
        PlotStyle -> {GrayLevel[0], {GrayLevel[0], 
              Dashing[{ .03}]}
}, 
PlotLegend -> {"a= 2.5 μm", "a= 5.0 μm"}, LegendPosition -> {1, \(- .2\)}, LegendTextSpace -> 5, 
        LegendLabel -> \ "λ=0.633 μm", 
        PlotLabel -> "Single Slit Diffraction vs Aperature Size"]\)

\(plot2 = 
      Plot[{
y /. {λ -> 0.6328, a -> 2.5, 
              y0 -> 1. }, 
y /. {λ -> 
                0.488, a -> 2.5, 
              y0 -> 
                1. }
}, 
{x, \(-1\), 1}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
        PlotStyle -> {GrayLevel[0], {GrayLevel[0], 
              Dashing[{ .03}]}
}, 
PlotLegend -> {"λ= 0.633 μm", "λ= 0.488 μm"}, LegendPosition -> {1, \(- .2\)}, 
        LegendTextSpace -> 5, LegendLabel -> \ "a=2.5 μm", 
        PlotLabel -> "Single Slit Diffraction vs Wavelength"]\)

Double Slit

Clear[x, β, d]

β = π (d/λ) Sin[x];
z = 4 y Cos[β]^2;

z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
        d -> 5}

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "Double Slit; λ=0.633 μm; a=2.5 μm;d=5 μm"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 10}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "Double Slit; λ=0.633 μm; a=2.5 μm;d=10 μm"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 20}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "Double Slit; λ=0.633 μm; a=2.5 μm;d=15 μm"]\)

N Slits

Clear[x, z, n]

z = (n^2) y (((Sin[n β]/Sin[β]))^2);

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5, n -> 5}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "N Slits; λ=0.633 μm; a=2.5 μm;d=5 μm; N=5"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5. , 
            n -> 6}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "N Slits; λ=0.633 μm; a=2.5 μm;d=5 μm; N=6"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5, n -> 7}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "N Slits; λ=0.633 μm; a=2.5 μm;d=5 μm; N=7"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5, n -> 8}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "N Slits; λ=0.633 μm; a=2.5 μm;d=5 μm; N=8"]\)

\(plot3 = 
      Plot[z /. {λ -> 0.6328, a -> 2.5, y0 -> 1. , 
            d -> 5, 
            n -> 100}, 
{x, \(- .5\),  .5}, 
        PlotRange -> All, Frame -> True, 
        FrameLabel -> {"y", "Signal"}, 
PlotLabel -> "N Slits; λ=0.633 μm; a=2.5 μm;d=5 μm; N=8"]\)