Both on- and off-axis four-beam interference patterns are analyzed using ray tracing. The cross gratinglike interference pattern is accompanied by an extra term which consists of two orthogonal two-beam interference patterns. When partially coherent light is used, the extra term generally degrades the contrast of the cross gratinglike pattern unless some special kinds of source are utilized. With gratings of high spatial frequencies, the amplitude of the extra term can become large compared with the desired term. Consequently, the localized cross gratinglike pattern is changed to be periodic in different directions.