OpticalRayTracing.jl

Ray tracing, optical system solving, and aberration analysis.


This package is meant to be an initial design prototyping tool.

Installation

using Pkg
Pkg.add(url = "https://github.com/Sagnac/OpticalRayTracing.jl")

Sample usage

using OpticalRayTracing

# Tessar lens, units in mm; layout from Hecht's Optics
surfaces = [
    # R        t        n
    Inf        0.0      1.0
      16.28    3.57     1.6116
    -275.7     1.89     1.0
     -34.57    0.81     1.6053
      15.82    2.345    1.0
    Inf        0.905    1.0
    Inf        2.17     1.5123
      19.2     3.96     1.6116
     -24.0     0.0      1.0
]

# Clear aperture semi-diameters
a = [9.5, 9.5, 9.0, 9.0, 7.63, 8.5, 8.5, 8.5]

# image height
h′ = 21.5

system = solve(surfaces, a, h′)
OpticalRayTracing.System{Layout, Spherical}

   f: 50.7885
EBFD: 44.0610
EFFD: -43.1125
   N: 2.8140
 FOV: 45.8882
stop: 5
  EP: D = 18.0483, t = 8.9314
  XP: D = 17.6129, t = -5.5024
julia> system.M # vertex matrix2×2 TransferMatrix:
  0.867538   13.3868
 -0.0196895   0.848862