Create an empty optical system, and specify the light wavelength as the Fraunhofer F line.
Display the value of the ConstructionFrame property of the optical system opsys.
ans = 4×4
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
To add a lens component to the optical system, create the first refractive surfaces of the lens. Specify a positive radius of curvature using the Radius name-value argument, the thickness of the lens using the DistanceToNext name-value argument, and the glass material type using the Material name-value argument.
Create the second refractive surface of the lens. To create a convex lens, specify a negative radius of curvature for the second surface using the Radius name-value argument.
Display the updated value of the ConstructionFrame property of opsys.
ans = 4×4
1 0 0 0
0 1 0 0
0 0 1 2
0 0 0 1
Set the coordinate system for the next component. Specify the position of the new construction optical axis as [0 1 5], and tilt the new construction axis by 10 degrees relative to the global x-axis. This configures the optical system to position the next components you add along the specified tilt angle, starting at the point [0 1 5].
Display the updated value of the ConstructionFrame property of opsys.
ans = 4×4
1.0000 0 0 0
0 0.9848 -0.1736 1.0000
0 0.1736 0.9848 5.0000
0 0 0 1.0000
Add a second lens component to the optical system, by adding the two refractive surfaces of the lens to the optical system.
Add a gap and add an image plane.
Trace rays through the optical system using the traceRays object function.
Display a 2-D visualization of the optical system using the view2d function. Visualize the ray path using the addRays object function.