prop[k_,y_,t_]:=RotateLeft[InverseFourier[Ff Map[If[Abs[#]<k,Exp[2Pi I y Sqrt[k^2-#^2]/size],0]Exp[-I t]&,Mod[Range[size]-1,size,-(size-1)/2]]],(size-1)/2]

incident[k_,y_,t_]:=Table[Exp[2Pi I y k/size-I t],{size}];

waveSlit[k_,t_]:=Table[If[y<0,incident[k,y,t],prop[k,y,t]],{y,-(size-1)/2,(size-1)/2}]

waveBlock[k_,t_]:=Table[If[y<0,incident[k,y,t],incident[k,y,t]-prop[k,y,t]],{y,-(size-1)/2,(size-1)/2}]

wavePlot[w_,s_]:=ArrayPlot[Reverse[Re[w]],Frame->None,PlotRange->1.4{-1,1},Epilog->{Red,CapForm["Round"],Thickness[.01],s},ImageSize->700]

waveMagPlot[w_,s_]:=ArrayPlot[Reverse[Abs[w]],Frame->None,PlotRange->1.5{0,1},Epilog->{Red,CapForm["Round"],Thickness[.01],s},ImageSize->700]

size=256+1;
a=10;
width=2a+1;

center=(size-1)/2+1;

slit=Line[{{{1,center},{center-a,center}},{{center+a,center},{size,center}}}];

block=Line[{{center-a,center},{center+a,center}}];

f=RotateLeft[PadRight[Table[1.,{2a+1}],size],a];
Ff=Chop[Fourier[f]];

ListPlot[RotateRight[Ff,(size+1)/2],Joined->True,PlotRange->All]

wavelength=5.;
k=size/wavelength;

width/wavelength

wavePlot[waveSlit[k,0.],slit]

wavePlot[waveBlock[k,0.],block]

movie=Table[wavePlot[waveSlit[k,t],slit],{t,0,2Pi,2Pi/10}];

movie=Table[wavePlot[waveBlock[k,t],block],{t,0,2Pi,2Pi/10}];

ListAnimate[movie,20]