Spot Diagram
The Spot Diagram plot can be added to a 2D Plot Group () to visualize the intersection of rays with a surface. The surface could be a physical boundary in the model, or it could be a fictitious plane such as the focal plane of a lens. The data source may only be added to a 2D plot group but requires a ray tracing solution in a 3D model. Add a Color Expression subnode if required.
Go to Common Results Node Settings for links to information about these sections: Data, Title, and Inherit Style.
The Spot Diagram plot is available with the Ray Optics Module.
Data
The type of dataset determines the algorithm for computing the coordinates of each ray in the image plane.
If the dataset for the Spot Diagram plot is a Ray dataset (see Ray (Dataset)), then the rays are projected onto a 2D surface based on the average position and direction at the selected solution time. Alternatively, an Intersection Point 3D dataset can be selected (see Intersection Point 2D and Intersection Point 3D). Then the plot shows the intersection points of the rays with an intersecting plane at the specified location and orientation.
Filters
Use the options in the Filters section to remove some rays or intersection points from view.
Select the Filter by wavelength check box to hide all rays except those of a specified vacuum wavelength. If this check box is selected, enter a Wavelength (default: 632.8 nm) and a Tolerance (default: 1 nm). If the difference between the specified wavelength and the vacuum wavelength of a ray exceeds this tolerance, then the ray will not be plotted.
Select the Filter by release feature index check box to hide all rays except those released by a specific physics feature. Then enter an integer value for the index; the default is 1. This field is 1-indexed, meaning that 1 corresponds to the first ray release feature, 2 is the second ray release feature, and so on.
Select the Filter by number of reflections check box to show rays only if they have reflected a specified number of times. Then enter an integer for the number of reflections; the default is 0. For this option to work correctly, it is necessary to select the Count reflections check box in the settings for the Geometrical Optics interface before running the study.
Select the Filter by additional logical expression check box to show rays if they satisfy another user-defined expression. The expression is considered to be true if it returns a nonzero value. The default expression is 1, which would cause all rays to be shown.
Focal Plane Orientation
The settings in the Focal Plane Orientation section are used to define the direction of the tangential and normal vectors in the local coordinate system defined on the surface.
Select an option from the Normal to focal plane list: Direction based (the default), Position based, or User defined.
For Direction based, the normal to the focal plane is the average ray direction. This average is taken over all rays that satisfy the filter criteria given by the Filters section above.
For Position based, the normal to the focal plane is determined such that the ray positions are as close to the plane as possible. If the rays are stopped at a curved surface, the normal computed in this way may differ significantly from the surface normal.
For User defined, enter values or expressions for the normal vector components directly. By default, the z-axis is used.
Select an option from the Transverse direction list: Automatic or User defined.
For Automatic, a set of two transverse directions are arbitrarily chosen, such that they are orthogonal to each other and to the normal direction.
For User defined, enter the components of one of the transverse directions directly. By default, the x-axis is used. If necessary, this transverse direction is projected onto the plane perpendicular to the normal direction. Then the other transverse direction is the cross product of the normal with the first transverse direction. The Transverse direction should never be parallel to the Normal to focal plane.
The Create Focal Plane Dataset and Recompute Focal Plane Dataset buttons can be used to automatically generate or update an Intersection Point 3D () dataset in which the rms spot size is minimized.
Before clicking Create Focal Plane Dataset, make sure that the Dataset is either a Ray dataset () or From parent (if the parent is a Ray dataset). If rays are released at multiple field angles and you want to locate the image plane that minimizes the rms spot size for one of these fields, first select the Filter by release feature index check box in the Filters section; you can always clear the check box after generating the Intersection Point 3D dataset.
Before clicking Recompute Focal Plane Dataset, make sure that the Dataset is already an Intersection Point 3D dataset.
When clicking either button, the Intersection Point 3D dataset is then created (or updated) to define the intersection points with a plane. This plane is positioned and oriented such that the rms spot size of the intersection points is minimized.
The button commands to create or update an Intersection Point 3D dataset indicating the reference hemisphere can also be accessed from the physics API. In a model method or in a model Java® file, you can use commands such as
Layout
Use the settings in the Layout section to specify whether all rays should be presented as one diagram, or if rays should be organized by wavelength or release feature and then arranged into an array of spots. If the rays are presented as an array of spots, then the displacement between spots in the resulting plot is strictly for visualization purposes and does not accurately depict the relative position of these spots in the image plane.
Select an option from the Spot arrangement list: Sort by release feature (the default), Sort by wavelength, or Single spot.
For Sort by release feature, one spot will be shown for each ray release feature for which solution data exists.
For Sort by wavelength, one spot will be shown for each wavelength. Select an option from the Sorting method list: Limits, Number of intervals, or Tolerance (the default).
-
For Limits, enter a list of Limits (SI unit: m). Rays having a vacuum wavelength within any one of the specified intervals will be grouped in the same spot.
-
For Number of intervals, enter an integer value for the Number of intervals. The default is 10. The rays will be organized into the specified number of subintervals based on wavelength, with each interval creating a spot. Also select an option from the Distribution list. If Equal number of rays (the default) is selected, then the rays are divided among the specified number of bins so that each bin contains the same number of rays, while trying to keep rays of the same wavelength in the same group. If Equal interval width is selected, the rays are distributed among the specified number of intervals so that each interval is the same size.
-
For Tolerance, enter a value for the Tolerance (SI unit: m). The default is 1 nm. Rays will be grouped into the same spot if the difference between their vacuum wavelengths is less than the specified tolerance.
For Single spot, the relative displacement of rays in the plot will be proportional to their relative displacement in the image plane; the rays will not be moved relative to each other for visualization purposes.
For Sort by release feature or Sort by wavelength, select an option from the Layout list: Average over rays (the default) or Average over area.
For Average over rays, the coordinates of the center of each spot are defined as the arithmetic mean over the coordinates of rays in that spot.
For Average over area, the coordinates of the center of each spot are defined as the average of the maximum and minimum coordinates of rays in that spot.
Enter values for the Horizontal padding factor and Vertical padding factor. The default values are 0.5. The padding factors determine the amount of blank space that will be placed between the spots in a spot diagram array. If the value is 0, then the spots might touch if they are equal in size. For negative values the spots may overlap.
Annotations
Use the settings in the Annotations section to display information about each spot as text in the Graphics window.
Select the Show wavelength check box to display the vacuum wavelength of each spot.
Select the Show spot coordinates check box to display the position of each spot.
Select the Show spot size check box to display the RMS spot size of each spot.
For each type of annotation listed above, you can select an option from the Position list: Above spot or Below spot. It is possible to put several lines of text above or below each spot. You can also select a Length unit. The length units for each type of annotation are controlled independently; for example, you could display the vacuum wavelength in nanometers and the RMS spot size in microns. Also, for Show spot coordinates, you can choose one of the following options from the Coordinate system list: Global (the default) or Local. For Global the x, y, and z-coordinates of each spot center are shown. For Local, an ordered pair is shown to indicate the position of each spot center relative to the origin of the image plane.
Select the Show circle check box to draw a circle at the origin in the image plane. This could be used, for example, to draw the Airy disk for reference. You can enter a value or expression in the Radius text field.
Select the Show text frames check box to draw a text frame around each annotation.
Select the Fit annotations to spot check box to fit the annotations more closely to spots of varying sizes. This applies to spot diagram arrays (see the Layout section). If this check box is cleared, then the vertical positioning of the annotations will be the same for all spots in each row of a spot diagram array, even if the spots have different heights.
Position
In the Position section, you can enter value or expressions for the local x- and y-coordinates of the origin of the spot diagram. This can be used, for example, to compare the spot diagrams from different studies or from different parameter values in a Parametric Sweep, by positioning them next to each other..
the Ray Optics Modeling chapter of the Ray Optics Module User’s Guide.
For an example of the use of Spot Diagram plots: Double Gauss Lens: Application Library path Ray_Optics_Module/Lenses_Cameras_and_Telescopes/double_gauss_lens.