  The diffraction of a scalar plane wave from a doubly-periodic surface on
which either the Dirichlet or Neumann boundary condition is imposed is studied
by means of a rigorous numerical solution of the Rayleigh equation for the
amplitudes of the diffracted Bragg beams. From the results of these
calculations the diffraction efficiencies of several of the lowest order
diffracted beams are calculated as functions of the polar and azimuthal angles
of incidence. The angular dependencies of the diffraction efficiencies display
features that can be identified as Rayleigh anomalies for both types of
surfaces. In the case of a Neumann surface additional features are present that
can be attributed to the existence of surface waves on such surfaces. Some of
the results obtained through the use of the Rayleigh equation are validated by
comparing them with results of a rigorous Green's function numerical
calculation.
