Analysis of a Lloyd's mirror interferometer for fabrication of gratings