Model code to describe fresnel diffraction from a slit