Pupil Distortion in a System with Two Arbitrarily Oriented Plane Gratings