Freeform Lens Design for Scattering Data with General Radiant Fields

We show the existence of a lens, when its lower face is given, such that it refracts radiation emanating from a planar source, with a given field of directions, into the far field that preserves a given distribution of energies. Conditions are shown under which the lens obtained is physically realizable. It is shown that the upper face of the lens satisfies a pde of Monge-Ampère type.


Introduction
In this paper, we solve the following inverse problem in geometric optics concerning the design of a lens: rays are emitted from a planar source with unit direction e(x) and energy density I(x) for every x ∈ . The rays first strike a smooth given surface described by the graph of a function u. We are given a target * ⊂ S 2 , the unit sphere in R 3 , equipped with a Radon measure η such that To place our results in perspective, both from the theoretical and practical points of view, we mention some results from the literature. The problem of finding a convex, analytic, and symmetric lens focusing all rays from a point source into a point image was first solved in [6] in 2d using a fixed point type argument. This result is extended in [17] to 3d to construct freeform lenses that refract rays emitted from a point source into a constant direction or a point image. The general case for an arbitrary incident field and a planar source is solved in [13]; the reflection case is studied in [11].
The surfaces constructed in this paper are freeform; in particular, they are not rotationally symmetric. Freeform design is a modern field in Optics. This is a breakthrough in the optical industry due to its applications in illumination, imaging, aerospace and biomedical engineering; see for example the news article [23] and the survey [7] for large set of applications. Due to recent technological advancement in ultra precision cutting, grinding, and polishing machines, manufacturing freeform optical devices with high precision is now possible, see [2]. The systems obtained enhance the performance of traditional designs and provide more flexibility for designers [5]. Moreover, they can achieve imaging tasks that are impossible with symmetric designs. However, the mathematical literature in freeform optics is still limited. In optical engineering, freeform surfaces are designed using the SMS 3D method for various applications but they do not have an analytical expression and are calculated numerically, see [27,Chapter 8] and [22].
In this paper, we develop a mathematical theory to solve an illumination problem involving two refracting surfaces, a planar source, and arbitrary incident field.
A plan and description of the contents of the paper is as follows. In Section 2.1, we prove that if σ C,w is a uniformly refractive surface then the function d(x, C, w), given in (2.3), satisfies a Lipschitz estimate which implies by Rademacher's theorem that d is differentiable a.e.. Using this estimate, we prove in Theorem 2.5 that if the norms ||e ||, ||e − κ 1 κ 2 w || 1 and the Lipschitz constants L e , L u , and L Du are small enough, then the constant C can be chosen so that σ C,w has no self intersections. Section 3 is devoted to analyze the singular points of f (x, C, w). We say that f (x, C, w)(:= f (x)) is regular at x if f x 1 (x) × f x 2 (x) = 0, and is singular otherwise. In Section 3.2, the collimated case e(x) = (0, 0, 1) is considered, and it is shown that for some conditions on the eigenvalues of D 2 u, the constant C can be chosen so that σ C,w is regular at every point, Theorem 3.2. The case of a general field e is analyzed in Section 3.1. It is shown in Theorem 3.1 that if u is concave, and the derivatives of the components of e are such that the matrix W given in (3.1) is positive semi-definite, then one can choose C so that σ C,w is regular at every point. To summarize, to avoid self intersections, we need to control the size of the parameters involved, whereas to avoid singularities one needs to control the curvature of the surface u and that of the potential h, recall e = Dh. In Section 4, we construct refracting surfaces σ so that the lens sandwiched between u and σ refracts incident rays with direction e(x), x ∈ , into a far field target * ; see Figure 1. In this case, u is assumed to be concave, h convex, and u, , * and e are so that σ C,w satisfies the conditions in Theorem 2.5 for each w ∈ * . σ is parametrized the vector F(x) = (ϕ(x), u(ϕ(x))) + D(x) m(x); D is constructed so that the refractor σ is supported at every point by some uniformly refractive surface σ C,w with C chosen so that σ C,w has no self intersections and no singularities. D(x) represents the length of the trajectory of the ray emanating from x inside the lens (u, σ ). We show in Theorem 4.2 that the function D is Lipschitz, σ has no self intersections and is regular a.e. In Section 4.1 , we show that σ induces a Borel measure μ σ . The energy problem is then reduced to find a collection of uniformly refractive surfaces σ C,w with w ∈ * such that the envelope of this collection yields a refractor σ satisfying μ σ = η. This is first solved in the discrete case in Section 5.1, that is, when η is a finite linear combination of delta functions. The general case of measure η is then done in Section 5.2 by approximating η by discrete measures. In Section 6 we introduce Aleksandrov solutions to the energy problem and compare them with the notion of solution previously defined. For a connection with generated Jacobian equations see Remark 6.1. Finally, in Section 7, we derive the PDE of the problem and show that D satisfies a Monge-Ampère type differential equation, equation (7.11), that is simplified in the collimated case in Section 7.3.

Uniformly Refracting Surfaces for a General Field e(x)
Let be a convex bounded region in R 2 , and e(x) be a unit field in R 3 defined for every x ∈ . From each point (x, 0), with x ∈ , consider the line through (x, 0) with direction e(x). We are given a surface u such that its graph intersects each of these lines at only one point, denoted by (ϕ(x), u(ϕ(x))). Let be the projection over R 2 of the points (ϕ(x), u(ϕ(x))) with x ∈ . We assume that the map ϕ : → is C 1 ( ), the field e(x) = (e 1 (x), e 2 (x), e 3 (x)) := (e (x), e 3 (x)) is C 1 ( ) with e 3 (x) > 0, and u(z) is C 2 in an open neighborhood of .
Given w ∈ S 2 , we found in [13] necessary and sufficient conditions between u, w, and e, for the existence of a lens with bottom face u such that all rays emitted from (x, 0) with direction e(x) are refracted uniformly into w. The material the lens is made of has a refractive index n 2 , such that n 2 > n 1 , n 3 , where n 1 and n 3 denote, respectively, the refractive indices of the media below and above the lens; n 1 and n 3 are unrelated. We refer to this as a uniformly refracting lens into the direction w, and we denote it by w .
The top face of the lens is constructed such that it refracts the rays with direction m(x) uniformly into the direction w. Since κ 2 < 1, to avoid total internal reflection, we must assume that Under condition (2.2), it is proved in [13, Section 3] that a uniformly refractive lens w exists if and only if curl(e (x)) = 0, i.e., e is generated by some potential function h, e (x) = Dh(x) with h ∈ C 2 ( ). In addition, the top face of the lens, denoted by σ C,w , is parametrized by the vector 3) where C is constant chosen so that d(x, C, w) > 0 for all x ∈ . If we let then d(x, C, w) > 0 for all x ∈ when C > C * .

A Lipschitz Estimate for d(x, C, w)
Notice that for (2.3) to be defined we only need u to be differentiable; in fact, we prove the results in this section only assuming differentiability of u. This yields more precise constants in the inequalities that will be used later. The goal in this section is to prove the following proposition for the distance function d: If u, Du, ϕ, e are all Lipschitz, we then obtain where the L's are the Lipschitz constants of the corresponding functions.
To prove the proposition we shall prove first two lemmas.

Lemma 2.2. We have
for all x, y ∈ , where x , y are defined in Proposition 2.1.
Notice that We first estimate B. Let From (2.7) we can write B as follows: Since e · ν > 0 Similarly, It remains to estimate B 3 . Let Multiplying and dividing by H (x, y) yields Estimate B 1 3 : . Therefore as in the estimate of B 1 we obtain Estimate B 3 3 : The estimate then follows as in estimating B 2 . So we obtain Collecting estimates we then obtain and therefore using the estimates of B 1 , B 2 , and B 3 (2.8) Next we estimate A: From (2.7) we have λ(y) Then and so Also, from (2.8) and the lower bounds for , we have Therefore from (2.6) we obtain where x = ϕ(x), y = ϕ(y) which completes the proof of the lemma.
We are now ready to prove Proposition 2.1.

Analysis of the Self-Intersection of the Surfaces
Since the upper surface σ C,w of the lens w is given parametrically, it might have self intersections, see Figure 2(a). In this case, the lens is not physically realizable. In this section, we will use the Lipschitz estimate of d from Proposition 2.1 to show that if the field e, the bottom surface of the lens u, and w, are all suitably chosen, then the constant C can be chosen so that d(x, C, w) > 0 and the surface σ C,w parametrized by f (x, C, w) = (ϕ(x), u(ϕ(x))) + d(x, C, w) m(x) does not have self intersections. The special case where e(x) = w = (0, 0, 1) is discussed in [13,Remark 3.4].
Recall that L F denotes the Lipschitz constant of the map F, i.e., |F(x) − F(y)| ≤ L F |x − y| for all x, y in the corresponding domain. We assume that the incident field e is never horizontal, i.e., e 3 (x) ≥ δ > 0, for some δ > 0. We first prove that under conditions on the Lipschitz constants of u and e, and the L ∞ -norm of e , the map ϕ is bi-Lipschitz.
On the other hand, which from (2.14) and (2.12) yields the lower estimate in (2.15).
With this lemma in hand, we give conditions on the size of the Lipschitz constants of u, Du, and e so that if the constant C is appropriately chosen, then the surface f (x, C, w) does not have self-intersections. The following theorem shows that a small perturbation of the collimated case considered in [13,Remark 3.4] gives also surfaces that are physically realizable: Theorem 2.5. Suppose (2.12) and (2.14) hold. There are positive constants and (2.17) then we have the following: if we choose L e , L Du , e L ∞ ( ) , max z∈ |e (z) − κ 1 κ 2 w |, and L u all sufficiently small satisfying with C * given by (2.4), then the surface parametrized by is physically realizable, i.e., f is injective and d(x, C, w) > 0, for C > C * and The constants C 1 , C 3 , C 4 , C 5 depend only on κ 1 and κ 2 and the constant C 2 depends only on κ 1 , κ 2 , u, h, and .
Proof. Assume f is not injective, then there are two points x, y ∈ , x = y, such that f (y, C, w) = f (x, C, w). We first prove that this implies that α in (2.16) is not zero (independently of C 1 > 0 to be chosen later). In fact, if α = 0, then e is constant and L Du = 0. This means the emanating rays are parallel and u is a plane with normal ν. Therefore, u refracts all rays into a fixed unit direction m. Since Since the graph of u is planar, dotting the last identity with ν, yields m ·ν = 0, a contradiction with the Snell law since κ 1 > 1. Therefore, if there are self-intersections, then α = 0.
On the other hand, To estimate I , we use Proposition 2.1. To estimate I I , we have from (2.9), (2.10), (2.11), and since g( Combining the estimates for I and I I we obtain Since (2.12) and (2.14) hold, then by Lemma 2.4 we get (2.15), replacing in (2.19) we obtain which reads If L e , L Du , e L ∞ ( ) , max z∈ |e (z)−κ 1 κ 2 w |, and L u are chosen sufficiently small so that In conclusion, if we pick C > C * and

Discussion About the Singular Points of f
We say that a surface parametrized by a function f (x), That is, at each regular point the surface has a normal vector. Otherwise, y is a singular point.
It is proved in [13] that if a lens sandwiched between the lower surface u and the upper surface f , refracts all rays with direction e(x) into the direction w, and f is a regular surface at each point, then the upper surface is parametrized by In general, such a parametrization might lead to a surface having singular points and therefore at those points there cannot be refraction since the normal is not defined.
The purpose of this section is to show that under appropriate assumptions on u and for a range of values of the constant C, that parametrization indeed leads to a regular surface and therefore the lens sandwiched by u and f (x, C, w) refracts each ray emanating from x with direction e(x) into the direction w.
To simplify the notation in this section we write and recall that

Case of a General Field e(x)
We consider the unit incident field e(x) = (e 1 (x), e 2 (x), e 3 (x)) with e 3 (x) > 0. The upper face of the lens is parametrized by The goal is to find conditions so that a given point y is a regular point of the surface described by f , i.e., | f x 1 (y) × f x 2 (y)| > 0. This is the contents of the following theorem. Theorem 3.1. Suppose curl e = 0, u is concave at y, and y is a regular point for . In particular, if e = Dh and h is convex at y, then y is a regular point for f .
We shall prove that if u is concave and (3.1) holds, then the matrix Let us analyze the definiteness of matrix Notice that by the Cauchy-Binet formula for the cross product. Next and since Since u is concave at y, we obtain det H ≥ 0 and trace H ≤ 0, so H ≤ 0 at y since H is symmetric. From (3.5) and since λ < 0, it follows that the symmetric matrix −λ v x j · ν x i i j is positive semi-definite at y. From (3.3) and (3.1) we conclude that is positive semi-definite at y as desired. Thus, from (3.2) the matrix ( f x i · f x j ) i j is positive definite at x = y because it is written as the sum of the positive definite Finally, let us analyze condition (3.1). We have Hence Since curl e = 0, i.e., (e 1 ) by Cauchy-Binet's formula. Since e 3 = 1 − e 2 1 − e 2 2 , and where e = (e 1 , e 2 ) = Dh; recall that here Du is calculated at ϕ(y), ν is the normal to u at (ϕ(y), u(ϕ(y))), and e j are calculated at y.
We will simplify (3.7). We first write det ∂ϕ ∂ x (using the notation at the end of paper) in terms of u and Du.
By assumption e · ν > 0, and and so So (3.7) can be written as Notice that since ∂e ∂ x is symmetric, x e j and the formula follows. Therefore (3.9) reads and if h convex at y this clearly holds and also (3.8). This completes the proof of the theorem.

Collimated Case
The upper surface of the lens is parametrized by Since the incident field is now explicit, we obtain more information than in Theorem 3.1 for points where u is not necessarily concave.
then y is a regular point for f .
Proof. The first part of the theorem follows immediately from Theorem 3.1 since W = 0. As before letting v(x) = (x, u(x)), we first find explicit expressions for the terms in (3.2) that will lead to formula (3.24).
, the outer unit normal to the graph of u at Since |ν| = 1, then ν · ν x i = 0 and therefore can be written as follows: We next calculate L by calculating first Dλ ⊗ Dλ. Notice that Then We conclude that We next calculate the matrixν : (3.20) By (3.19) and (3.20), we obtain Notice that from (3.18) Replacing (3.21) in the formula for M yields Notice that R is invertible. In fact, by the Sherman-Morrison formula [24], and Hence M becomes We conclude that Since R is symmetric and positive definite we get that H is positive semi-definite. 2 Therefore by (3.24) and the concavity of the det function on positive semi-definite matrices we deduce 2 We use here that if A, B are symmetric, positive semi-definite and AB is symmetric, then AB is positive semi-definite.
To prove the second part of the theorem, suppose y is a singular point for f . So det M(y) = 0, and then det R −1 + d λ By (3.23), the eigenvalues of R −1 are 1 and 1+ Hence and therefore when f has a singular point at y. By (3.11) we then have So if f has a singular point at y, then from (3.25) we obtain This completes the proof of the theorem.

Lenses Refracting a Field e into a Target *
We are given the source a bounded convex region in R 2 , and the far field target * , a closed subset of S 2 . The incident unit field e(x) = (e (x), e 3 (x)) is given so that e 3 (x) ≥ δ > 0, for every x ∈¯ , and e = Dh where h is a C 2 convex function in . * and e are such that condition (2.2) is satisfied for every x ∈¯ and w ∈ * . The lower face of the lens is given by the graph of a C 2 concave function u in as at the beginning of Section 2. Further, we assume that L e , L Du , L u , ||e || L ∞ , max x∈¯ ,w=(w ,w 3 )∈ * |e − κ 1 κ 2 w | are small enough so that (2.12), and (2.14) are satisfied, β w < 1/3 and C * < 1/3 − β w α for every w ∈ * , where C * , α, and β w are defined respectively in (2.4), (2.16), and (2.17). We set β = max w∈ * β w , by compactness of * , we have β < 1/3 and C * < 1/3 − β α . Theorems 2.5 and 3.1 imply that for every w ∈ * , and C > C * with |C| ≤ 1/3 − β α , the surface σ C,w parametrized by the vector f (x, C, w) = (ϕ(x), u(ϕ(x)))+d(x, C, w) m(x), with m and d given respectively in (2.1) and (2.3), has no self-intersections and is regular at every point. Moreover, the lens enclosed between u and σ C,w refracts uniformly the field e into w. We use these uniformly refractive surfaces to construct a lens with lower face u and upper face σ that refracts all rays emitted from (x, 0) with direction e(x) into the far field target * . σ is parametrized by the vector where D is constructed so that for every point x ∈ , σ is supported from above at F(x) by a uniformly refractive surface σ C,w with some w ∈ * . More precisely, we have the following definition: , yields a lens refracting into * if for each x 0 ∈¯ there exists w ∈ * and C, with C ≥ C * + ε and |C| ≤ 1/3 − β α , such that the surface σ C,w supports σ at F(x 0 ), i.e., D(x) ≤ d(x, C, w) for every x, with equality at x = x 0 . We also define the corresponding normal map of σ We show in the following theorem that the surfaces σ given parametrically by Definition 4.1 have no self-intersections and have a normal vector at almost every point. This will follow from the conditions on the constant C and that u is concave and e = Dh with h convex. (1) σ has no self-intersections; (2) |N | = 0; (3) If y ∈ \N , then F is regular at y, i.e., σ has a normal at y;

) If y ∈ \N , then N σ (y) is a singleton and the ray emitted from y with direction e(y) is refracted by the lens enclosed by u and σ into N σ (y).
To show the theorem, we first prove the following lemma:

Lemma 4.3. Suppose σ , parametrized by F(x) = (ϕ(x), u(ϕ(x))) + D(x) m(x), yields a lens in the sense of Definition 4.1 that refracts into * . Then:
(1) D is a Lipschitz continuous function, Proof. Let x, y ∈ , and w 1 ∈ N σ (x), then there exists C 1 ≥ C * + ε and such that σ C 1 ,w 1 supports σ from above at F(x). Therefore D(x) = d(x, C 1 , w 1 ), and D(y) ≤ d(y, C 1 , w 1 ). By the second part of Proposition 2.1 where A, A 1 , A 2 are constants independent of x, y, and depending only on e, h, u, , , and * . Switching the roles of x and y we conclude that D is Lipschitz.
To prove the second part of the lemma, we use the above estimate for D, Lemma 2.3, and inequalities (2.13), (2.18), and obtain the following:
Proof of Theorem 4.2. The proof of (2) follows from Lemma 4.3, and Rademacher theorem.
To prove (1) we proceed by contradiction. Assume that F is not injective, then there exist x = y such that F(x) = F(y). Without loss of generality, suppose D(y) ≥ D(x) and let σ C 1 ,w 1 be a uniformly refractive surface supporting σ at

Using the fact that D(y)
, and the estimates of I and I I in the proof of Theorem 2.5, we get that with α, and β w 1 defined in (2.16), and (2.17). Therefore, by (2.15), 1/3 < α|C 1 | + β w 1 , and hence , which is a contradiction.
We next prove (3). Recall that F regular at y means that F x 1 (y) × F x 2 (y) = 0. Let σ C,w be a supporting surface to σ at F(y). We claim that if y ∈ \N then ∇D(y) = ∇d(y, C, w) (here to avoid confusion we use ∇ to denote the gradient). In fact, since D and d(·, C, w) are differentiable at y, and D(x) ≤ d(x, C, w) for every x ∈ , then by Taylor's theorem, For τ > 0 small enough, we have x = y + τ v ∈ for every v with |v| = 1. Then Dividing by τ and letting τ → 0 + we get ∇D(y) · v ≤ ∇d(y, C, w) · v for every v ∈ S 2 , and the claim follows. Therefore Since h is convex, and u is concave at y then Theorem 3.1 implies that and so y is a regular point for F. Proof of (4). We have y ∈ \N , and by part (3) of the theorem, y is a regular point for F. Assume there exist w 1 , w 2 ∈ N σ (y), and let σ C 1 ,w 1 , σ C 2 ,w 2 be two supporting surfaces to σ at F(y). Let ν σ , ν C 1 ,w 1 , ν C 2 ,w 2 be the unit normals to σ, σ C 1 ,w 1 , σ C 2 ,w 2 at y, respectively, towards medium n 3 . By Snell's law at f (y, C 1 , w 1 ) and f (y, C 2 , w 2 ), we have where φ κ 2 as defined in (3.16), and the incident direction m(y) is given by (2.1). From the proof of Part (3) we have Then ν σ (y) = ν C 1 ,w 1 (y) = ν C 2 ,w 2 (y), and therefore λ C 1 ,w 1 = λ C 2 ,w 2 , and hence w 1 = w 2 , which ends the proof of Part (4).

Remark 4.4.
If y ∈ \N , then from part (4) of the theorem, there exists a unique w ∈ N σ (y). Will show also that there is a unique C ≥ C * + ε and |C| ≤ 1/3 − β α such that σ C,w support σ at F(y). In fact, assume there exist C 1 , C 2 such that σ C 1 ,w and σ C 2 ,w supports σ at F(y). Then D(y) = d(y, C 1 , w 1 ) = d(y, C 2 , w 1 ), and from (2.3) we get C 1 = C 2 .

The Refractor Measure
Let I ∈ L 1 ( ) with I ≥ 0. The energy received on a set E ⊂ * is given by where T σ is the tracing map from Definition 4.1. We prove in this section that (4.1) is well defined for each E Borel subset of * and is a finite measure on * which will be called the refractor measure and denoted by μ σ . The conclusion then follows since |N | = 0 by Theorem 4.2 (2), and that |∂ | = 0 because is convex.

Proposition 4.6. S σ contains all closed subsets of * .
Proof. We show that T σ (E) is compact for each E closed subset of * . Let x n be a sequence in T σ (E) converging to x 0 , i.e., there exists σ C n ,w n with w n ∈ E, C n ≥ C * + ε and |C n | ≤ (1/3 − β)/α supporting σ at F(x n ). Then there exist a subsequence {n k } such that w n k and C n k converges to w 0 and C 0 , respectively. Since E is closed, w 0 ∈ E and we also have C 0 ≥ C * + ε and |C 0 | ≤ (1/3 − β)/α. We prove that x 0 ∈ T σ (w 0 ). In fact D(x) ≤ d(x, C n k , w n k ) with equality at x = x n k . Letting k → ∞, we get D(x) ≤ d(x, C 0 , w 0 ) with equality for x = x 0 . Therefore T σ (E) is compact and hence E ∈ S σ . Lemma 4.7. S σ is closed under complements.
We then conclude the following: (2) μ n → μ weakly, where μ n and μ are the refractor measures associated to F n and F.
Proof. Let x 0 ∈¯ and w n ∈ N σ n (x 0 ). There exists C n ≥ C * + ε with |C n | ≤ (1/3 − β)/α such that with equality at x = x 0 . There exists a subsequence C n k and w n k converging to C 0 and w 0 , respectively, with w 0 ∈ * . Since d( This shows that σ C 0 ,w 0 supports σ at F(x 0 ), and part (1) is then proved. We now prove (2). LetN be the set of all points where D, and {D n } with n = 1, . . . are not differentiable. By Theorem 4.2(4), N σ n , N σ are single valued for x ∈¯ \N , and by Theorem 4.2(2) |N | = 0. Then for every h ∈ C( * ), It remains to show that N σ n (x) → N σ (x) for x ∈¯ \N . In fact, let w 0 = N σ (x) and w n = N σ n (x). From the proof of (1), every subsequence w n k of w n has a sub-subsequence converging to an element of N σ (x), and hence to w 0 .

The Energy Problem
In this section, we are given a non-negative function I in L 1 ( ), and a Radon measure η in * , that satisfy the following conservation of energy condition: As in Section 4, we assume that e 3 (x) ≥ δ > 0 for every x ∈¯ , and e = Dh where h is a C 2 convex function. Also * and e are such that (2.2) is satisfied. The lower face of the lens is given by the graph of u ∈ C 2 concave. The constants L e , L u , L Du , ||e || L ∞ , max x∈¯ ,w=(w ,w 3 )∈ * |e (x) − κ 1 κ 2 w |, are chosen small enough so that (2.12), and (2.14) are satisfied, β < 1/3 and C * < 1/3 − β α , where C * , α are given in (2.4), (2.16) respectively, and β = max w∈ * β w with β w defined in (2.17). We recall once again that all these choices are to avoid surfaces with self intersections and singular points. The goal of this section is to construct a refractor σ from¯ to * , in the sense of Definition 4.1, such that where μ σ is the measure defined in Theorem 4.8.

Existence in the Discrete Case
We are given * compact in S 2 equipped with a discrete measure η = K i=1 g i δ w i with g 1 , . . . , g K > 0, and and satisfying the conservation of energy condition We define a discrete refractor σ as follows. Let C i be constants such that C i ≥ C * + ε and |C i | ≤ (1/3 − β)/α, for i = 1, . . . , K . Consider σ C i ,w i the surfaces parametrized by the vectors with d(x, C i , w i ) given by (2.3) and m given in (2.1). We let σ be the surface parametrized by σ is clearly a refractor from¯ to * in the sense of Definition 4.1, and we identify σ with the vector (C 1 , . . . , C K ).
We shall prove the following theorem: Proof. We establish the theorem by proving a sequence of claims. Let where C * 1 given in (5.2). Claim 1. W = ∅. We prove that (C * 1 , C 2 , . . . , C K ) ∈ W , with C i = C * 2 for 2 ≤ i ≤ K where C * 2 given in (5.3). We have from (5.4) that C i > C * 1 > C * +ε, and by (5.7), By (2.9), (2.10) and the definition of C * in (2.4), we have Hence , so by Proposition 4.5, |T σ (w i )| = 0 and we get μ σ (w i ) = 0 < g i for every 2 ≤ i ≤ K . Claim 2. W is compact. We first prove the following lemma: . . , C n K ) with C n i ≥ C * +ε and |C n i | ≤ (1/3−β)/α, for i = 1, . . . , K , and suppose (C n 1 , C n 2 , . . . , C n K ) → (C 1 , C 2 , . . . , C K ) as n → ∞. Let σ n and σ be the corresponding refractors with D n (x) = min 1≤i≤K d(x, C n i , w i ), and D(x) = min 1≤i≤K d(x, C i , w i ). μ n and μ are the corresponding refractor measures to σ n and σ . Then Proof. Since d(x, C, w) is continuous in the variable C, we get that D n (x) → D(x) point-wise in . Then by Proposition 4.9, μ n → μ weakly. By the weak convergence μ(w i ) ≥ lim sup n→∞ μ n (w i ). We claim that μ(w i ) ≤ lim inf n→∞ μ n (w i ). Fix 1 ≤ i ≤ K , and let G be an open set containing w i such that G∩{w 1 , . . . , w K } = {w i }. If y ∈¯ , then y ∈ ∪ K j=1 T σ n (w j ) for all n and y ∈ ∪ K j=1 T σ (w j ). Hence T σ n (G\w i ) = ∪ K j=1 T σ n (w j ) ∩ T σ n (G\w i ), and so |T σ n (G\w i )| = 0 by Proposition 4.5. Similarly |T σ (G\w i )| = 0. Therefore μ n (G) = μ n (w i ) and μ(G) = μ(w i ) for all n and 1 ≤ i ≤ K . By the weak convergence μ(w i ) = μ(G) ≤ lim inf n→∞ μ n (G) = lim inf n→∞ μ n (w i ) for 1 ≤ i ≤ K which completes the proof of the lemma.
For each 2 ≤ i ≤ K , we definē Letσ be the refractor parametrized by the vectorF( and letμ be its corresponding refractor measure. We will show thatσ is the desired solution. Let N be the set where D is not differentiable. Fix i = , and y ∈ T σ (w i )\N . By Theorem 4.2(4), and Remark 4.4, the surface σ C i ,w i supports σ at y, i.e.
Therefore the proof of Theorem 5.1 is complete.

Existence for General Radon Measures η
In this section, we show existence of Brenier type solutions to the energy problem when the measure η is not necessarily discrete.
Theorem 5.5. Assume a compact target * is equipped with a Radon measure η satisfying (5.1). Then there exists a refractor σ from¯ to * , in the sense of Definition 4.1, such that for every Borel set E ⊂ * .

Aleksandrov Type Solutions
Let G ∈ L 1 ( * ) with G ≥ 0. The purpose of this section is to construct Aleksandrov type solutions to the energy problem described in Section 5. Given a set E ⊂ * measurable we shall first show that the set function given by is a Borel measure in * , where N σ is the normal mapping from Definition 4.1; and next compare this notion with the Brenier definition (4.1).

Legendre Type Transform
Suppose the upper surface σ of the lens we are seeking is parametrized by where at each x 0 ∈ there is a support surface σ C,w as in Definition 4.1, for some w ∈ * and σ C,w is parametrized by Hence solving C in (2.3) yields and therefore for all x ∈ with equality at x = x 0 . Therefore for each w ∈ * we introduce the Legendre type transform given by and so if σ C,w supports σ then C = F * (w).
Remark 6.1. We can translate these definitions in terms of the generated Jacobian equations introduced in [25]. We set G(x, w, z) for x ∈ , w ∈ * , z ∈ I , with I the interval for the admissible values of C in Definition 4.1, by where d is defined in (2.3). And also set We then have [25,Formula (1.17)]: Also [25,Formula (1.21)] translates to For each x 0 ∈ , there exist w 0 ∈ * and C 0 ∈ I , such that for all x ∈ with equality at x = x 0 , analogously as in [25,Formula (2.1)].
We then have Proof. Let us write Since 1 − |w | 2 is concave,¯ (x, w ) is convex as a function of w and therefore F * is convex as a function of w .
We then have the following lemma, similar to the Aleksandrov lemma for the subdifferential [18, Lemma 1.1.12]: has surface measure zero.
Proof. Recall σ is parametrized by F(x) = (x) + D(x) m(x). We shall prove that S ⊂ {w ∈ * : F * is not differentiable at w}.
If w ∈ S, then there exist x 1 = x 2 in and C 1 , C 2 such that d(x, C 1 , w) and d(x, C 2 , w) support D(x) at x = x 1 and x = x 2 respectively. Then C 1 = C 2 = F * (w) := C. Let us write w = (w , w 3 ) with w 3 > 0; w 3 = 1 − |w | 2 . We can think of F * as a function of w . Suppose that F * were differentiable at w . Since (6.5) We will prove in Remark 6.4 below that by choosing the Lipschitz constants in Theorem 2.5 sufficiently small, if |C| is sufficiently small, then (6.5) implies that x 1 = x 2 ; obtaining in this way a contradiction. Consequently, w cannot be a point of differentiability of F * . Remark 6.4. Suppose that w 3 ≥ > 0 for all w ∈ * . 3 We show that by choosing the Lipschitz constants in Theorem 2.5 sufficiently small, (6.5) implies that x 1 = x 2 . Suppose by contradiction that x 1 = x 2 and from (6.5) proceed as in the proof of Theorem 2.5 to obtain the inequality where A is the right hand side of (2.20), with α from (2.16) and β w from (2.17). Then Notice that in the definition of the normal mapping N σ , this requires possibly to take C in a smaller interval, however the size of this interval depends only on the initial configuration.
From arguments similar to the ones in Section 4.1 we obtain is a finite Borel measure in .

Comparison Between Brenier and Aleksandrov Type Solutions
Let I ∈ L 1 ( ) and G ∈ L 1 ( * ) be such that and let * be contained in the upper unit sphere. We showed in Section 5 the existence of lens (u, σ ) such that T σ ( * ) =¯ and Proof. Let σ be a Brenier solution. We claim that |T σ (N σ (K ))\K | = 0, for each compact set K . We first prove that T σ (N σ (K ))\K ⊂ T σ (N σ (K ))∩T σ (N σ (K c )). If x ∈ T σ (N σ (K ))\K , then there is y ∈ K such that x ∈ T σ (N σ (y)) and x / ∈ K . We always have x ∈ T σ (N σ (x)). Therefore x ∈ T σ (N σ (K )) ∩ T σ (N σ (K c )). Second, let A = N σ (K ) and B = N σ (K c ) and notice that by  (4). In fact, if x ∈ T σ (A) ∩ T σ (B), then there exist y 1 ∈ A and y 2 ∈ B such that x ∈ T σ (y 1 ) ∩ T σ (y 2 ) which implies that y 1 , y 2 ∈ N σ (x). So if x / ∈ D, then y 1 = y 2 ∈ A ∩ B and the inclusion follows. Therefore the claim is proved. Now write for all compact sets K ⊂ . Since the measures are regular we obtain by approximation (6.9) for all Borel subsets of . If remains to show that * = N σ (¯ ). Since σ is a Brenier solution T σ ( * ) =¯ and so * ⊂ N σ (T σ ( * )) = N σ (¯ ) ⊂ * . Remark 6.8. If G > 0 a.e., then each Aleksandrov solution is a Brenier solution. We have T σ (y) = ∅ for each y ∈ * , and it is enough to show that |N σ (T σ (K ))\K | = 0, for each compact set K . This follows regarding writing the argument in the first part of the proof of Theorem 6.7 now using Proposition 4.5 and then Lemma 6.3.

Differential Equation of the Energy Problem
where the vector m is given by (2.1) and d is a scalar function calculated so that the lens sandwiched by v and f refracts the source into the target * ⊆ S 2 and solves the energy problem in Section 5. To avoid confusion with the notation for the gradient, we let d denote the distance function D introduced in Definition 4.1, and also f denotes F in the same definition. The purpose of this section is to show that the distance function d satisfies the Monge-Ampère type equation (7.11). We assume that v has a normal ν(x) at each point satisfying e(x) · ν(x) > 0 and ν 3 (x) > 0. In Section 7.3 we analyze the collimated case and find a sufficient condition on the refractive indices of the media so that this assumption holds.
We begin with a lemma giving a formula for the normal vector to a general parametric surface. f 3 (x)) is any C 1 surface given parametrically, x = (x 1 , x 2 ), that is regular at x, i.e., f x 1 × f x 2 (x) = 0. If ν(x) = (ν 1 (x), ν 2 (x), ν 3 (x)) is the unit normal vector with ν 3 (x) > 0, then we have Proof. From the assumption on the normal Since |ν| = 1 and ν 3 > 0, we get We next calculate the normal to v in (7.1). Recall that v is regular at every point and the normal ν satisfies ν 3 > 0. Therefore from Lemma 7.1 and recalling ∂e ∂ x = ((e j ) x i ) i j , e (x) = (e 1 (x), e 2 (x)), then is invertible, then where * denotes the adjoint. Notice that, for the energy problem considered in Section 5, the field e is the gradient of a convex function, and since ρ > 0, in this case the corresponding matrix C is invertible. From (7.3), [24], and since H (a ⊗ b)H = (Ha) ⊗ (H t b), for any matrix H , we obtain Therefore On the other hand, from (7. using the notation before. From (7.4), (7.5), We calculate now the refracted vector m(x). Snell's law applied at the point v(x) and (7.6) yields with the notation t ρ(x), p Dρ(x), q e (x), and M ∂e ∂ x (x).

Calculation of the Refractor Map T for the Lens with Upper Surface f
The lens sandwiched by v and f , refracts incoming rays at the point f (x) into the unit direction T x, where T is a map from the source into the target * ⊆ S 2 . We are going to calculate an expression for T . By Snell's law at f (x), where ν 2 (x) is the unit normal at the striking point on the surface f (x); and λ 2 (x) = φ κ 2 (m(x) · ν 2 (x)).
We assume that f satisfies the conditions of Lemma 7.1, i.e., f is regular at x, and ν 3 2 (x) := ν 2 (x) · e 3 > 0. In this case ν 2 (x) = . We shall calculate an expression for A −1 . We have for i, j = 1, 2 , then we get, as in (7.3), that Let p 1 , p 2 , q 1 , q 2 be n-column vectors, and define the matrices clearly, P is n × 2 and Q is 2 × n. Then Now use the Woodbury matrix identity: if H, P, Q are n × n matrices, then We first write Notice that by (7.7) on the second derivatives of the components of e . Since e = (e 1 , e 2 ), Assuming the invertibility of the matrices involved, from Woodbury's identity we get We also have from the form of f , . Hence from (7.5), (7.7) and Lemma 7.1, we get the normal to f (x) in terms of the variables involved: Therefore, from Snell's law at f (x), we obtain

Derivation of the PDE for d
The energy densities at the source and the target * are given by positive integrable functions I and G respectively, such that conservation of energy condition (5.1) is satisfied (η = G dy). If E ⊆ , then T maps E into T (E). We require the energy to be conserved on each patch E , that is, Therefore, we obtain the following PDE: . Since |T x| = 1, then T x · (T x) x i = 0, i = 1, 2. Hence, assuming T 3 = 0, we get Thus, F i = F i (X, t, p), with t ∈ R and p = ( p 1 , p 2 ); i = 1, 2, 3. We now differentiate T i with respect to x j : Notice that F i j depends on ρ and its derivatives up to order three, it depends on e and its derivatives up order three, and it depends on d and Dd. If write F = (F 1 , F 2 ), and set are both independent of D 2 d. Therefore, from (7.10), (7.11) Notice that B depends on ρ and its derivatives up to order three, it depends on e and its derivatives up to order three, and it depends on d and Dd.

The Collimated Case
Assuming that the refractor σ constructed in Theorem 5.5 is smooth, i.e., d ∈ C 2 , we will show that in the collimated case the pde (7.11) satisfied by d has a simpler form and will give sufficient conditions for the invertibility of the matrices involved in the derivation of the pde. We assume that the field e(x) is vertical, i.e., e(x) = e 3 = (0, 0, 1), and the lower surface of the lens u is C 3 ( ) and is concave. The surface σ is parametrized by the vector f (x) = (x, u(x)) + d(x) m(x), with d ∈ C 2 ( ).
Replacing this in (7.13), we get From (3.17), we have (7.14) We prove that det ∂m ∂ x ≥ 0. Define For (7.14), we write Notice that the matrix Du ⊗ Du has eigenvalues 0 and |Du| 2 = − 1, then We next calculate the normal ν 2 to f towards medium n 3 . First notice that the existence of ν 2 follows from Theorem 4.2(3) and the assumption that d ∈ C 2 . To calculate the normal we use Lemma 7.1, for which we need to show that e 3 · ν 2 > 0. Lemma 7.2. Assume the medium containing the source is denser than or equal to the medium containing * , that is, n 1 ≥ n 3 , then e 3 · ν 2 (x) > 0.
To calculate the matrix A −1 , we write for every 1 ≤ i, j ≤ 2,

Summary of Notation
• If u is a scalar function, Du or ∇u denote its gradient and D 2 u denotes its Hessian. • For a field F(x) = (F 1 (x), F 2 (x)) with x = (x 1 , x 2 ), we write • n denotes an homogenous medium and at the same time its refractive index.
• Given a map F, L F denotes its Lipschitz constant.
• denotes the source and * the target. • S 2 denotes the unit sphere in R 3 .