The fast evaluation of the Jacobian is an essential part of the optimization of optical systems using the damped least-squares algorithm. While finite differences provide an intuitive way to approximate derivatives, algorithmic differentiation is a technique to evaluate them exactly. However, applying algorithmic differentiation to a ray tracing routine for optical systems with many parameters is computationally expensive, where the main costs are caused by the determination of the ray-surface intersection. To overcome this disadvantage, we present a mathematical analysis of the ray-surface intersection and its efficient differentiation in both forward and reverse mode algorithmic differentiation. Futhermore the structure of the optimization variables and operands is exploited to derive a method that allows computation of the Jacobian in the same order of computational complexity as the primal ray trace. The method is successfully tested for a rotationally symmetric lens system and a freeform design task.
Read full abstract