it’s easy to make a DLL working as dichroic filter in the surface scatter way, by just changing the specular ray direction according to its wavelength in the DLL. however, it seems it only works in a 2D surface, and when it goes to a volume surface with different refraction index from the air, especially when the ray needs to reflect at the surface inside the volume, it can no longer work normally. examples illustrated as follows:
I analyzed the cause through ray tracing and ray database viewer, and found that if the ray made reflective mandatorily inside a volume via the DLL by one of its surfaces, zemax has no way to know the reflected ray by the surface is still inside the volume, as it seems zemax does not provide such an interface in the function “UserScatterDefinition” .
I hope to consult zemax development engineers and also guys with related experience, how to solve this? thx in advance!
and I also wondering why zemax does not provide the incident ray direction cosines and why it does not support reset the object number where the specular ray is in inside the “UserScatterDefinition” interface?