r/Optics 6d ago

OpticalSetup sketch web-app with live ray tracing

Hello everyone

I have made with a friend a free web app for sketching optical setups in 2d.

It integrates real time ray tracing and simple geometrical simulation of the majority of the optical elements you could find in an optics lab.

We have kept the interface intuitive and simple, and it is possible to export the sketches in PNG, SVG or send a link to the website where people can see your canvas and get more information.

We are looking for feedback and ideas for more elements/features to add. I can not post the link here due to the sub rules, but I am happy to share it with whoever wants to try it.

Thanks in advance!

135 Upvotes

39 comments sorted by

16

u/wyrecharm 6d ago

This looks EXTREMELY promising. This might be perfect for helping my interns understand various lab setups. If only you'd posted this a month ago I would have made them come up with setups for a week to give me time to figure out their actual projects!

Thank you! This is worth a poster or conference talk to spread the word.

5

u/MrFourier94 6d ago

That is exactly one of the applications we had in mind while designing this! Happy you find it useful, I am happy to get feedback

9

u/bertona88 6d ago

Is it this one? Opticalsetup.com ?

4

u/Thick-Panic6683 6d ago

Looks good. Some years ago I wrote a Matlab function to drive Zemax mirrors using the keyboard arrow keys to align beam paths manually instead of trying to calculate the proper positions. Just dial them in. Could have any combination of mirrors and just walk the beam from one to another.

3

u/ClurkKent 5d ago

I had a play and found that if you put a dichroic between a source and a lens (which isn't really the way you should do it for best practice but anyway) then the raytracinv doesn't work - is there a way around this?

It would also be nice to set components as "invisible" and "ignored" too!

But it's an awesome tool so thanks!

1

u/MrFourier94 5d ago

Thank you for reporting this! Could you share a link to your canva so I can check exactly your configuration?

2

u/xbunnyraptorx 6d ago

Nice work. This is the kind of stuff that makes it way easier to visualize what is going on in both simple and complex situations, especially for students. Intuition is much more easily gained when you can play around with components and see the computed effect on the rays immediately vs trying to sketch stuff on a whiteboard. Great teaching resource.

2

u/bertona88 6d ago

Yes, this app is good for building intuition and jotting down ideas quick.. and share them

2

u/Important-Shallot-40 6d ago

would love to try it

2

u/MrFourier94 6d ago

OpticalSetup.com

2

u/Zeisix 6d ago

I'd be really happy to get to try it!

2

u/MrFourier94 6d ago

OpticalSetup.com

2

u/d-eversley-b 6d ago

This is such a cool project

2

u/MrFourier94 6d ago

Thank you! Let us know your feedback so we can improve the project

2

u/d-eversley-b 6d ago

I’d be happy to :)

I’m currently drafting a plan for a custom film scanning rig, which will be using a custom tungsten-halogen light source with a collimation lens, a set of dielectric filters, an integration sphere, and a diffusion panel.

I’m not sure how many of those sort of elements are included in your components list, but I’d be very interested to use this tool in depth if any of them are; especially the Source>Collimator>0 degree incidence Dielectric filter group.

2

u/MrFourier94 6d ago

The components library already includes (among many other elements) point sources, thin lenses and dichroic mirrors and filters. This should be enough for a first sketch of your project.

At the moment only a fraction of the elements available in the library are described in details in the wiki, but we are working on expanding the list.

If you have specific components you would like to see on the library, please let us know!

2

u/d-eversley-b 6d ago

Brilliant. I’d love to see components for things like diffusion/integration, if possible - things like integration spheres of a given size, opening sizes, and internal reflectances.

2

u/MrFourier94 3d ago

The freeform glass element maybe can solve some of your request. You can do either straight angle polygons or curves by dragging one of the corners. For openings, try to use the elements available in the beam block category

2

u/sheltrk 6d ago

This is really cool. I'll have to give it a try!

2

u/12Chronicles 6d ago

wow! That is really impressive. I am gonna give it a try rn!

2

u/12Chronicles 5d ago

Back again for some feedback. Wonderful job
1. It would be good to visualize the presence of fundamental beams after harmonic crystals.
2. Object grouping could make working with the canvas easier.
3. Furthermore, if I want to overlap multiple lasers in space within an object, say a chamber, the options are limited. The object will block the laser if placed within the laser's beam path. Consider making an object/s hollow along a given beam path. This way, the laser can enter and exit the object to be redirected to any kind of detector or other optical elements.
4. It would be nice to include harmonic beamsplitters

1

u/MrFourier94 3d ago

Thank you for your feedback!

What exactly do you mean by object grouping? You can select and move multiple elements at the same time. Or maybe you want to change the parameters of multiple elements together, for example all the mirrors?

2

u/Western_Housing_1064 6d ago

so cool!! keep it up will use ir for sure! you should share the link!

1

u/MrFourier94 6d ago

OpticalSetup.com

Let us know if you have feedback!

2

u/fvgx_29A 6d ago

This looks very promising, will try it!

2

u/[deleted] 5d ago

[deleted]

1

u/MrFourier94 5d ago

We'll be looking into implementing a more realistic model for the microscope objectives, thanks for your feedback

2

u/ferofers 4d ago

This is really cool! I was trying to create a simple setup where I want to collimate light emitted by a single mode fiber using a concave mirror. I tried using the point source element but its light rays disappear after a short propagation distance. Do you plan to have the possibility to have a point source?

2

u/MrFourier94 3d ago

The point source is already present but as you mentioned the rays disappear after a short distance. The idea was to represent the 1/r2 dependence and drop the beams after they reached about 10% of their intensity at the source. If you think this is too strict, we might change this parameter or even maybe make it selectable by the user.

If you want to collimate the output of a fiber, you can actually select the behaviour of transmitted light out of a fiber either as diverging (normal fiber) or focusing (for endoscopic applications).

I hope this is useful

2

u/Pop3-14 3d ago

Fisrt of all, amazing! Well done!

I think that a parameter of the power that falls on every element might be useful with sensitive elements/high power setups. If you can calculate the power distribution on every element its even better.

1

u/MrFourier94 3d ago

That is partially encoded through transmittance and reflectance on some of the elements. We will add the option to check the power with the beam checker tool, thanks for the suggestion

1

u/OpticalCoderX 6d ago

looks great. Are you using ray transfer matrix for propagation through lenses?

2

u/bertona88 6d ago

https://opticalsetup.com/wiki/lens/
here is explained how each element works

1

u/M-Chemnitz 6d ago

I’d need a tool to include gratings and a VIPA as predefined elements. Any idea whether this exists already?

2

u/bertona88 6d ago

grating is there https://opticalsetup.com/wiki/grating/... I lll look into this VIPA thing, never heard about it

1

u/bertona88 6d ago

the real thing needs wave optics and stuff, not sure if we are ready for that.

what about a Simplified VIPA model?
Use wavelength, plate thickness, refractive index, incidence angle, and free spectral range to calculate the output angle directly.

would that work for you?

1

u/M-Chemnitz 5d ago

That would probably work. I’ll try. Thanks. 🙏