Solved

New Wide-Angle Features in 22.1

  • 28 January 2022
  • 5 replies
  • 364 views

Userlevel 7
Badge +3

Hi Zemax team,

Congratulations on both the 22.1 release and the STAR module winning the Prism Award! That was great to see.

I’ve been playing with 22.1 and it’s tracing wide angle lenses really well. That said, there are a few things I don’t really understand, or didn’t expect, in the performance. Put simply, it’s working better than expected, and I don’t really understand why :grinning: There’s a zip file attached with two ZARs in it that illustrate my points.

Wide angle lens 200 degree field_MN.zos

This lens is my version of the 200 degree sample file, modified to use a maximum field angle of 105.1 degrees. The chief ray lands at an angle of 89.49 degrees and the upper marginal at  89.949.

This is really close to 90 degrees at which the ray is tangent to the surface and does not enter the lens. It’s real grazing-incidence stuff. But now, check out the Ray-Aiming tab:

We are not using the Robust Ray-aimer, or the Enhanced aimer. It’s the plain-vanilla Paraxial reference ray-aimer doing all the heavy lifting. It looks like 22.1 contains enhancements to the core ray-tracer, as well as providing the Enhanced version, which is no longer needed for this system (it was in the last release version I used for testing in the other thread I have on wide-angle systems).

I get about 6k system updates/second on my machine, which is a really high number. Can you confirm that the plain-vanilla ray tracer has been upgraded in this release? The release notes make no mention of it, and if I turn on Robust or Enhanced ray aiming the system continues to trace, albeit more slowly, with the system updates/second falling to 700/second, and the old Robust aimer falling to ~400/sec.

So, the plain-vanilla algorithm is working really well, it gives exactly the same ray trace as the other modes but is x10 faster. Well done!

Another unexpected result is what I got when I turned using the ray-aiming cache on, the Plain Vanilla ray tracer slowed to ~3k/sec. I don’t see why using the cache should slow things down by x2.

I think it would be worthwhile someone with code access checking that they really understand both of these results (not needing the Robust or Enhanced tracers, and the slowdown with using the cache) just to be sure.

 

Panoramic lens Tester MN.zos

 This is a variant of a lens from the Design Templates database. It’s a Milt Laiken design where a steeply domed aspheric mirror is used to image into a camera lens:

The imaging lens is just a Cooke triplet, with the mother of field flatteners providing field curvature control:

In y, the field angle is just 60 degrees, which isn’t huge, but in x its field of view is 360 degrees hence ‘panoramic’ lens. It’s always been a difficult lens to trace, although now it too traced better than ever, with just the plain-vanilla tracer and cache. However, two problems, possibly related can be seen:

  1. Turning the ray-aiming cache off causes the lens to not be traced

    And since the cache is filled by the ray tracer, I’m not sure why this should be. Also:

  2. Using the Enhanced Ray-Aimer also fails with the same error. Again, I expect this algorithm to maybe slow the ray tracer down, but not to take a traceable system and return an untraceable one.

BTW, although the error message above is correctly returned, the analysis windows still show an unknown error:

which it shouldn’t really: we know exactly what the error is.

Please don’t take these comments the wrong way: I think you are really close to having a wide-angle capability where the user does not have to make any arcane settings or contact support for help: it just works. I am surprised and delighted that the regular ray aimer can trace rays to 89.95 degrees without any help. That’s seriously impressive. The things I don’t understand are:

Why the plain-vanilla ray tracer is working so much better;

Why using the ray-aiming cache slows things down, rather than speeding things up or having minimal effect; and

Why the Enhanced aimer fails when the less powerful methods succeed in this case. Of course, you shouldn’t use the Enhanced aimer if there’s no need, but I am curious about why it should fail in this case.

Best wishes,

  • Mark
icon

Best answer by Tom Pickering 3 February 2022, 15:06

View original

5 replies

Userlevel 7
Badge +3

Hy Zemax team,

Any thoughts on this?

  • Mark
Userlevel 3
Badge

Hi Mark,

I had a chat with our development team. Here’s what they said:

Why the plain-vanilla ray tracer is working so much better;

  • For the enhancements to speed and stability of the plain Ray Aiming, there were improvements but most of them would have been focused on the cache.  

Another unexpected result is what I got when I turned using the ray-aiming cache on, the Plain Vanilla ray tracer slowed to ~3k/sec. I don’t see why using the cache should slow things down by x2.

  • The cache is set up during the system update.  Turning it on but not tracing any rays will show a slow down since you’re taking the time to set up the cache without getting the benefit of using it when you trace rays after it’s set up.

Why the Enhanced aimer fails when the less powerful methods succeed in this case. Of course, you shouldn’t use the Enhanced aimer if there’s no need, but I am curious about why it should fail in this case.

  • This may be a bug. Since it’s fixed by checking the Use Fallback option the most likely explanation is that the grid search works for this system. The Enhanced option turns that off, so that might be why it’s failing. In retrospect, it’s a bit odd that Use Fallback is required at all. 
Userlevel 7
Badge +3

Hi Tom,

Thanks for that. I was pretty sure that it would be a bug in the Enhanced aimer. It should probably be tracked down and fixed for the sake of completeness. But it does seem that for wide-angle lenses at least, the Robust and Enhanced aimers are now redundant.

I can appreciate that within Zemax, with all the work put into the Enhanced aimer, it may seem anti-climactic that it is no longer needed, but this is really a far better result for users. That a single setting now works for all cases, without needing multiple sub-settings to be clicked on and off to see what happens, is great news for optical designers. The best ‘wide-angle mode’ is to not need a wide-angle mode!

  • Mark
Userlevel 7
Badge +3

Hi again @Tom Pickering and everyone,

Given that this topic has had two months for data to come in, what is the thinking now on simplyfying the ray-aiming options? Are there any files that need more than Paraxial Ray-Aiming with the cache enabled?

I keep a store of problematic ray-aiming files and as of 22.1 I no longer have any that don’t trace properly with the simplest ray-aiming version you now offer. Are there any files that need robust/enhanced ray-aiming, and if so can you share them?

  • Mark 
Userlevel 6
Badge +2

Hi Mark!

We have a store of testing files, which cannot be shared publicly, that has different problems with plain Ray Aiming and reuiqres Enhanced Ray Aiming.

Some of them have problems even with Robust Ray Aiming. So far we can solve all cases with rotationally symmetric systems, namely traditinoal lenses. Most of them have problem of spikes in the Field Curv./Dist. plot or Layout. Many of of them also have problem of speed, where Robust Ray Aiming is needed but slows down the ray-tracing a lot. Some of them even have “Cannot find object coordinate” error and cannot be solved by Robust Ray Aiming. A few of them have problems when calculating merit functions.

Note all these issues are solve by Enhanced Ray Aiming as long as it’s rotationally symmetric system.

 

Please let me know if you wonder anything else!

 

Best regards,

Michael

Reply