ray_transfer_kernel

Function ray_transfer_kernel 

Source
pub fn ray_transfer_kernel(
    matrix: &AbcdMatrix,
    height: RayHeight,
    angle: RayAngle,
) -> Result<(RayHeight, RayAngle), PhysicsError>
Expand description

Applies an ABCD matrix to a ray vector.

$$ \begin{pmatrix} y_{out} \ \theta_{out} \end{pmatrix} = \begin{pmatrix} A & B \ C & D \end{pmatrix} \begin{pmatrix} y_{in} \ \theta_{in} \end{pmatrix} $$

The ray transfer matrix (ABCD matrix) describes the optical system in the paraxial approximation. The vector consists of the ray height $y$ and angle $\theta$.

§Arguments

  • matrix - The $2 \times 2$ ray transfer matrix (ABCD).
  • height - Input ray height $y$.
  • angle - Input ray angle $\theta$.

§Returns

  • Result<(RayHeight, RayAngle), PhysicsError> - The output ray height and angle.