GNiendorf / tracepy

Ray Tracing and Optical Design in Python
https://tracepy.readthedocs.io
MIT License
60 stars 14 forks source link

Allow user to specify glass type #2

Closed GNiendorf closed 5 years ago

GNiendorf commented 5 years ago

Right now you can only specify the index of refraction N. However, there are several public databases that contain glass types and their index of refraction as a function of the wavelength of incident light, usually in the form of coefficients for some given functional form. It is straight forward to implement this: find a comprehensive database containing glass types and their coefficients, create some function that takes a glass type and wavelength and outputs an index N, and allow a surface to have a variable index of refraction that calls this function when needed.

GNiendorf commented 5 years ago

Solved by PR #19