cylindrical_lens = Optic()
# add surfaces
cylindrical_lens.surfaces.add(index=0, radius=be.inf, thickness=be.inf)
cylindrical_lens.surfaces.add(
index=1,
thickness=7,
radius_x=30, # <- radius: x radius of rotation.
radius_y=40,
is_stop=True,
material="N-BK7",
surface_type="toroidal",
conic=0.0,
toroidal_coeffs_poly_y=[],
) # <-- aspheric terms are possible
cylindrical_lens.surfaces.add(index=2, thickness=65)
cylindrical_lens.surfaces.add(index=3)
# add aperture
cylindrical_lens.set_aperture(aperture_type="EPD", value=20.0)
# add field
cylindrical_lens.fields.set_type(field_type="angle")
cylindrical_lens.fields.add(y=0)
# add wavelength
cylindrical_lens.wavelengths.add(value=0.587, is_primary=True)
# draw lens
cylindrical_lens.draw(num_rays=10)