geometries.chebyshev

Chebyshev Geometry

The Chebyshev polynomial geometry represents a surface defined by a Chebyshev polynomial in two dimensions. The surface is defined as:

z = r^2 / (R * (1 + sqrt(1 - (1 + k) * r^2 / R^2))) +

sum(Cij * T_i(x / norm_x) * T_j(y / norm_y))

where - r^2 = x^2 + y^2 - R is the radius of curvature - k is the conic constant - Cij are the Chebyshev polynomial coefficients - T_i(x) is the Chebyshev polynomial of the first kind of degree i - norm_x and norm_y are normalization factors for the x and y coordinates

Chebyshev polynomials are derived in Cartesian coordinates, which - unlike many other polynomial freeform surfaces used to describe rotationally-symmetric systems - allows for straightforward definition of anamorphic or non-rotationally symmetric systems and non-elliptical apertures.

Kramer Harrison, 2024

Classes

ChebyshevPolynomialGeometry(...[, conic, ...])

Represents a Chebyshev polynomial geometry defined as:

class ChebyshevPolynomialGeometry(coordinate_system, radius, conic=0.0, tol=1e-10, max_iter=100, coefficients=None, norm_x=None, norm_y=None)[source]

Represents a Chebyshev polynomial geometry defined as:

z = r^2 / (R * (1 + sqrt(1 - (1 + k) * r^2 / R^2))) +

sum(Cij * T_i(x / norm_x) * T_j(y / norm_y))

where - r^2 = x^2 + y^2 - R is the radius of curvature - k is the conic constant - Cij are the Chebyshev polynomial coefficients - T_i(x) is the Chebyshev polynomial of the first kind of degree i - norm_x and norm_y are normalization factors for the x and y coordinates

The coefficients are defined in a 2D array where coefficients[i][j] is the coefficient for T_i(x) * T_j(y).

Chebyshev polynomials are derived in Cartesian coordinates, which - unlike many other polynomial freeform surfaces used to describe rotationally-symmetric systems - allows for straightforward definition of anamorphic or non-rotationally symmetric systems and non-elliptical apertures.

Parameters:
  • coordinate_system (CoordinateSystem) – The coordinate system of the geometry.

  • radius (float) – The radius of curvature of the base sphere.

  • conic (float, optional) – The conic constant of the base sphere. Defaults to 0.0.

  • tol (float, optional) – Tolerance for Newton-Raphson iteration. Defaults to 1e-10.

  • max_iter (int, optional) – Maximum iterations for Newton-Raphson. Defaults to 100.

  • coefficients (list[list[float]] or be.ndarray, optional) – A 2D array or list of lists representing the Chebyshev coefficients Cij. coefficients[i][j] is the coefficient for T_i(x) * T_j(y). Defaults to an empty list (no polynomial contribution).

  • norm_x (float, optional) – Normalization radius for the x-coordinate. If None, the radius scales automatically during paraxial updates. Defaults to None.

  • norm_y (float, optional) – Normalization radius for the y-coordinate. If None, the radius scales automatically during paraxial updates. Defaults to None.

c

2D array of Chebyshev coefficients.

Type:

be.ndarray

norm_x

Normalization factor for x.

Type:

be.ndarray

norm_y

Normalization factor for y.

Type:

be.ndarray

distance(rays)

Calculates the distance from the ray origin to the surface intersection using a robust Newton-Raphson method. This version uses the base conic intersection as a strong initial guess.

Parameters:

rays (RealRays) – The rays used for calculating distance.

Returns:

An array of propagation distances ‘t’ from each ray’s current position to its intersection point with the geometry.

Return type:

be.ndarray

flip()

Flip the geometry.

Changes the sign of the radius of curvature. The conic constant remains unchanged.

classmethod from_dict(data)[source]

Creates a Chebyshev polynomial geometry from a dictionary.

Parameters:

data (dict) – The dictionary representation of the Chebyshev polynomial geometry.

Returns:

An instance of ChebyshevPolynomialGeometry.

Return type:

ChebyshevPolynomialGeometry

globalize(rays)

Convert rays from the local coordinate system to the global coordinate system.

Parameters:

rays (RealRays) – The rays to convert.

localize(rays)

Convert rays from the global coordinate system to the local coordinate system.

Parameters:

rays (RealRays) – The rays to convert.

sag(x=0, y=0)[source]

Calculates the sag of the Chebyshev polynomial surface at the given coordinates.

Parameters:
  • x (float or be.ndarray, optional) – The x-coordinate(s). Defaults to 0.

  • y (float or be.ndarray, optional) – The y-coordinate(s). Defaults to 0.

Returns:

The sag value(s) at the given coordinates.

Return type:

be.ndarray or float

scale(scale_factor: float)[source]

Scale the geometry parameters.

Parameters:

scale_factor (float) – The factor by which to scale the geometry.

set_radius(value: float) None

Set the radius of curvature.

Parameters:

value (float) – The new radius of curvature.

surface_normal(rays)

Calculates the surface normal of the geometry at the given rays.

Parameters:

rays (RealRays) – The rays, positioned at the surface, for which to calculate the surface normal.

Returns:

The surface normal components (nx, ny, nz).

Return type:

tuple[be.ndarray, be.ndarray, be.ndarray]

to_dict()[source]

Converts the Chebyshev polynomial geometry to a dictionary.

Returns:

A dictionary representation of the Chebyshev polynomial geometry.

Return type:

dict

update_normalization(semi_aperture: float) None[source]

Update the normalization attributes of the geometry based on its defined normalization_mode (‘auto’ or ‘manual’). Base geometry generally does not maintain a normalization radius.

Parameters:

semi_aperture (float) – The current semi-aperture of the surface.