Analysis and fabrication of grating assisted optical components