Rigorous electromagnetic theory (REMT) can be used to calculate the fi
elds above dielectric and metallic gratings. In this paper, by includi
ng evanescent orders, the near fields are presented. The Legendre meth
od is used to carry out these calculations. In this method the fields
in each of the homogeneous sections along a grating period are approxi
mated by Legendre polynomials. This method is an exact eigenfunction m
ethod in which the eigenvalues are found using simple matrix eigenvalu
e/eigenvector algorithms. By carefully dealing with the boundary condi
tions, extremely deep and highly conducting gratings can be examined.
The convergence of the diffraction orders and nonimplicit power conser
vation are used to test the results. Contour plots showing the absolut
e value of the E-field near gratings for a large range of periods, dep
ths, duty cycles, angles of incidence, and surface profiles are presen
ted.