The Grating feature releases secondary rays of arbitrary diffraction order. The angles at which transmitted and reflected diffraction orders are released are those at which the waves generated by successive unit cells interfere constructively with each other. A transmitted wave of diffraction order
m corresponds to an angle
θm with the boundary normal so that
where λ0 (SI unit: m) is the vacuum wavelength,
d (SI unit: m) is the grating constant,
θi (SI unit: rad) is the angle of incidence, and
n1 and
n2 (dimensionless) are the refractive indices on the incoming and outgoing sides of the boundary, respectively. The corresponding relation for the reflected wave is