- Research
- Open Access

# Ray mappings and the weighted least action principle

- Jacob Rubinstein†
^{1}Email authorView ORCID ID profile, - Gershon Wolansky†
^{1}and - Yifat Weinberg
^{1}

**8**:6

https://doi.org/10.1186/s13362-018-0048-1

© The Author(s) 2018

**Received:**12 February 2018**Accepted:**2 July 2018**Published:**1 August 2018

## Abstract

Two basic problems in optics are presented. The solutions to both problems are formulated in terms of the associated ray mappings. An alternative formulation based on a weighted sum of the actions along the rays is derived. Existence of solutions is established via the Weighted Least Action Principle. Numerical methods for computing the ray mappings are discussed. Finally, we demonstrate the theoretical considerations by presenting complete solutions to a phase retrieval problem and to a specific beam shaping lens design.

## Keywords

- Ray mapping
- Geometrical optics
- Monge mass transport
- Diffraction integral
- Phase retrieval
- Least action

## 1 Introduction

Ray mappings are fundamental objects in geometrical optics. Given an optical element, its Hamilton’s point eikonal function includes the information on *all* possible ray mappings induced by it. However, in many applications one looks for specific ray mappings that satisfy certain constraints. In this paper we shall consider two such cases. In the first case we search for all ray mappings associated with a single monochromatic beam whose intensity is known at two planes. This question, known as the phase from intensity problem, arises in many applications ranging from astronomy [18, 24] to ophthalmology [12]. The second case concerns the shaping of a collimated beam with arbitrary incident and refracted intensity distributions. Beam shaping has many applications ranging from solar energy to chip manufacturing and medical instruments [6].

While these two cases involve two completely different problems in optics, we shall show that their *mathematical* formulation is essentially identical. We shall then introduce two characterizations of these problems, provide practical methods to compute the ray mappings, and from the mappings obtain the unknown phase in case one, and the beam shaping lens in case two.

## 2 Methods

In the next section we formulate the wave propagation problem via the Rayleigh-Sommerfeld diffraction integral. This formulation is natural for problems where the wave might pass through a caustic. The large wave number expansion of the diffraction integral is used to derive the ray mapping equations for the phase retrieval problem. The ray mapping condition for the beam shaping lens, that was derived in an earlier work by us, is presented in Sect. 4. In Sect. 5 we show that both ray mapping problems can be solved by the Weighted Least Action Principle (WLAP). This variational method, which is a natural extension of the Fermat principle of least time [19, 20], was extensively studied in recent years both theoretically [25] and in a number of applications. In particular we characterize important properties of the critical points of the weighted least action functional, and associate them with the phase retrieval and beam shaping problems. Numerical methods for computing the ray mappings, or equivalently for finding the critical points of the Weighted Least Action functional, along with one example of phase retrieval and one example of lens design are provided in Sect. 6.

## 3 Phase from intensity

*z*direction. We express

*u*in the form

*ϕ*from measurements of its intensities \(I=A^{2}\) at two planes, say \(z=0\) and \(z=h\):

*u*is assumed to obey the Helmholtz equation \(\Delta u + k ^{2} u=0\), where

*k*is the wave number, and we assume that the refraction index is \(n=1\).

*θ*is the angle made by the line connecting \((x,y)\) and \((x_{p},y_{p})\) with the plane \(z=0\). The integral is approximated in the large

*k*limit by the stationary phase method [10], [22]. The stationarity condition is \(\nabla_{x}(\phi (x,y,0) + d(x_{p},y_{p},x,y))=0\), or equivalently:

*s*with respect to the \((x,y)\) variables. We assume that equation (4) implies a one to one correspondence between Σ and \(\Sigma_{p}\), which is equivalent to assuming that no caustic surface intersects either planes \(z=0,h\).

*J*is the Jacobian of the ray mapping \((x_{p},y_{p})=T(x,y)\), and \(|J|\) denotes the absolute value of the determinant of J. We denote the set of mappings

*T*satisfying condition (5) as \({\mathcal {T}}\). Therefore, the phase retrieval problem is equivalent to finding a ray mapping \(T:(x,y) \rightarrow (x_{p},y_{p})\) that satisfies both equations (4) and (5).

## 4 Beam shaping

Consider an incident collimated beam, propagating in the *z* direction, whose cross sectional intensity is \(I(x,y)\). The goal is to design a lens with two freeform surfaces, denoted *f* and *g*, that converts it into a new collimated beam with cross sectional intensity \(I_{p}(x,y)\). Such problems are of great importance in the laser industry [6]. The case where *I* and \(I_{p}\) are both radially symmetric is well-known [15], and can be reduced to simple ODEs. However, we consider the most general case of arbitrary distributions *I* and \(I_{p}\). In this case beam shaping can only be achieved by freeform surfaces [7], [21], [13], [14], [16], [4].

*f*and

*g*for this example. A striking fact, proved in Sect. 5, is that both these surfaces are convex.

*n*. Consider a ray that starts from a point \((x,y)\) on a surface \(z=0\) on the left side of the lens. After two refractions, the ray is mapped into a point \((x_{p},y_{p})=T(x,y)\) on a plane \(z=h\) on the right side of the lens. The ray mapping

*T*is constrained by the energy conservation equation (5). In addition, the mapping

*T*and the lens surfaces

*f*and

*g*are related by Snell’s law of refraction and by the fact that both planes \(z=0\),

*h*are wavefronts, since the incident and refracted beams are collimated. This implies that the optical path length between all points \((x,y)\) and their images \(T(x,y)\) is constant. Combining these facts, and after some algebra, the following equation is obtained [21] that relates

*f*and

*T*.

*χ*and

*b*are two constants that depend upon

*n*, the distance

*h*between the planes, and an integration factor [21]. A similar equation holds for the second surface

*g*.

## 5 The weighted least action principle

We presented in Sects. 3 and 4 two different optical problems that are fully determined by specific ray mappings. Surprisingly, both problems lead to a similar mathematical formulation. Both ray mappings are required to satisfy the energy conservation condition (5). In addition, in both cases the ray mapping *T* must satisfy a ‘symmetry’ condition such as (4) or (6). Three questions arise. The first is whether such ray mappings *T* exist at all. If the answer to this question is positive, the second question is how many solutions exist, and what are their properties. The third question is how to *compute* the ray mappings.

*action*\(C(T,(x,y))\), and then define the

*weighted*total action to be

*M*is restricted to the set \({\mathcal {T}}(I,I_{p})\) of mappings that satisfy condition (5). The functional \(M(T)\) was introduced (for the special case \(C(x_{p},y_{p},x,y) = |(x_{p},y_{p})-(x,y)|\) by Monge. It has been extensively studied in recent years both theoretically and in the context of several applications [25]. In the optical set up, the special case \(C(x_{p},y_{p},x,y) = |(x_{p},y_{p})-(x,y)|^{2}\), naturally denoted the \(L_{2}\) Monge problem, is related to paraxial wave propagation [22], and to the Schrödinger equation [20]. For the applications in the present paper we consider cost functions

*C*of the form

The stationary points of \(M(T)\) are characterized by the following condition:

### Theorem 1

*Assume*

*I*, \(I_{p}\)

*are positive continuous functions*,

*and the domains*Σ, \(\Sigma_{p}\)

*are compact*.

*A ray mapping*\((x_{p},y_{p})=\bar{T}(x,y)\)

*is a critical point of*

*M*

*in the class*\({\mathcal {T}}(I,I_{p})\)

*if and only if*

*T*

*satisfies the following relation*

*for some ‘potential’ function*\(\zeta (x,y)\).

The stationarity condition (9) can be proved (e.g. [22]) by computing the first variation of *M* under the constraint (5). The next question is how many solutions exist.

### Theorem 2

*Under the assumptions of Theorem*
1
*there exist a minimizer and a maximizer for the functional*
\(M(T)\).

The existence of a minimizer of *M*, was proved by Brenier [5]; see also [25]. The existence of a maximizer follows from the fact that the conditions on *I*, \(I_{p}\) and Σ, \(\Sigma_{p}\) imply weak star compactness for the optimization problem; see [26]. Furthermore, we conjecture that there always exist also critical points that are neither minimizers nor maximizers.

As will be shown later, it is important to characterize in some detail the stationary solutions. In the \(L_{2}\) Monge problem, it can be shown that both the minimizer and the maximizer are gradients of some function *ψ*, where *ψ* is convex for the minimizer, and concave for the maximizer. For a more general convex cost function *C*, we now prove:

### Theorem 3

*Assume*

*I*

*and*\(I_{p}\)

*are positive continuous functions*,

*the two domains*Σ, \(\Sigma_{p}\)

*are bounded*,

*and*\(C(z)\)

*is a smooth convex function*.

*Let*\(\zeta (x)\)

*be the potential in equation*(9)

*associated with the maximizer of*

*M*.

*Then the maximizer*\((x_{p},y_{p})=\bar{T}(x,y)\)

*of the functional*

*M*

*is of the form*

*where*

*and*

*ζ*

*is a convex function*.

### Proof

*I*and \(I_{p}\) respectively, i.e.

*π*and all

*α*,

*β*we can apply a min-max argument and conclude

*π*of the form \(\pi = I(x,y) \delta ((x_{p},y_{p}) - T(x,y))\), where \(T(x,y)\) is a mapping in \({\mathcal {T}}\), we have

*ζ*can be expressed in terms of

*η*:

We now select \(\bar{\pi } = I(x,y) \delta ((x_{p},y_{p}) - \bar{T}(x,y))\) and \(\alpha (x,y) = \zeta (x,y)\), \(\beta (x_{p},y_{p}) = \eta (x_{p},y_{p})\). Using the definition of *ζ*, *η* and *T̄* we can calculate the integrals in the inequality (15), and obtain that for this choice of \((\bar{T}, \alpha , \beta )\) both sides equal \(M(\bar{T})\). Therefore *T̄* is the mapping that maximizes \(M(T)\) in the class \({\mathcal {T}}\). Finally, since \(\zeta (x,y)\) is obtained by maximizing a convex function *C*, it must be convex, which completes the proof. □

It is now possible to identify both equations (4) and (6) to be of the form of equation (9). Therefore the phase from intensity problem can be solved by associating the unknown phase \(\phi (x,y,0)\) with the critical points of *M* for the choice \(C_{1}(x_{p},y_{p},x,y) = d(x_{p},y_{p},x,y)\). Similarly the beam shaping lens can be solved by identifying the front lens surface *f* with the critical points of *M* for the choice \(C_{2}(x_{p},y_{p},x,y) = -\sqrt{\chi -bn|(x_{p},y_{p})-(x,y)|^{2}}\). It remains to consider the computation of the critical points.

We point out that in general the selection of the appropriate cost function *C* follows from the nature of the wave equation, or more precisely from its Hamiltonian nature. A number of canonical wave equations, their Hamiltonian, and the associated *C* can be found for instance in [20].

## 6 Results

*M*received quite a bit of attention. For example we refer to [1, 2, 8] where PDE-based approach is suggested. An alternative combinatorial approach is to sample the two intensities

*I*, \(I_{p}\) faithfully by two sets of points \((x^{j},y^{j})\) for

*I*and \((x_{p}^{j},y_{p}^{j})\) for \(I_{p}\), where \(j=1,2,\ldots, N\). The problem of minimizing

*M*is the same as computing the permutation

*π*that minimizes

*C*, at the price of some moderate assumptions on the potential function

*ζ*. However, in the simulations in the present paper we use the Hungarian algorithm.

*N*is the number of sampling point. In practice the convergence is better, as can seen in Table 1.

Convergence of the ray mapping algorithm

Number of sampling points | Average mapping error | Theoretical error bound |
---|---|---|

200 | 0.038 | 0.125 |

400 | 0.021 | 0.088 |

800 | 0.017 | 0.062 |

1000 | 0.015 | 0.056 |

*maximizer*of

*M*, for the cost function \(C_{2}\) defined in Sect. 5, since this solution guarantees that both surfaces

*f*and

*g*are convex, which is a very important consideration in the lens manufacturing. The ray mapping is depicted in the left drawing of Fig. 6. Finally, we depict the lens surfaces in Fig. 7.

Indeed, as proved in Theorem 3 in Sect. 5, both surfaces are convex, in contrast to the highly nonconvex intensity distribution of the incident beam.

## 7 Discussion and conclusions

The notion of ray mapping was presented in the context of two canonical optical problems. Although the problems are physically completely different, it was shown that they both can be solved within the same mathematical framework of the Monge optimal transport paradigm. We showed that the weighted least action functional has at least two critical points, one a minimizer and one a maximizer. We conjecture that there exist also other (finitely many) critical points.

The characterization of the optical problems as minimizers or maximizers of the functional \(M(T)\) provides a very useful tool for computing the solutions of these problems. The minimizer (or maximizer) can be found by a relatively simple combinatorial optimization tools. We thus provided an example demonstrating the application of the theory to phase retrieval and an example of beam shaping. An important aspect of the beam shaping problem is that by *maximizing* the functional \(M(T)\), we obtain a lens with two convex freeform surfaces. The convexity was proved in a very general context under certain convexity assumption on the action *C*. This assumption holds for the Helmholtz equation or Fresnel equation for monochromatic waves, for the Schrödinger equation (in the semi-classical limit) and in other cases.

## Notes

## Declarations

### Acknowledgements

Not applicable

### Availability of data and materials

Data sharing not applicable to this article as no datasets were generated or analysed during the current study.

### Funding

This work is supported by grants from the Israel Science Foundation.

### Authors’ contributions

JR and GW contributed the theoretical parts of the paper, and YW contributed the numerical examples and simulations. All authors read and approved the final manuscript.

### Competing interests

The authors declare that they have no competing interests.

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## Authors’ Affiliations

## References

- Angenent S, Tannenbaum A, Haker S. Minimizing flows for the Monge–Kantorovich problem. SIAM J Math Anal. 2003;35:61–97. MathSciNetView ArticleMATHGoogle Scholar
- Benamou JD, Brenier Y. Minimizing flows for the Monge–Kantorovich problem. Numer Math. 2000;84:375–93. MathSciNetView ArticleMATHGoogle Scholar
- Born M, Wolf E. Principles of optics. Cambridge: Cambridge University Press; 1999. View ArticleGoogle Scholar
- Bosel C, Gross H. Single freeform surface design for prescribed input wavefront and traget irradiance. J Opt Soc Am A. 2017;34:1490–9. View ArticleGoogle Scholar
- Brenier Y. Polar factorization and monotone rearrangement of vector-valued functions. Commun Pure Appl Math. 1991;64:375–417. MathSciNetView ArticleMATHGoogle Scholar
- Dickey FM. Laser beam shaping. Opt Photonics News. 2003;14:31–5. View ArticleGoogle Scholar
- Glimm T, Oliker VI. Optical design of two-reflector systems, the Monge–Kantorovich mass transfer problem and Fermat’s principle. Indiana Univ Math J. 2004;53:1255–87. MathSciNetView ArticleMATHGoogle Scholar
- Haber E, Rehman T, Tannenbaum A. An efficient numerical method for the solution of the \(L_{2}\) optimal mass transfer problem. SIAM J Sci Comput. 2010;32:197–211. MathSciNetView ArticleMATHGoogle Scholar
- Kuhn HW. The Hungarian method for the assignment problem. Nav Res Logist Q. 1955;2:83–97. MathSciNetView ArticleMATHGoogle Scholar
- Mendel L, Wolf E. Optical coherence and quantum optics. Cambridge: Cambridge University Press; 1995. View ArticleGoogle Scholar
- Merigot Q. Multiscale approach to optimal transport. Comput Graph. 2011;30:1548–92. Google Scholar
- Nam J, Rubinstein J, Thibos L. Wavelength adjustment using an eye model from aberrometry data. J Opt Soc Am A. 2010;27:1561–74. View ArticleGoogle Scholar
- Oliker V. On design of freeform refractive beam shapers, sensitivity to figur eerror and convexity of lenses. J Opt Soc Am A. 2008;25:3067–76. MathSciNetView ArticleGoogle Scholar
- Oliker V. Designing freeform lenses for intensity and phase control of coherent light with help from geometry and mass transport. Arch Ration Mech Anal. 2011;201:1013–45. MathSciNetView ArticleMATHGoogle Scholar
- Oliker V, Rubinstein J, Wolansky G. Ray mappings and illumination control. J Photonics Energy. 2013;3:035599. View ArticleGoogle Scholar
- Oliker V, Rubinstein J, Wolansky G. Supporting quadric method in optical design: precise illumination control of a collimated light with a single convex freeform lens. Adv Appl Math. 2015;62:160–83. View ArticleMATHGoogle Scholar
- Prins CR, Ten Thije Boonkkamp JHM, Van Roosmalen J, Ijerman WL, Tukker TM. A Monge–Ampere-solver for free-form reflector design. SIAM J Sci Comput. 2014;36:640–60. MathSciNetView ArticleMATHGoogle Scholar
- Roddier F. Curvature sensing and compensation: a new concept in adaptive optics. Appl Opt. 1988;27:1223–5. View ArticleGoogle Scholar
- Rubinstein J, Wolansky G. A variational principle in optics. J Opt Soc Am A. 2004;21:2164–72. MathSciNetView ArticleGoogle Scholar
- Rubinstein J, Wolansky G. A weighted least action principle for dispersive waves. Ann Phys. 2005;316:271–84. MathSciNetView ArticleMATHGoogle Scholar
- Rubinstein J, Wolansky G. Intensity control with a free-form lens. J Opt Soc Am A. 2007;24:463–9. MathSciNetView ArticleGoogle Scholar
- Rubinstein J, Wolansky G. Optimal transport and geometrical optics. J Opt Soc Am A. 2017;34:1817–23. View ArticleGoogle Scholar
- Smith DG. Field guide to physical optics. Bellingham: SPIE; 2013. View ArticleGoogle Scholar
- Teague MR. Deterministic phase retrieval: a Green’s function solution. J Opt Soc Am. 1983;73:1434–41. View ArticleGoogle Scholar
- Villani C. Topics in optimal transportation. Providence: Am. Math. Soc.; 2003. View ArticleMATHGoogle Scholar
- Wells BB. Weak compactness of measures. Proc Am Math Soc. 1969;20:124–30. MathSciNetView ArticleMATHGoogle Scholar