We first illustrate an anomalous reflection scenario in Fig. REF , where \(\phi _{\mathrm {i}}\in [-\frac{\pi }{2},\frac{\pi }{2}]\)  and \(\gamma _{\mathrm {i}}\in [0,2\pi ]\)  are the elevation and the azimuth angle of the incident wave, respectively; \(\phi _{\mathrm {r}}\in [-\frac{\pi }{2},\frac{\pi }{2}]\)  and \(\gamma _{\mathrm {r}}\in [0,2\pi ]\)  are the elevation and the azimuth angle of the reflected wave, respectively. According to the generalized Snell’s law [1]}, to reflect
an incident plane wave into a desired direction by breaking the specular reflection law (i.e., \(\phi _{\mathrm {r}}= \phi _{\mathrm {i}}\) , \(\gamma _{\mathrm {r}}= \gamma _{\mathrm {i}}+\pi \) ),
the reflection phase of each element needs to be set linearly on the corresponding coordinates of both the \(\mathrm {x}\) - and \(\mathrm {y}\) -axes. Specifically, the phase shift of the (\(i, j\) )-th element \(\theta _{k,m,i,j}\)  of the \(k\) -th RIS is obtained by [2]}
\(\theta _{k,m,i,j}=\pi (i-1)q_{\mathrm {x},k}+\pi (j-1)q_{\mathrm {y},k}+\varphi _{k,m},\) 
