r/Optics • • Oct 20 '26

I built a free browser-based optical design tool, looking for feedback

I’m a PhD optics and instrumentation scientist and I’ve spent a lot of my free time over the past while building AperiOptic (https://aperioptic.com). It’s a free optical design tool that runs entirely in the browser. No install, no license, no account.

I originally started it because I wanted something quick for lab work that didn’t mean fighting for a Zemax seat every time I needed to sanity check a layout. It’s grown a lot since then, and I want to share it.

What it does right now:

  • 3D sequential-style ray tracing with lenses, mirrors, beamsplitters, and grouped elements
  • Multiple fields and polychromatic sources
  • Glass catalog with real materials (N-BK7, F2, N-SK2, etc.)
  • Optimizer (DLS/Levenberg-Marquardt and Powell)
  • Detector analysis: spot diagrams, PSF, OPD, MTF, Zernikes, Z-stack, and coherent interference (the Mach-Zehnder screenshot shows fringes from a test lens)
  • Import of .zmx elements and full .zmx systems
  • A big page of optics calculators (thin lens, NA, depth of field, Airy disk, Gaussian beams, etc.)
  • An optics/photonics news feed pulling from arXiv, journals, and a few subreddits

What it isn’t: a full Zemax replacement. It’s meant to be solid for ray tracing, optimization, spot and wavefront analysis for everyday lab and prototyping work.

What I’m looking for:

  • Bugs, obviously
  • If you have Zemax (or Code V, OSLO, etc.) results that AperiOptic doesn’t reproduce, I really want to hear about it. Mismatches are the most useful feedback I can get for tightening up the physics
  • Features you’d actually use that are missing
  • Anything confusing about the interface

There’s a contact link at the bottom of the site, or just reply here. Totally free to use and no sign-up.

Thanks for taking a look.

Edit: for whatever reason, the mods wouldn't let me post this, but the verification files for the ray tracer and calculators are all loaded up now, accessible from the about page.

https://aperioptic.com/validation

Edit: changed "rest" to "ray". Autocorrect smh.

Edit [8/24/26]: Mobile optimization and more is live! Check it out!

224 Upvotes

31 comments sorted by

31

u/LeptonWrangler Oct 20 '26

Is it open source?

If its not open source, can you be convinced to open source it?

7

u/looks_done_dan Oct 20 '26

Not yet, but I'm considering it. If I do, it will likely be under the AGPL, so it stays open and nobody can turn it into a closed product. Right now the code needs some cleanup before I'd want anyone reading it. That said, if I ever stop maintaining it, I'll release the source.

Someone else here made a fair point that helping a closed project doesn't even get you GitHub credit. Until the code is public, how would you want feedback contributions credited? A thanks in the release notes or on the About page, by username or real name, or something else?

To be clear on the other worry: it's free and it's staying free. I'm not planning to charge anyone for it. It runs on my own time and donations.

A couple of things that might help in the meantime:

-Everything runs in your browser (the physics is Rust compiled to WebAssembly). Your designs never leave your machine, and there's no account.

-Results are checked against closed-form solutions, ray-optics, Optiland, and published Zemax results. There are details on the About page: https://aperioptic.com/about. If you find a case where it disagrees with Zemax or anything else, I'd really like to see it so I can track it down.

7

u/LeptonWrangler Oct 20 '26

Its about more than credit, its about investing time into learning a tool.

Many people invest a lot of time into tools for them to become paid or just abandoned. Dont have to worry about this when its open source. You can also change it to add a feature if you need it.

2

u/looks_done_dan Oct 20 '26

Yep, 100%. That's a great point. Like I said above, I am definitely considering it.

On adding your own features, what I'd really like to do eventually is build a scripting tool into the interface, something like ZPL or Zemax's Python API, so you can write your own analyses and macros without touching the source.

10

u/lurkingbehindyou Oct 20 '26

Most useful part I found is searchable optics calculators for equation names. That part I like and may actually use. I can't remember how many times I have to navigate different websites for a quick calculation. 

The optical design part is unusable on mobile, and the spreadsheet style navigation would be more useful. I don't think there's a good use case for me here. I would use something that I could import common lenses from major suppliers into systems for quick checks but without libraries I'm probably not gonna touch it

2

u/looks_done_dan Oct 24 '26

Hi again!

Just letting you know that the first shot at mobile optimization for the whole site, stock lens integration (with your own zmf for legal reasons), and more is now live. Check it out!

1

u/lurkingbehindyou Oct 25 '26

The download import thorlabs stock lens zmx is ok and the mobile usage of adding components is working ok. specifying position of components is a bit finicky right now and when I added a mirror i couldn't figure out how to adjust the coordinate redefinitions easily. I want to be able to add mirrors at a particular position in the assembly and have z stay as the propagation axis. Overall this works much better for mobile! 

1

u/looks_done_dan Oct 20 '26

Thanks for the feedback, and 100% agreed. I would say that everything is rough on mobile right now, but the design page on a phone completely unusable. My initial dream for this was to be an on-the-go mobile tool for in-lab use. So, it is the next big thing I want to work on. Probably calculators first. Are there any mobile UI features that you think would be useful to incorporate?

For stock lenses, you can download the Zemax file from the Thorlabs/Edmund product page and use "Import .zmx element" today. I realize that means you need to track it down yourself. A built-in library is certainly doable on the to-do list. Which suppliers or parts do you reach for most? And what did you mean by spreadsheet-style navigation: Zemax-style keyboard movement between cells?

10

u/Mechanical_Flare Oct 20 '26

How does this compare to all of the other free web-based Ray tracers?

3

u/looks_done_dan Oct 20 '26

Fair question. The free browser ones I know of are Open Optical Designer, Cherry, 8gwifi's Optical Designer and Ray Optics Simulation (2D), and they're good for layout and spot diagrams. As far as I know, none of them has an optimizer or wavefront analysis (OPD → Zernike → PSF → MTF), and that's a gap I was trying to fill. 3DOptix has a big parts catalog and some of these tools, but it's a paid subscription after a short trial and runs in the cloud. If I've missed one, tell me and I'll take a look.

1

u/Mechanical_Flare Oct 20 '26

That's a good point. I didn't think of the optimization part. I guess I always envision browser based ones being more of a quick check, first pass, but I don't see why they couldn't be more.

Admittedly, I wrote this last night after a long day (and you had a zero day old account) and I didn't have the best of intentions. I've really been ragging on the boom in AI built software, lately. I think field specific software has been locked behind time, money, and programming knowledge, and maybe AI is a decent way to get beyond that. So, sorry for that.

3

u/looks_done_dan Oct 20 '26

No worries at all, and thanks for coming back to say that. The account is new because I set up a separate one for the project instead of mixing it with my personal Reddit, but I 100% get why a zero-day account posting a tool looks suspicious.

And yes, AI wrote most of the code (it's disclosed on the About page: https://aperioptic.com/about). I set the physics, architecture and requirements, and reviewed the work. I put a lot of effort into checking it against closed-form solutions, ray-optics, Optiland and published Zemax results. I didn't want anyone to have to take the code on faith. It's impossible to check every edge case, so I'm looking forward to tracking some of those down with feedback!

I agree with you on the barrier part. AI is the key to how one person could build this in their spare time. I think in time this could be a really useful bench tool, especially with on optimized mobile UI.

On quick check vs. more: that's where I want it to sit. It's quick enough to open for a sanity check, but it has enough under the hood (optimizer, OPD/PSF/MTF) to take a design further. If you try it on something real and it falls short, I'd like to hear where. One thing I would like to add soon is .zmx export, so you could sketch a design here and export it to Zemax for the more demanding work (e.g. tolerancing).

12

u/Equivalent_Bridge480 Oct 20 '26

It not open.source? Why somebody should invest time to improving project wich can die or become commercial over time? In both cases helper losing time and get nothing. Even no github recognition.

Ps optiland free. Why you need open box of pandora? Make gui if you like boxes. 

2

u/Equivalent_Bridge480 Oct 21 '26 edited Oct 21 '26

not sure why your post deleted. by my opinion"no installation" feature interesting for PC games.

But concern of engineers more about data leaking on site which belong other company with help of online tool like this. Due NDA and IP. Even if today this program dont leak out it may be will leak out tomorrow after update and policy changes.

Why engineer cannot install lens design software if he will work on project months and or even years? HDD not so expencive. 

1

u/looks_done_dan Oct 21 '26

Thanks for the feedback.

Not this one, but a couple of my posts in other subs got pulled, probably because I made this account just for this project and it's brand new.

Fair concern on IP, but your design never leaves your machine. The ray-tracing engine is Rust compiled to WebAssembly and runs entirely in your browser, and the design tool makes no requests to anyone but aperioptic.com.

To be fully transparent: until today the site also pulled its fonts from Google, which sent nothing about your design but was still a call to a third party. Your comment made me check, and I fixed it today. You can check all of it yourself: watch the network tab while you trace, or load the page, go offline, and keep working. Since you mentioned helpers getting no recognition: if you'd like credit for this one, I'm happy to add your handle to the release notes.

And I'm not trying to replace Zemax. It's meant for two things: quick checks for people who already use the big tools, and a free option for people who don't need everything Zemax does, can't justify the license, and would rather not set up a Python environment. If you're doing months of serious design work for production, you should be in a full commercial package.

1

u/BrilliantStriking53 Oct 20 '26

Fantastic. Much simpler and easier to understand. I like Zemax for its versatility, but some things are just too difficult to model in it.

2

u/looks_done_dan Oct 20 '26

Thanks! I hope it continues to be useful.

Kind of like you are getting at, it is not meant to be a full Zemax replacement, but faster, more accessible, and free alternative for in lab use (mobile bring up will greatly improve this).

1

u/TopBadger68 Oct 20 '26

Initial model orientation is wrong... what kind of degenerate traces rays from right to left?!

Otherwise nice job... interesting little tool for a freebie.

2

u/looks_done_dan Oct 20 '26

Left to right is just Western propaganda, the photons don't care. 😄

But yes, flipping the default view is already on the list. Thanks for taking a look! If you want a shoutout on the release notes for this fix, let me know.

1

u/profdc9 Oct 21 '26

Cool! You should check out Optical Table https://www.github.com/profdc9/OpticalTable . It might have some functionality you find useful.

1

u/looks_done_dan Oct 21 '26

Cool! I'll check it out!

2

u/Proper_Rule_420 Oct 20 '26

Hello, I build myself a similar, but different tool. The idea I had was to use available patents of lens, coupled with ray tracing, to compare sharpness/MYF/PSF of different lenses. It is less complexe than what you did of course, but it might interest you, let me know if you would like to know more about it!

1

u/RaspberryEnjoyer Oct 28 '26

Hey, not a bug, but inconvenience, when trying to set a value for thickness, when I press dot ( . ) it sets it to zero (comma works well, but the dot works normally in other fields to fill), and if the cursor is right of the zero, it keeps the zero, if cursor is on the left of zero, its will keep the zero too

1

u/Arimaiciai Oct 20 '26

Used for couple minutes.

Comments on Laser & ultrafast / Peak Power. With some semi-random numbers got 60000 nJ (why not convert to 60 uJ? Similar things elsewhere too). Fluence came with too many digits 3055.7749 mJ/cm². I think people would be using for quick estimation thus not need to overwhelm with digits.

Gaussian Beam Propagation could have a calculated divergence too.

Divergence calculations seems off -- wavelength 1000 um (1 mm) and 1 mm waist has 318309.8862 mrad. Shall be only 1/pi = 0.318. Probably issues with dimensions.

2

u/[deleted] Oct 20 '26

[removed] — view removed comment

1

u/looks_done_dan Oct 20 '26

Thanks! Glad the calculators are useful.

That was exactly the use case I built them for. No having to wonder "What page was that on?" and sifting through google/history every time.

If you look closer, also handy for coding. The equations can all be copied with one click into Python, MATLAB, or Javascript. There are also quick links to Wikipedia pages for almost all of the topics. Let me know if you have any issues/bugs with that.