@@ -118,6 +118,35 @@ inline Vector3f halfway(const Vector3f& V, const Vector3f& L)
118118 return (L - V).normalized ();
119119}
120120
121+ /* *
122+ * @brief Returns the refractive index based on the simple cauchy equation
123+ * @param lambda_nm Wavelength in nano meters
124+ * @param A A base coefficient
125+ * @param B B coefficient given in squared micro meters
126+ * @return Refractive index
127+ */
128+ inline float cauchy (float lambda_nm, float A, float B)
129+ {
130+ const float lambda_qm = lambda_nm / 1000 ;
131+ const float lambda_qm2 = lambda_qm * lambda_qm;
132+ return A + B / lambda_qm2;
133+ }
134+
135+ /* *
136+ * @brief Returns the refractive index based on the basic cauchy equation
137+ * @param lambda_nm Wavelength in nano meters
138+ * @param A A base coefficient
139+ * @param B B coefficient given in squared micro meters
140+ * @param C C coefficient given in quadrupled micro meters
141+ * @return Refractive index
142+ */
143+ inline float cauchy (float lambda_nm, float A, float B, float C)
144+ {
145+ const float lambda_qm = lambda_nm / 1000 ;
146+ const float lambda_qm2 = lambda_qm * lambda_qm;
147+ return A + B / lambda_qm2 + C / (lambda_qm2 * lambda_qm2);
148+ }
149+
121150/* *
122151* @brief Returns the (squared) refractive index based on the sellmeier equation
123152* @param lambda_nm Wavelength in nano meters
@@ -154,5 +183,37 @@ inline float sellmeier(float lambda_nm, float B1, float B2, float B3, float C1,
154183{
155184 return std::sqrt (sellmeier2 (lambda_nm, B1 , B2 , B3 , C1 , C2 , C3 ));
156185}
186+
187+ /* *
188+ * @brief Returns the (squared) refractive index based on the polynom equation n^2=A+B1*l^2+B2*l^4+C1/l^2+C2/l^4
189+ * @param lambda_nm Wavelength in nano meters
190+ * @param A A base coefficient
191+ * @param B1 B1 coefficient given in inverse squared micro meters
192+ * @param B2 B2 coefficient given in inverse quadrupled micro meters
193+ * @param C1 C1 coefficient given in squared micro meters
194+ * @param C2 C2 coefficient given in quadrupled micro meters
195+ * @return Squared refractive index
196+ */
197+ inline float poly2 (float lambda_nm, float A, float B1 , float B2 , float C1 , float C2 )
198+ {
199+ float lambda_qm = lambda_nm / 1000 ;
200+ float lambda_qm2 = lambda_qm * lambda_qm;
201+ return A + B1 * lambda_qm2 + B2 * lambda_qm2 * lambda_qm2 + C1 / lambda_qm2 + C2 / (lambda_qm2 * lambda_qm2);
202+ }
203+
204+ /* *
205+ * @brief Returns the refractive index based on the polynom equation n^2=A+B1*l^2+B2*l^4+C1/l^2+C2/l^4
206+ * @param lambda_nm Wavelength in nano meters
207+ * @param A A base coefficient
208+ * @param B1 B1 coefficient given in inverse squared micro meters
209+ * @param B2 B2 coefficient given in inverse quadrupled micro meters
210+ * @param C1 C1 coefficient given in squared micro meters
211+ * @param C2 C2 coefficient given in quadrupled micro meters
212+ * @return Refractive index
213+ */
214+ inline float poly (float lambda_nm, float A, float B1 , float B2 , float C1 , float C2 )
215+ {
216+ return std::sqrt (poly2 (lambda_nm, A, B1 , B2 , C1 , C2 ));
217+ }
157218} // namespace Reflection
158219} // namespace PR
0 commit comments