There is a counter in every mirror, lens and absorber object that counts the number of hits of a ray
Optics Workbench
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Optics Workbench
that counter might be just the ticket! Ill give it a try.
Re: Optics Workbench
I'm a total noob tinkerer with optics, so this is probably obvious.
I have a lens, with a measured focal length.
I googled around an found refraction index = (FL/radius of curvature) + 1
The ray traces I did by hand seem to confirm the FL measurement is correct.
But, I can't seem to get the ray from the Optics workbench to match the image plane.
So, setting the Lens object property Ref. Index to the calculated value.
My method of measuring the radius of curvature could be off as well, but, I don't think it's off enough to cause the ray to cross more than 2X further than I think it should.
Am I just generally off in the weeds?
I have a lens, with a measured focal length.
I googled around an found refraction index = (FL/radius of curvature) + 1
The ray traces I did by hand seem to confirm the FL measurement is correct.
But, I can't seem to get the ray from the Optics workbench to match the image plane.
So, setting the Lens object property Ref. Index to the calculated value.
My method of measuring the radius of curvature could be off as well, but, I don't think it's off enough to cause the ray to cross more than 2X further than I think it should.
Am I just generally off in the weeds?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Optics Workbench
I tried this, and indeed it is possible to get the count an estimate of the elumination of the surface.
There is a problem with this approach though. When using a sperical beam, the distribution of the rays is not uniform. This means that the denser sections of the radiating beam has a larger influence on the beamcount than the lower sections...
I have found an article that describes how to evenly dirstribute points on the surface of a sphere, maybe this might solve it:
https://www.cmu.edu/biolphys/deserno/pd ... e_equi.pdf
Re: Optics Workbench
I managed to implement the paper that i sugested in the previous post:
I'll attempt to make a pull request (never attempted that before) such that the developers can check if the horrible mess i made from the code is acceptable.
--Update:
I made a Pullrequest with my improved 3d point ray cloud:
https://github.com/chbergmann/OpticsWorkbench/pull/25
I'll attempt to make a pull request (never attempted that before) such that the developers can check if the horrible mess i made from the code is acceptable.
--Update:
I made a Pullrequest with my improved 3d point ray cloud:
https://github.com/chbergmann/OpticsWorkbench/pull/25
Re: Optics Workbench
Well, I think you googled bullshit. The refraction index depends on the used material and wavelength. It is independent from the radius of curvature.
To calculate the refracted ray, use Snells law
Re: Optics Workbench
Thank you for your kind advice. It was...well, never mind what it was.christi wrote: ↑Wed Feb 09, 2022 5:53 pmWell, I think you googled bullshit. The refraction index depends on the used material and wavelength. It is independent from the radius of curvature.
To calculate the refracted ray, use Snells law
After more thought and careful reading, it is clear I had not fully thought through what I was attempting to do or ask. (in addition to just beginning to dabble in optics)
Since I have a rather large collection of unknown lenses, I can determine their radius of curvature and focal lengths (within tolerance good enough for my purposes) and with the lens makers equation determine the refractive index. I have seen no other way to use the workbench, if the index is not known.
So, the lens makers formula 1f=(n−1)(1r1+1r2) to find the refractive index n of the lens.
Once I realized I had messed up the radius curvature measurements and corrected that for a couple test lens, the graphical parallel ray method on paper indeed appears to coincide with the results from the workbench.
I never doubted the workbench. I certainly did doubt my understanding of texts I'd read and capability to use the workbench to verify my, by hand, results.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Optics Workbench
I created an commit for adding an extra feature to the Spherical ray.
I wanted to simulate the light trajectory of a led light. By using a spherical ray most of the rays are lost since the led has a directional point source. Thus a lot of computingtime wasted on calculating rays that are not used for the analysis.
So I created a additional parameter for the spherical ray, called "Cone angle".
This transforms the spherical ray to a cone shaped ray (still equally distributed ofcourse.)
maybe something to add in the workbench (did a pullrequest already).
left the cone ray, right the spherical ray (default).
I wanted to simulate the light trajectory of a led light. By using a spherical ray most of the rays are lost since the led has a directional point source. Thus a lot of computingtime wasted on calculating rays that are not used for the analysis.
So I created a additional parameter for the spherical ray, called "Cone angle".
This transforms the spherical ray to a cone shaped ray (still equally distributed ofcourse.)
maybe something to add in the workbench (did a pullrequest already).
left the cone ray, right the spherical ray (default).