Function Repository Resource:

# RayTransferMatrix

Calculate the ray transfer matrix of a Gaussian optical system

Contributed by: Julián Laverde
 ResourceFunction["RayTransferMatrix"][{key1→val1,key2→val2,…}] calculates the ABCD matrix of the optical system composed of the processes keyj with parameters valj.

## Details

ResourceFunction["RayTransferMatrix"] returns the ABCD matrix (also known as the ray transfer matrix) of a cascaded system for performing ray tracing calculations under the paraxial approximation.
The available optical proccesses (keyjvaluej) are the following:
 "Refraction" {r,n1,n2} refraction of a light ray on a spherical surface of radius r and refractive index n2 immersed in a medium of refractive index n1 "Reflection" {r} reflection of a light ray on a spherical surface of radius r "Propagation" {d,n} propagation of a light ray a distance d in a medium of refractive index n "ThinLens" {f} transmission through a thin lens of focal length f "ThickLens" {r1,r2,n1,n2,t} transmission through a thick lens of first surface radius r1, second surface radius r2, refractive index n2 and center thickness t inmmersed in a medium of refractive index n1 "Prism" {k,d,n} transmission through a single prism of beam expansion factor k, path length d and refractive index n for orthogonal beam exit
The order of the optical components in the input list must be the one that light rays encounter.
The output ray {y2,θ2} is related to the input ray that crosses the input plane at a distance y1 from the optical axis, traveling in a direction that makes an angle θ1 with the optical axis given by Dot[ResourceFunction["RayTransferMatrix"][…], {y1,θ1}].
Use consistent length units for all parameters in all processes. The input ray vector units should also be consistent with the units used for the matrix.
For planar surfaces use Infinity as the radius.

## Examples

### Basic Examples (6)

Calculate the refraction matrix:

 In[1]:=
 Out[1]=

Calculate the reflection matrix:

 In[2]:=
 Out[2]=

Calculate the propagation matrix:

 In[3]:=
 Out[3]=

Calculate the thin lens in a free-space matrix:

 In[4]:=
 Out[4]=

Calculate the thick lens matrix:

 In[5]:=
 Out[5]=

Calculate the single prism matrix:

 In[6]:=
 Out[6]=

### Scope (2)

Calculate the symbolic ray transfer matrix of a simple spherical lens by its processes:

 In[7]:=
 Out[7]=

Calculate the system matrix of a plano-concave lens of 1 cm thickness:

 In[8]:=
 Out[8]=

### Applications (2)

Calculate the system matrix of a Tessar lens:

 In[9]:=
 Out[9]=

Calculate the height and angle at which a ray emerges coming toward the lens at a height of 2 cm above the optical axis and an angle of 5.73°:

 In[10]:=
 Out[10]=

Calculate the system matrix of a planar optical cavity:

 In[11]:=
 Out[11]=

### Possible Issues (1)

Make sure that the list of values for each optical process has the required length:

 In[12]:=
 Out[12]=

## Publisher

WolframSpecialProjects

## Version History

• 1.0.0 – 21 September 2021