chbergmann / OpticsWorkbench

GNU Lesser General Public License v3.0
80 stars 22 forks source link

dispersion added #13

Closed wohltat closed 3 years ago

wohltat commented 3 years ago

Its a bit different to the post in the forum. I discovered that its pretty difficult to find cauchy coefficients for various materials. So i decided to use the more general approach with the sellmeier equation. Theres much more data on that. I haven't filled all sellmeier coefficients, but like half of your original material list. At https://refractiveindex.info you can find the coefficients for quite a lot of materials.

Btw, i accidentally missed to remove a print statement in the execute function.

lgtm-com[bot] commented 3 years ago

This pull request introduces 3 alerts when merging 92da6e9e8cb93d2c55a6ae55fa0f76fc81f7100f into 227f39335fc03fae71cd5958d976fd7f83c8b420 - view on LGTM.com

new alerts:

chbergmann commented 3 years ago

Unfortunately, the dispersion_feature does not work. When you think you are finished, please run the 2D Example and the 3D Example. This will detect errors.

I could solve one problem by changing App.PropertyLength to App:PropertyFloat in fp.addProperty("App::PropertyFloat", "Wavelength", "Ray", "Wavelength of the ray").Wavelength = wavelength

Please go on to get this cool feature working.