chbergmann / OpticsWorkbench

GNU Lesser General Public License v3.0
69 stars 23 forks source link

feature: lens/mirror semitransparency #31

Open alexanderustinov opened 2 years ago

alexanderustinov commented 2 years ago

Hello.

Trying to model an optical system with semitransparent objects. What are thoughts on implementing ability to toggle semitransparency on optical elements?

I think of implementing it for lenses. As simulation does not account for intensity, each boundary for such objects should, i think, introduce refracted and reflected rays. This is why it would not be convenient to implement this feature for mirrors.

chbergmann commented 2 years ago

We could use the transparency property of a ray line to store its intensity. A 60% semitransparent lens could create a new refracted ray with 60% transparency and a mirrored ray with 40% A 60% semitransparent mirror could create a new mirrored ray with 60% transparency let a ray with 40% tranparency pass through A 60% semitransparent absorber could let a new ray with 40% transparency pass through

luzpaz commented 1 year ago

Any traction on this feature ?

chbergmann commented 1 year ago

We should leave this feature request open until somebody finds the motivation to implement it

luzpaz commented 1 year ago

@chbergmann any suggestions on how to implement this ?

chbergmann commented 1 year ago

suggestions: yes, see my comment from Apr 24, 2022 motivation: not really

chbergmann commented 1 year ago

Here is a similar feature request from the FreeCAD forum

I think the input parameters are covered already, as the power reflection coefficient(s) R depend only on the refractive index of the respective materials and the angle of incidence. The polarisation of light after the reflection/transmission interface is a consideration that might be worth maintaining but for visualisation is probably a step too far. For visualisation (representing the proportional energy intensity of each transmitted/reflected portion of the ray), I initially thought line width would be a way to approach it but there is not enough sensitivity as one cannot divide a 1px line. What about using Lightness (Value) of the ray colour where the darker colours represent lower energy intensities? To make such a feature useful for more than just visualisation, adding an "irradiance" parameter to the ray data (ok, so there is an additional input parameter) would be the cherry on the cake as one would then be able to calculate optical efficiency. This might not be as simple to implement as I imagine and describe above as one would then have to deal with the fact that the ray splits (and may split many more times, with subsequent refractive interfaces...) [/quote]

shayded-exe commented 1 year ago

This would be very useful for me. I'd like to simulate designs that use infinity mirrors with 50/50 reflective/transmissive surfaces.