ricktu288 / ray-optics

A web app for creating and simulating 2D geometric optical scenes, with a gallery of (interactive) demos.
https://phydemo.app/ray-optics/
Apache License 2.0
1.29k stars 215 forks source link

Color coding light intensities #154

Open hilloinen opened 2 months ago

hilloinen commented 2 months ago

A great simulator!

It is a bit difficult to see what is happening after beam splitters. Maybe adding optional color coding for light intensities? For example, red being 100 % of the original intensity, blue being 10 % intensity (after a suitable beam splitter for example) etc. - or the other way around, as in optics blue photons would be more energetic...

Anyway, this way the beams could have easy to see visual appearance but the intended intensities would also be apparent with the color coding?

ricktu288 commented 2 months ago

Then what should the color look like when the ray density is high and beams of light look continuous? Should the color reflect the power of the individual rays? I don't think so, since if you double the number of rays and half the power of each ray, the result will appear to be the same. But if one applies your color coding it will appear that the former has twice the power.

Also, how about the extremely low-intensity tail? If it is not transparent, then for a convergent series of internal reflections the scene will be filled with that color, which will even be drawn on top of the colors indicating significant rays.

Note that you can use the "Detector" tool to get numerical values for the intensities.