0

Tilting the object plane in a lens design

ntap
ntap
@ntap
20 days ago
55
3

Hello everyone,

I am new to optiland as well as ray tracing in general, so there might be a lot wrong to the approach I am taking.

I would like to compute the imaging properties of a tilted object plane. Here is an example using the bi-complex lens of a tutorial:

lens = Optic()

lens.surfaces.add(index=0, thickness=60, rx = 45*np.pi/180)
lens.surfaces.add(index=1, thickness=7, radius=50, material="N-SF2", is_stop=True)
lens.surfaces.add(index=2, thickness=60, radius=-50)
lens.surfaces.add(index=3)

lens.set_aperture(aperture_type="EPD", value=15)
lens.fields.set_type(field_type="object_height")
lens.fields.add(y=0)
lens.fields.add(y=1)

lens.wavelengths.add(value=0.55, is_primary=True)

At construction, the system allows me to tilt the object surface to 45°. But when I run lens.draw() or try to run analyses, clearly the off-axis field is traced from the same z-value as the on-axis one.

What would be the best way to do this? I tried tilting the whole system (11 surfaces in my case) and using ray aiming to fill the NA. It works but tracing gets very slow (too slow for optimization I think). Maybe it's only a matter of finding the right parameters for sct.ray_tracer.set_aiming and the correct distribution (I am using hexapolar).

In any case, many thanks for all the efforts put into optiland! I will try to be a force for good and help people in this forum :)

Nico

Screenshot 2026-04-28 215542.png

Screenshot 2026-04-28 215624.png

Discussion 3

Hi Nico,

I think this is actually a bug in the code that you've found! Thanks a lot for bringing this up, as I don't think I would have found it quickly. I will work on a fix for this.

In the meantime, depending on what you need to calculate, you may be able to manually compute the expected z location at your target (x, y) field, then shift the object surface to that location. It's a bit of a wonky workaround, but it's the only one I can think of for the time being.

Regards, Kramer

This is now fixed in the Optiland master branch as of May 14, 2026. It will be folded into the next release.

See PR #584 for reference.

3 days ago

Thank you so much for looking into this!

I'll install from source then

Cheers

Join the conversation

You need to be signed in to leave a comment.

Sign in to comment