OpticSim.jl icon indicating copy to clipboard operation
OpticSim.jl copied to clipboard

extend GlassCat to support complex indices of refraction so metals will be properly simulated

Open BrianGun opened this issue 4 years ago • 4 comments

OpticSim does not currently model reflection from metals properly. Adding support for complex indices of refraction to Glasscat and the various functions called by trace would address this problem. Would also require finding online sources of index data for metals, and adding them to the OpticSim GlassCat loader. Possible source of data here http://www.sspectra.com/sopra.html.

BrianGun avatar Sep 20 '21 21:09 BrianGun

See https://github.com/stillyslalom/RefractiveIndex.jl

julia> Ag = RefractiveMaterial("https://refractiveindex.info/?shelf=main&book=Ag&page=McPeak")
"Ag (McPeak et al. 2015: n,k 0.3-1.7 µm)"

julia> Ag.dispersion.n(0.5)
0.041373355

julia> Ag.dispersion.k(0.5)
3.159400537

refractiveindex.info is focused on refraction, of course, and doesn't have all the data needed to populate every GlassCat field, but much of what's needed is there.

stillyslalom avatar Dec 08 '21 17:12 stillyslalom

@BrianGun what in the code would have to be changed to support complex indices?

alok avatar Jan 09 '22 06:01 alok

@alok the functions which deal with computing refracted ray directions would need modification. Fresnel.jl has a lot of this code, in particular the processintersection and the fresnel function. The Glass type would need to be changed to allow for complex indices. Currently the coefficients for the various index models, Sellmeier, etc. are explicitly declared float64. I don't know how these models should be extended to handle complex values. It would help to find a paper that described how to extend the conventional Sellmeier models to complex values.

BrianGun avatar Jan 10 '22 18:01 BrianGun

I don't think the Sellmeier model can be extended to metals, e.g. see Cauchy and related Empirical Dispersion Formulae for Transparent Materials. I don't think the Fresnel equations etc. would be too difficult to adjust, but I think we would need to drop the Sellmeier models for something more appropriate.

Alternatives:

casparvitch avatar Mar 02 '22 11:03 casparvitch