Diffraction gratings and other periodic patterns have long been important tools in research and manufacturing. Diffraction occurs due to the…