Configurations
set the input ray using the source in the optical sequenceOptical sequence
source stays first · drag ⠿ or use arrows to reorder other elements · hover fields for details| Drag / # | Element | Name | Value (see Info) | R₂ (m) | Length (m) | n lens / wedge | n₁ | n₂ | CA (m) | Decenter (m) | Tilt (rad) | Axial offset (m) | A | B (m) | C (1/m) | D | Order |
|---|
Paraxial ray path
unfolded optical pathHover over the plot to inspect the nearest plane. Focus the plot and use left/right arrows to inspect with a keyboard.
Enter valid inputs to display the ray path.
Gaussian beam inputs
paraxial envelope · starts at the sourcez₀ is relative to the source plane, positive downstream. It describes a reference waist in the input medium, before accounting for elements. Beam inputs are saved in CSV; older files use the defaults.
Enter valid inputs to display the beam plots.
Gaussian beam envelopes
paraxial envelope · starts at the sourceHover over a beam plot to inspect the nearest sampled point. Focus a plot and use the left/right arrows to inspect with a keyboard.
The vertical scale includes both beams and all hard-aperture edges. A wide aperture can make a narrow beam look small; this changes the display, not the calculated beam size. Horizontal and vertical scales are independent.
Reference beam
Design beam
Gaussian beam information
For M² = 1, the envelope is the Gaussian 1/e² intensity radius; for M² > 1 it represents half the D4σ diameter, propagated from the reference waist using second moments. The input ray determines the initial beam centre. A Gaussian aperture can shift the beam centre away from the geometric ray. Both plots use the same scales and an unfolded optical path.
Beam inspection reports values at the nearest plotted sample. Local w₀ and z₀ describe the equivalent waist if the local beam were continued in a uniform medium of the shown index; local z₀ is measured from the sampled point, positive downstream. Input z₀ is measured from the source. The local waist can be virtual or beyond another component, so it is not necessarily an actual waist in the system. Samples on opposite sides of a surface may have the same position; keyboard arrows can inspect each side. Values beyond a hard aperture ignore its effect on the beam.
Indices must match at interfaces and thick lenses. A wedge assumes air; a custom geometric-angle ABCD matrix must have a positive determinant and implies output index nin/(AD − BC). Check that this represents the intended media. Legacy GRIN propagation assumes a constant reference index and excludes boundary refraction.
Gaussian apertures use a soft 1/e² intensity-transmission radius and require M² = 1; M² alone cannot determine how an arbitrary beam is filtered. Hard apertures do not modify the beam model. The outline becomes dashed after the plotted ±w extent exceeds an opening; this ideal continuation is not the transmitted profile. Even where w fits, diffraction and the loss of power outside the opening are ignored. Hard-aperture clipping and power are not calculated. Each Download SVG saves its plot on a white background.
For the centred coherent beam, this is equivalent to the complex ABCD aperture with C = −iλ/(πna²), where λ is the vacuum wavelength, n is the local index and a is the transmission radius.
Output ray
reference and design rays, at each system's final plane| Case | Height (m) | Angle (rad) |
|---|
Unit sensitivity at output
decenter and tilt derivatives at the entered axial offsets| Element | Parameter | Height sensitivity | Angle sensitivity |
|---|
Downstream sensitivity heatmap
Combined unit sensitivities by destination
Includes source and element parameters at or before each destination, regardless of filters. RSS assumes independent standard deviations of 1 µm per decenter or 1 mrad per tilt. Σ|value| adds magnitudes and gives a worst-case bound when each parameter has unit magnitude and its sign can vary independently.
System matrices
T = Mₙ ··· M₂ M₁ · copy uses full precision in MATLAB formatReference
Design
Worst-case beam tolerance
The decenter and tilt values in the optical sequence are the design reference for this analysis. The independent ± bounds below are additional deviations around those values. Inapplicable entries are omitted. Axial offsets stay fixed; axial tolerances and Gaussian apertures are not supported.
w = 2σ, so D6σ uses 1.5×w, D8σ uses 2×w and D10σ uses 2.5×w on each side of the beam centre. These are beam extents before adding tolerance shifts, not power guarantees. For M² = 1, w is the 1/e² intensity radius; otherwise it is half the D4σ diameter.
| Element | ± decenter (m) | ± tilt (rad) |
|---|
Aperture bars show design openings. Clearance includes independent aperture motion and correlated lens-aperture motion from the lens tolerances. Dashed lines start after the selected extent can exceed an opening. Hard-aperture diffraction and loss of power are ignored even where the extent fits.
The vertical scale fits the envelope and all aperture edges. Large openings can make a narrow envelope look small without changing the calculated values.
Hover over the plot to inspect the nearest sampled point. Focus the plot and use the left/right arrows to inspect with a keyboard.
Aperture clearance
Minimum clearance to either edge, including aperture decenter tolerance. Negative means the selected beam extent can exceed the opening.
| Aperture | Position (m) | Worst clearance (m) | Largest contributors |
|---|
Guide and model assumptions
Getting started
- Start a new empty system or load a preset, then add elements in the order the ray meets them. The empty system contains an on-axis source and 0.1 m of space; it keeps the current beam settings and beam-radius multiplier. Use spaces to set distances and an observer plane to mark an output location.
- Set the source's decenter and tilt to the design ray's height and angle, then enter the other elements' design values. The reference source is on-axis with zero angle; the design source uses the entered values. Results update automatically; incomplete or invalid inputs clear them until corrected.
- Use the plots and output to compare the zero-offset reference with the entered design. Save the source, beam inputs, tolerance settings and optical sequence as a CSV. When loading an older file, its input-ray height and angle become the source's decenter and tilt; its reference result will therefore differ from the old version.
Type values directly or use the up/down keys. Steps adapt to the field; hover over it to see the current step. Refractive indices step by 0.01. Finite radii also support the arrow keys.
Elements and units
Ray height y is in metres; angle θ is the geometric paraxial angle in radians, not nθ. Spaces use geometric distance in the current medium.
The Value column has a different meaning for each element:
- Space: distance (m). Thin lens: focal length (m).
- Thick lens: entrance radius R₁ (m); enter R₂, thickness and lens index in their own columns.
- Mirror or curved interface: radius (m). Hard aperture: diameter (m). Gaussian aperture: 1/e² intensity-transmission radius (m).
- Thin wedge: signed apex angle (rad). Legacy GRIN: gradient g (1/m).
- Source, planar interface, observer and custom ABCD: Value is not used. Disabled fields do not affect the calculation.
For refractive surfaces, a positive radius has its centre of curvature downstream. Enter inf for a plane. n₁ and n₂ are the indices before and after the component; the beam calculation checks that adjacent media match, but the ray calculation does not. Mirror signs use the separate convention below.
For a thin or thick lens, CA means clear-aperture diameter in metres; leave it blank for no lens stop. A thin lens has one opening; a thick lens has the same diameter at its entrance and exit. The openings move and tilt with the lens, including axial shifts and tolerance deviations. These are paraxial surface-plane stops, not a model of a curved edge or lens barrel. Standalone apertures remain independent components. Previously saved aperture rows are not automatically attached to lenses; remove those rows and enter a CA on the lens if appropriate.
Alignment and axial offsets
- The source is fixed at the start; its decenter and tilt set the design ray's initial height and angle. For other elements, decenter shifts the element sideways and tilt rotates it. A thick lens moves as one rigid component, pivoting at its entrance. Its exit axis shifts by thickness × tilt. A zero-thickness ideal thin lens has zero tilt sensitivity in this model.
- Axial offset moves a component along the unfolded path; positive is downstream. Other components stay at their own positions, and the gaps change. Thick lenses and legacy GRIN media move as complete components.
- Offsets may not cross another component, the input plane or a trailing-space output plane; touching is allowed. Without a trailing space, the final component defines the output plane and moves with it.
Offset arrow steps use the nominal entrance-to-entrance spacing to the next component, rounded to a convenient value. If that spacing is zero or there is no next component, the previous spacing is used; otherwise the fallback is 1 µm. Spaces define nominal distances and have no offset of their own.
Reading the ray plot
The reference ray uses nominal positions and zero decenters and tilts. The design ray uses the entered values and axial offsets. Markers show reference and, where different, design axial positions—not element sizes, decenters or tilts. Mirrors are drawn along an unfolded path; the plot is not a physical folded layout. The horizontal and vertical scales are independent.
The optional dotted fans start at each source position with four angles around that source's direction. Their spread adapts to the plotted ray heights and is capped at ±10 mrad; if both rays stay at zero height, a 1 mm reference is used. These are illustrative paraxial rays, not a beam envelope or intensity.
Hard-aperture bars show the blocked region outside each opening; thick bars mark the aperture or apertures limiting the launch-angle range from the fixed source position. By default the vertical scale fits the rays, so wide aperture edges can be outside the plot; choose “Fit all aperture edges” to include them. The reference and design cases are calculated separately. Their bars are shifted slightly sideways in the combined plot for visibility; the stated positions remain exact. The two angular limits can come from different apertures, and there may be no angle that passes them all. Angular responses too small to resolve numerically are treated as zero and noted. This is a geometric, single-axis paraxial stop calculation, not a field-stop, beam-power or diffraction calculation; large calculated angles may be outside the paraxial regime. Gaussian apertures are soft and are not included in this hard-stop calculation.
Hover or use the arrow keys on the focused plot to inspect the nearest plane. Height and angle differences are shown only when the two values are at the same axial position. Thick-lens and GRIN entrances are shown before the element and exits after it. Download SVG saves the visible plot, including enabled fans, on a white background with a legend.
Output, sensitivities and heatmap
The output table compares the reference and design rays at each system's final plane. If the final component is axially shifted without a trailing space, those planes differ; the difference then compares values at different positions.
A unit sensitivity is the signed change in ray height or angle per unit decenter or tilt. It is calculated with all decenters and tilts zero and the entered axial offsets held fixed. Multiply it by an entered design value to get its contribution relative to zero decenter or tilt at those fixed axial offsets; this is not the separate ± tolerance. Axial-offset sensitivities and contributions are not calculated, so the reference-to-design difference can include effects absent from the heatmap.
In the heatmap, choose unit sensitivity or entered contribution. Rows are source and element parameters; columns are planes after each element, including space ends and thick-lens exits. A dash means the plane is upstream of the parameter. Fixed steering, such as a wedge's nominal kick, is not included, so contributions need not add up to the absolute ray.
Height and decenter are displayed in µm; angle and tilt in mrad. Orange is positive and blue negative. Shading follows the square root of the magnitude relative to each row's maximum, so smaller values are easier to distinguish. Each row has its own color scale across all destinations, including hidden ones, so colors cannot be compared between rows. Values are shown to three significant digits. Hover, focus or select a cell for details.
The summary below the heatmap combines source and element parameters at and upstream of each destination, separately for decenter and tilt. It does not change with the filters or use the ± tolerances:
- RSS is the square root of the sum of squares. In unit-sensitivity view it represents equal independent standard deviations of 1 µm or 1 mrad. In contribution view it combines entered design contributions and is not their uncertainty.
- Σ|value| adds magnitudes without cancellation. In unit-sensitivity view it is a worst-case bound for independently varying unit-magnitude errors. In contribution view it bounds the magnitude of their signed net contribution.
Components and matrix conventions
Matrices act on [y, θ, 1]; the rightmost matrix acts first. Copy MATLAB exports the full-precision 3×3 matrix. If clipboard access is denied, copy the selected text shown instead.
- Source: starts at the input plane. Its affine matrix S(δ, α) adds source decenter and tilt to a ray defined relative to the source.
- Space and thin lens: space uses [1 d; 0 1], and a thin lens has C = −1/f. A thin lens or interface applies decenter and tilt with S(δ, α) M S(−δ, −α).
- Interfaces: a plane scales angle by n₁/n₂. A curved interface has C = (n₁ − n₂)/(n₂R) and D = n₁/n₂. A thick lens combines two such surfaces and the space between them.
- Mirror: C = −2/R, with an explicit +2 × tilt angular kick. Enter
inffor a flat mirror. Radius and tilt signs follow this unfolded-ray convention; propagation direction is not reversed automatically. - Thin wedge: a zero-thickness wedge in air adds (1 − n) × apex angle to the ray angle. It does not model dispersion or beam displacement, and its decenter and tilt have no first-order effect here.
- Custom ABCD: enter a 2×2 matrix in [y, θ] coordinates: A and D are dimensionless, B is in metres and C in 1/m. It has zero plotted length and no implicit angular kick. Its decenter/tilt sandwich uses the same axis at both planes, so it is not a physical model of a tilted finite-length component. Check its index convention yourself.
- Aperture: a ray on the edge passes. Entered rays and sensitivities continue mathematically after a block; they are not transmitted light. Dotted fan rays stop at their first blocking aperture. Apertures do not have sensitivity rows and do not model beam-power clipping.
- Gaussian aperture: a zero-length soft amplitude filter, with intensity transmission exp[−2(y − decenter)²/a²], where a is Value. It is an identity for geometric rays and ray sensitivities; it modifies a coherent M² = 1 beam's radius and centre, but not the beam phase. Its tilt is not modelled. It is not a hard aperture and transmitted power is not calculated.
- Observer plane: marks a position without changing or clipping the ray. Split a space to place one inside it. The plane appears in the plot and heatmap, and can have an axial offset but no decenter or tilt error.
Previously saved GRIN elements remain available through legacy CSV files, with their length, sampled internal path and entrance-pivot tilt. For n(y) ≈ n₀(1 − g²y²/2), their in-medium matrix is [cos(gL), sin(gL)/g; −g sin(gL), cos(gL)], or free propagation when g = 0. Boundary refraction is not included. New GRIN models can use custom ABCD plus interfaces, but custom ABCD has no plotted length, internal path or finite-length exit-axis shift.
Presets
- Keplerian: two positive thick lenses with effective focal lengths of 0.4 m and 0.2 m image the input plane with magnification −0.5; the reference matrix has B = 0. Each lens has a 25.4 mm CA, and an independent 1 mm aperture lies at their common focal plane. Loading this preset sets w₀ = 3.5 mm. Hard-aperture clipping and diffraction are not included in the beam model.
- Galilean: 0.05 m of propagation from the source precedes a negative and a positive thin lens forming a telescope, followed by a focusing lens.
- Telephoto: positive and negative thick-lens groups give a 0.45 m effective focal length. For the 2.5 m object distance, the front vertex to image plane is about 0.396 m, with magnification −9/29. This is not an aberration-corrected photographic lens.
Model limits
Worst-case beam tolerance treats the optical sequence's entered decenters and tilts as design values, and applies the separate independent ± bounds as additional deviations around them, with axial offsets held fixed. The orange beam is the design beam. At each sampled position the purple limits are the design beam centre ± the sum of absolute tolerance contributions ± the selected multiple of beam radius. With w = 2σ, D6σ, D8σ and D10σ correspond to radius multipliers 1.5, 2 and 2.5; D6σ is the default. These describe the beam extent before adding alignment tolerances and do not guarantee a power fraction. Hover or use the arrow keys on the focused plot to inspect samples. Different points may require different error combinations, and sampling does not guarantee extrema between points.
Hard-aperture clearance is calculated relative to each design opening. A standalone aperture's decenter tolerance is independent; a lens opening follows the same lens decenter and tilt deviations that affect the ray. A negative clearance means the selected beam extent can extend beyond an edge; it is not a transmitted-power or clipping calculation. The outline becomes dashed after the first opening with negative clearance. All results after a hard aperture ignore its effect, even when the selected extent fits. Gaussian apertures and axial tolerances are not supported in this tolerance analysis. The calculation is one-dimensional and does not provide a two-axis clearance or a general power guarantee. Download the SVG, detailed CSV or standalone HTML report; system CSV also saves the tolerance settings.
This is a one-transverse-axis, small-angle model. It does not calculate hard-aperture diffraction, aberrations or beam power, find an image plane automatically, or perform a general statistical tolerance analysis. Oblique-incidence mirror astigmatism is not modelled. Separate refractive interfaces are not automatically treated as one rigid group. Check the sign conventions and independently verify results before design use.