Try Optiland in Your Browser#

The shell below is a complete Python kernel running in your browser (xeus-python compiled to WebAssembly and served by JupyterLite) with Optiland preinstalled. Nothing is sent to a server and nothing needs to be installed on your machine.

Note

The kernel and its packages are downloaded on first use, which can take anywhere from a few seconds to a minute depending on your connection. 3D plotting (draw3D, VTK) is not available in the browser; run those examples in a local Python environment instead (see Installation).

Ideas to explore#

Not sure what to type? Paste any of these into the shell after the first example has run:

lens.draw()  # Visualize the optical layout
effl = lens.paraxial.f2()  # Retrieve the effective focal length
# Trace 1024 random rays for the on-axis field point, then use rays.x, rays.y
# for the intersection points
rays = lens.trace(Hx=0, Hy=0, wavelength=0.55, num_rays=1024, distribution="random")
# Run a spot diagram analysis
from optiland.analysis import SpotDiagram

spot = SpotDiagram(lens)
spot.view()

Next steps#