# Gratings, Kinoforms, and Phase Masks

Gratings, Kinoforms, and Phase masks are all treated in the same way in KostaCLOUD. Ultimately each of these are treated as a local grating. Below is the vector Grating equation for some projected grating Period Λ. We feed in a unit vector q, and can calculate the resulting vector for mode m.

$$
\hat{q}*m' =  \hat{q} \times \hat{N} + m \frac{2\pi}{|q| \Lambda} \hat{N}*\perp \pm \sqrt{1-\left|\hat{q} \times \hat{N} + m \frac{2\pi}{|q| \Lambda} \hat{N}\_\perp\right|^2} \hat{N}
$$

In order to calculate the grating period for a kinoform or phase mask, we take an approximation of the gradient of the phase at a point corresponds to the this local period. This is a crude approximation, but all of the other Optical Design programs currently do this ( Zemax, Code V, etc. \[All rights reserved to corresponding parties] ). This comes out of the fact that the Fourier Transform of a gradient corresponds to the transverse κ-vector.

### Diffraction Efficiency Calculations

By Default, ODS does not calculate the diffraction efficiency of a given mode. But these calculations can be turned on by checking the Simple Scalar Efficiency Checkbox. In ODS, Diffraction Efficiency calculations are very simplified model to get an idea of roll off and are multiplied by the supplied diffraction efficiencies of the user. This way the user can opt to change them. These calculations can vary based on angle, etc. We only support a few of these calculations, and they are listed below.

In the case of Kinoforms they only vary in terms of wavelength.&#x20;

$$
\eta\_\text{Kino} = \text{sinc}^2(\pi \cdot (\frac{\lambda\_0}{\lambda}-m))
$$

For Ruled Gratings, this calculation a little bit more involved. We implemented the formulas found in \[1] by Casini and Nelson. Where φ is the blaze angle, α is the angle of incidence of the incoming light, and β is the outgoing angle due to diffraction.

$$
\eta\_\text{Blaze} = \text{sinc}^2\left(m\pi \frac{\cos\alpha}{\cos(\alpha-\phi)}\left\[\cos\phi-\sin\phi\cot\frac{\alpha+\beta}{2}\right]\right)
$$

For Sinusoidal Holographic Gratings, we implemented the formulas found in \[2] by Harvey and Pfisterer. Where α is the angle of incidence of the incoming light, and β is the outgoing angle due to diffraction, h is the height of the sinusoid. K is the renormalization factor to enforce conservation of energy, and Q is the intrinsic polarization reflectance/transmittance of the surface.

$$
\eta\_\text{sine} = K \left\[ Q J\_m^2\left(\frac{a}{2}\right)/\cos\beta \right],\quad a = 2\pi(\cos\alpha+\cos\beta) h/\lambda
$$

\[1] R. Casini and P. G. Nelson, “On the intensity distribution function of blazed reflective diffraction gratings,” Journal of the Optical Society of America A 31(10), 2179 (2014) \[doi:10.1364/josaa.31.002179].

\[2] J. E. Harvey and R. N. Pfisterer, “Understanding diffraction grating behavior, part II: Parametric diffraction efficiency of sinusoidal reflection (holographic) gratings,” Optical Engineering 59(01), 1 (2020) \[doi:10.1117/1.oe.59.1.017103].


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kostacloud.com/kostacloud/advanced-optics-ray-trace/gratings-kinoforms-and-phase-masks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
