As an academic, this is exactly the kind of tool that is perfect for teaching and making exam questions with the minimum of fuss. Thank you for doing it, and thank HN for bringing it to my attention!
Happy to know it can be useful! Just keep in mind that it's still fairly bugged for an extensive usage. Because the issue is maybe with the way Inkscape handles python extensions, it might take a bit before it'll be stable.
I’m very excited about this. But I’m I’m also interested to hear why you chose to build this instead of using Zemax’s sequential mode. I’ve written two bespoke ray tracers in my career and to this day I wonder if I should have written them as zemax extensions. Is it just cost?
Zemax would definitely be a more professional option, but I never got the opportunity to dive into it. Also this is more for quick plots than for complex optics
It’s almost definitely cost! Zemax is what, a 5-digit price for the full pack? Prohibitively expensive for anyone but those deep inside the industry who really get their bang for the buck.
I'd like to to add simple tools someday (like ABCD matrices along a beam). But at some point it's probably better to switch to more evolved softwares, like the ones mentioned in the thread
This is so cool and I would have loved to have had this while I was still an academic for diagrams and interactively playing around with setups. For real design, of course the maths gets harder and the software get more expensive. The closest alternatives that I found before were optgeo[1] and OpticalRayTracer[2] but an inkscape plugin like this is much more useful for making diagrams for article, posters and presentation.
I am sorry to hijack this thread to ask a related question. Does anyone know if libraries or programs exist that can model light rays in 3D for objects without circular base, for instance for modelling head lamps on cars and such?
> Does anyone know if libraries or programs exist that can model light rays in 3D for objects without circular base, for instance for modelling head lamps on cars and such?
I guess there are already such addons for Blender app, but I'm not sure what exactly you need, so it would be better to ask such question in Blender Community places[0].
I vaguely remember reading about a job that required Open Cascade, to do this (designing optics for automotive applications), if that's what you're seeking.
Company was called DBM Reflex in Laval, QC
I'm sure other tools (ie. game engines) will also allow you to model all types of optical effects.
Game engines generally aren't able to model optical phenomena very well, but some rendering engines that use unbiased path tracing, especially if using spectral colours, can do so very well, to the point where they can be used in physics research. Some are guaranteed to tend towards the physically correct solution as long as the material functions are correct.
There's the rayopt[1] Python library. You can find a repo of notebooks modelling a bunch of lenses from the original patents here[2].
I've played around a bit with that myself, modelling a Voigtländer Color-Skopar.
> Could this be used as a simple lens designer? Or are there better programs for than?
Take a look on Etienne de Foras'[0] Astree[1] (an amateur telescope making FLOSS app to help with optical design and optimisation) and on Foucault2[2] (an amateur telescope making FLOSS app to help with mirror design and polishing).
Astree in most cases is enough alternative to proprietary Zemax (+ Astree already support ZMX file format).[3]
That's not actually Ray Tracing as that supports only a single ray sample that's not used to produce a rasterized realistic Image but is instead for creating a diagram of a Ray Path on a 2D simulated Optical experiment Table.
It's only tracing a Path in 2D and for visualizing the ray path and not really using that for actual AO, Shadow, Ambient Occlusion, etc on a 3D Image for realistic image production.
It's a nice tool for the Optical Experimenters out there to Produce SVG based Graphical representations for Publishing their works in Optics/Related fields but that's not Ray Tracing in the way that's used in say Blender 3D's Cycles Rendering(On CPU core or GPU Shader Cores) where photo realistic Images are Produced Using Simulated Rays in a simulated 3D environment/Scene.
I do optics design, and use "ray tracing" to analyze optical systems -- lenses, mirrors, etc. So imagine my surprise when I see a link for "ray tracing," and it's some graphical rendering that I can't fathom or use.
It is actually the same thing, but applied to different areas of interest. In both cases it uses equations from physics to form a simulation of light propagation that is accurate enough under certain conditions.
Optical ray tracing predates the computer age, so people learned analysis techniques that required tracing a bare minimum number of rays. In fact you can learn a lot about a simple system by tracing just two rays. For this reason, ray diagrams shown in optics designs tend to show relatively few rays.
But every optics designer wishes we could have the same cool tools as the graphics people, but with the analysis features that we need.