Thibault Grillon

Camilo Valencia-Estrada

Jorge Garcia- Márquez
email: jorge.garcia.marquez@gmail.com

Alejandro Espinoza-Garcia

Bastien Béchadergue

Freeform geometrical optics II: From parametric representation to CAD/CAM

Freeform optical surfaces are of great importance because of two main properties. The first is their ability to enhance the image quality of image-forming optical systems while the second is their inherent reduction in the number of surfaces in image and non-image forming optical systems. However, the main characteristic of freeform surfaces is that they lack symmetry about any spatial axis. This attribute allows describing freeform surfaces with a mathematical parametric representation. Unfortunately, parametric representation can be extremely extended. On the other hand, when describing freeform surfaces, the explicit representation is commonly preferred because of its compactness and CAD-format exportable easiness. Parametrically represented freeform surfaces can be nonetheless exported to a CAD format with no significant departure of surface shape, as shown here. The vector method presented here guarantee that the surface's sampling density be proportional to the irradiance on the surface.

Introduction

The use of freeform surfaces is increasing every day in non-imaging and image forming applications. Non-imaging applications include head-lamps or street lights design [START_REF] Miñano | Free-form optics for illumination[END_REF][START_REF] Luo | Design of compact and smooth free-form optical system with uniform illuminance for LED source[END_REF] where light sources and targets have very asymmetric requirements. By using such a freeform design, Fresnel-lens-based photovoltaic concentrators [START_REF] Miñano | Free-form optics for Fresnel-lens-based photovoltaic concentrators[END_REF] as well as simultaneous concentrator and single-axis trackers [START_REF] Duerr | Tailored free-form optics with movement to integrate tracking in concentrating photovoltaics[END_REF] have been further improved. Imaging optics is a second optical design interesting domain for freeform optics. Non-symmetrically rotational surfaces of head-up displays [START_REF] Cheng | Design of a wide-angle, lightweight head-mounted display using free-form optics tiling[END_REF] and line-scan cameras [START_REF] Javaherian | Monodimensional enlargement of resolved field of view in line scan cameras by a single doubly symmetric mirror[END_REF] designs have experienced improvements in image quality and astronomic instruments have been studied or manufactured with a freeform approach [START_REF] Walker | Title advances in optical fabrication for astronomy[END_REF]. Indeed, this new way of designing optics offers several advantages as the number of surfaces in a complex optical system reduces. Thus, it is clear that the term non-symmetrical optical surface is a synonym for freeform surface; it is mainly applied in non-imaging optics but still finding several applications in imaging optics as time goes on. The advantages of freeform are weight and space reduction, image enhancement, and aberrations' reduction. A freeform surface mathematical representation has also been recently proposed [START_REF] Broemel | Freeform surface descriptions. Part I: Mathematical representations[END_REF]. Nevertheless, manufacture methods and processes evolve to obtain symmetrical and asymmetrical freeform surfaces [START_REF] Walker | Title advances in optical fabrication for astronomy[END_REF][START_REF] Schindler | Freeform Optics: current challenges for future serial production[END_REF][START_REF] Takaki | On-the-fly surface manufacturability constrains for freeform optical design enabled by orthogonal polynomials[END_REF]. On the other hand, freeform design methods for imaging optics have been studied and assessed a few years ago [START_REF] Agocs | Comparison of optical design methods of freefrom surfaces for imaging applications[END_REF]. Freeform optics has three main characteristics. First, there is the design of the surface that requires numerical methods. Second, the manufacturing machines must be capable to fabricate such a sophisticated surface. Third, testing methods must permit to validate the correspondence between the manufactured element and the designed one. The authors of this

The reviewed version of this paper is published in: Applied Optics, Vol. 58, Issue 34, pp. 9465-9472 (2019).

paper have recently released a new principle for freeform design [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF]. Advances in freeform manufacturing has also been reported [START_REF] Walker | Title advances in optical fabrication for astronomy[END_REF]. In this paper, the authors focus on the step that permits the designed optical element to be readable by a Computer Numerical Control (CNC) machine or in additive optics [START_REF] Marasco | Assessment of an approach to printed polymer lenses[END_REF][START_REF] Nair | 3D-printed optical active components[END_REF] manufacturing. This includes the surface's sampling density proportional to the irradiance on the surface. There are other methods well described in [START_REF] Remondino | From point cloud to surface the modeling and visualization problem[END_REF] that permits to convert a point cloud into a polygonal surface.

Definition of the problem

CNC manufacturing machines can be classified as digital direct control (automatic programming) or indirect control (computer aided manufacture CAD programming). Direct control approach permits the introduction of short formulation that is converted in machine instructions for surface generation. This kind of machines succeed easily as the surfaces have a revolution symmetry. On the other hand, a true freeform optics defined as "having no axis of symmetry on or off the part" [START_REF] Walker | Title advances in optical fabrication for astronomy[END_REF] is not described by a single equation. In fact, as it has been shown in [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF], a simple equation is used to calculate any surface that is solution to any lens design but its result can be extended to several terms. In [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF], Valencia and Garcia have shown how a freeform optical system consisting of two interfaces can be calculated. The theoretical background showing the method to design a whole optical system with an optimized image will be disclosed in the third part of this article's series called Freeform Geometrical Optics III: Optical System Design.

Let's consider a three-dimensional Cartesian space with coordinates (X, Y, Z) where the optical system is located. Let's suppose that the optical system consists in a single lens. In a Cartesian space the reference is set in an absolute coordinates' origin (0, 0, 0). Let's introduce an object O in the space whose most representative object point will be noted as P 0 , having a position vector p 0 = [x 0 , y 0 , z 0 ] as can be seen in Fig. 1. A reference optical path defining a light ray travelling from the point P 0 to its image point P 3 is created. Let's also consider an isotropic and homogeneous media whose refractive indexes {n 0 , n 1 , n 2 } are constants. Here, the optical path is represented with optical vectors. Let's also assume that a ray path starts at P 0 and finish at point P 1 , i.e. on the first lens surface S 1 . The surface S 1 is z 1 (x 1 , y 1 ) whose position vector is p 1 = [x 1 , y 1 , z 1 ]. According to Snell-Descartes' law, the ray at P 1 is refracted and arrives into a surface S 2 . On this second surface, the ray impinges an unknown point P 2 with an unknown position vector p 2 = [x 2 , y 2 , z 2 ]. The ray is refracted again and directs to the known image point P 3 with position vector p 3 = [x 3 , y 3 , z 3 ]. This arbitrary path is shown in Fig. 1. Position vectors of points P 0 to P 3 in this arbitrary path are

0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 [ , , ] [ , , ] [ , , ] [ , , ]
x y z

x y z

x y z

x y z

           p p p p . (1)
The vectors that describe the arbitrary path segments are calculated by taking the position differences,

0 1 0 1 2 1 2 3 2            a p p a p p a p p , ( 2
)
where its norms are 0 a   a a .

0 0 a   a a , 1 1 1 a   a a ,
For the reference optical path, we assume that there is a unique ray that departing from P 0 arrives to a known point O 1 on the first lens surface S 1 . The surface S 1 is represented as the parametrical vector position p 1 = [X 1 (x,y), Y 1 (x,y), Y 1 (x,y)] with known position vector o 1 = [x o1 , y o1 , z o1 ]. After being refracted in O 1 , the incident ray continues its trajectory to the second lens surface S 2 . The surface S 2 is also represented parametrically. The incident ray then arrives at a known point O 2 having a position vector o 2 = [x o2 , y o2 , z o2 ]. Again, the ray is refracted to its destination point P 3 . The reference vectors are

0 1 0 1 2 1 2 3 2            r o p r o o r p o . ( 3
)
It is worth mentioning that in this method the reference optical path does not need to lie on the optical axis or on the same plane. Their norms are 0 r   r r . To guarantee that this proposed model satisfies Snell-Descartes's law in the first interface, the unit normal vector of the first surface in O 1 should satisfy the vector Snell-Descartes' condition

0 0 r   r r , 1 1 1 r   r r ,
  1 1 1 1 1 0 0 0 / / O z n n     r r r r  . ( 4
)
Here  is the gradient operator evaluated at O 1 , τ is a constant and * is the norm of  . Considering a refractive case, this condition states that a gradient vector is linearly dependent of the difference of optical unit vectors. The sign in Eq. ( 4) depends on the object position. The validity of Eq. ( 4) apply when

  1 0, 0, 0 z  
. Otherwise, the anterior surface S 1 must be linearly transformed by using tilt, rotation or translation operators. This step can be automatically obtained for the first given surface (procedure shown in the annex). As tilt is now present in the system, a 0 and a 1 must be calculated again using Eq. ( 2) as well as their norms. Thus, by using the Fermat's principle we calculate the complete reference optical path just by adding the distance segments of the ray trajectories escalated by its respective refraction index:

0 0 1 1 2 2 n r n r n r K     .
This approach is the key foundation of the theory [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF] as it abolishes the optical axis convention in optical systems.

By using Snell-Descartes' vector law we can calculate the unit vector in the direction of the refracted ray once both the unit vector n 1 normal to the optical interface and the unit incident vector v 0 are known. Thus,

0 0 0 1 0 0 Sign( )    a v r r a a . ( 5
)
This formula permits one to switch unit vectors direction when the object point is either real or virtual. The unit vector n 1 normal to the first interface is defined as

1 1 1 1 1 x y x y x y             p p n p p . ( 6
)
By applying the vector form of Snell-Descartes' law using dot products in the arbitrary point

P 1     2 2 0 0 1 0 1 0 1 1 0 1 2 1 1 ( ) 1 1 ( ) n n n n                v v n v n n v n . (7)
This unit vector has the exact same direction as the ray propagating in the interior lens (internal ray). The internal unit vector a 1 is calculated as

  2 2 2 2 1 1 2 2 1 1 2 2 2 1 Sign ( ) n V ( ) V n n G n n       a r r v , (8)
with the recurrent variables

  0 1 0 2 0 0 1 2 1 1 2 2 2 1 3 1 1 2 3 1 3 1 Sign ( / )( ) ( / ) Sign , ( ) , ( ) ( ) .
A

( ) n n r a n n r ( )r V n n A G A                r r r r v p p p p p p (9)
Note that the sign does not switch and that this solution is not determined when the denominator is null. The sign of the square root depends on the position of the image point.

With the result in Eqs. [START_REF] Schindler | Freeform Optics: current challenges for future serial production[END_REF] and the below Eq. ( 10), the position vector describing the geometry of the second surface is found in such a way that the point image P 3 is aberrationsfree

    2 2 2 2 2 1 1 1 1 2 2 1 1 2 2 2 1 Sign ( ) n V ( ) V n n G n n          p p a p r r v . (10)
Equation ( 10) is valid for any object point P 0 no matter whether is real or virtual, it is also valid for any real or virtual image point P 3 as well as for any combination of conjugated points, with the condition [0, 0, 0] ( , ) Aperture

x y

x y x y

         p p , ( 11
)
that guarantee avoiding discontinuities and auto-intersections. It is valid in the case of lenticular anterior surfaces.

In [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF] a general rationalized solution of Eq. ( 10) can be used for a system with a back refractive interface:

2 2 1 1 1 1 2 2 2 1 2 1 ( ) n G V s V n n G                p p a p v . (12)
that avoid a division by zero in Eq. ( 10). The sign s 1 in the denominator depends on the image position, direction and magnification. A simplified solution of Eq. ( 12) can be used for a system with a back reflective freeform interface:

2 2 1 1 1 1 2 n G V           p p a p v . ( 13
)
The recurrent variables can be represented by

  0 0 2 0 0 1 2 1 2 2 2 1 3 1 1 2 3 1 3 1 ( / )( ) ( / ) , ( ) , ( ) ( ) .
A s n n r a n n r s r

V n n A G A              v p p p p p p (14)
The sign s 0 in A depends on the object position. The sign s 2 in A depends on the image position, direction and magnification. This solution is still valid even if auto-intersections [START_REF]Auto-intersection is a mathematical term describing a curve or surface that intersects with itself[END_REF] or loss of continuity of the solved surface appear, provided these auto-intersections or discontinuous sectors are out of the aperture's covering sector. This can be easily assessed by condition given in Eq. [START_REF] Agocs | Comparison of optical design methods of freefrom surfaces for imaging applications[END_REF] or by ray drawing or tracing. The set of previous equations still valid in the case the rays cross internally. Following the rule of signs for the different optric cases

2 1/ 2 0 0 1 0 1 0 1 Sign( ) (( ) ) / ( ) s r r r r r r      and 1 2 1 2 Sign( ) s s r r    2 1/ 2 1 2 1 2 (( ) ) / ( ) r r r r   
apply for mirrors and dielectric materials. These last representations are advantageously completely differentiable. However, considering metamaterials or metamirrors having negative refractive indexes, then the signs of the concerned surface will switch. Let's suppose a first interface where the Snell-Descartes' law for reflection is used;

then 1 0 0 1 0 1 ( 2( ) s    v v n v
n is used instead of Eq. ( 7). The sign s 0 is applied to correct the sense where the vector points. The same change also applies in the reversive formula.

CAD/CAM for freeform optics

We have found that the cloud of points contained on the resulting surface Eqs. [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF][START_REF] Marasco | Assessment of an approach to printed polymer lenses[END_REF] can be exported to a CAM unit in such a way that the surface can be manufactured, either by additive methods or by CNC methods. CAD/CAM software are capable to create a smooth surface from a cloud of points by using interpolation methods [START_REF] Steinkopf | Data handling and representation of freeform surfaces[END_REF]. The best interpolation methods allow to fit neighbouring surface sectors preserving their continuity and principal curvatures. For this reason, Non-Uniform Rational Basis Spline (NURBS) is an interpolation polynomial that has been proven highly efficient.

In figure 2 a prism lens exemplifies the application case of the theoretical background deduced in [START_REF] Valencia-Estrada | Freeform geometrical optics I: Principles[END_REF]. The first surface (anterior) is an off-axis revolution paraboloid while the posterior surface is a freeform surface whose main task consists in correcting all the spherical aberration introduced by the paraboloid. An absolute Cartesian coordinate's system has been placed at the center of the aperture diaphragm. Note that the optical axis disappears and is replaced by a reference optical path in three-dimensions. This reference path is represented here by three center-lines segments. As the lens is not symmetrical due to the prism, its edge thickness varies and the lateral surface is ruled. This lateral surface is exported as a cloud of points to CAD or CAD/CAM format.

Prism-lens in Fig. 2 The main issue of freeform optics manufacturing is the precision of the resulting surface, that is to say the error between the equation of the surface and its physical manufactured form. Most of CAD software do not allow using a parametric surface as an input while we saw it is the most common way to represent freeform optics. In figure 3 the lower-case variables (x, y, z) are the stop coordinates while the upper-case variables (X, Y, Z) are the coordinates for the points on the surface. Still, several ways exist to approximate the desired surface in CAD software. The main method is to use a cloud of points that enables to enter the topological skeleton of the shape. However, the number of points is a crucial factor regarding surface quality and those points must be carefully chosen, especially when it comes to optics. We present here an optimized method of 3D data acquisition that would lead to faster tooling and manufacturing process of freeform optics.

Sampling of the surface

The first step that appears to be a determinant factor in order to simulate light is the way to choose the points of the cloud in the aperture diaphragm (2D plane). If the aperture stop is not prescribed, we assume it is coupled with the surface itself. By solving a circle packing problem, a way to simulate a homogeneous beam of light passing through our system is shown.

The purpose is to determine the coordinates of each rays' impinging point on the surface, while having a homogeneous repartition on the diaphragm's aperture as shown in Fig. 4. By entering any number of rays, the program calculates the location of each point inside the aperture allowing to generate a homogeneous beam of rays. In figure 4 we use circle packing distribution to graphically display the irradiance loci map on the surface.

Estimating the error of the 3D-printed surface

The next step is to use this cloud efficiently in order to create an analytic function by fitting the cloud. In manufacturing process Maclaurin polynomials have proven to be faster, to provide better results and to be easier to implement when compared to Zernike's. The difference between the given analytic surface and the parametric surface can be adjusted with the degree of the Maclaurin expansion. We chose to use the Maclaurin polynomials up to the 10th degree for our experiment.

In order to estimate the error between the shape that will actually be 3D-printed and the fitting surface, we compare the latter to the cloud of points. To do so, we used Delaunay's triangulation [START_REF] Delaunay | Sur la sphère vide[END_REF] algorithm. This triangulation refer to Fig. 5ensures that any given sphere circumscribing any given triangle does not contain any other cloud's point. It is therefore possible to evaluate the maximal error within each triangle by searching the point of the surface where the unit normal of the triangle equals the unit gradient having both unit vectors the same direction. An example of this process can be seen in Fig. 6. Of course, this point may not exist directly above the triangle, this is why it is convenient to bring all the points back into the aperture diaphragm. Once the points of maximal error are found and brought back into the diaphragm's aperture, we decided to connect each point to the center of gravity of its triangle. In this way, we have an approximation of the point of maximal error above each triangle by intersecting the previous connection with the closest side of the corresponding triangle. The final step consists in projecting the latter points in the 3D surface and in calculating the distances between each error points and their corresponding triangle. This procedure permits to add sampling points on the real surface to reduce the error in the points having extreme errors.

The main advantage is that this 3D data acquisition method returns the list of the error on each triangle. The operator can enter a relatively big number of rays and have directly access to the average error and/or the highest error on the sample in order to fully control the prototyping and 3D printing processes. The algorithm used here has been included as supplementary material to this article. Hence, the initial number of rays and/or the repartition of the rays in the aperture diaphragm can be tuned until the precision needed for the application is reached. The optimized cloud of points can now be used in any CAD software while assuring a maximal error between the desired surface and the latter cloud. The defined point's cloud is exported from Mathematica® to the CAD software format by the simple command Export["cloud.stl", cloud];

The method allows finding a minimal number of points required to obtain a surface with the required quality (shown in Fig. 7). Nonetheless, we can only determine the ideal number of points through optimization processes. This number of points is given by the rays entering into the aperture. The criteria used here is that the sagittal mean error for all Delaunay triangles must be smaller than the maximum permitted sagittal error. However, what is the order of magnitude of these errors? For instance, headlamps do not exhibit errors at micrometer scale as reported in [START_REF] Kong | Characterization of freeform optics in automotive lighting systems using an Optical-Geometrical Feature Based Method[END_REF] where Optical-Geometrical Feature Based Method (OGFM) was used to establish the relationship between the geometrical features of freeform surfaces. Here the error distances are exaggerated in order to clear the figures.

The vectors representing rays entering into the aperture allow for irradiance prediction on the surface. From an optical testing point of view, these vectors can be used to distribute the holes of a Hartmann mask in a more representative manner. The Hartmann mask and derivate methods are used in ophthalmic corneal testing, wavefront sensing or in optical surface quality testing [START_REF] Platt | History and principles of Shack-Hartmann wavefront sensing[END_REF][START_REF] Mejia-Barbosa | Hartmann test of small F/# convex Optics communications[END_REF][START_REF] Malacara-Doblado | Hartmann, Hartmann-Shack, and other screen tests[END_REF]. Thus, intuitively, distribution of radiation or distribution of points to better reduce the error are part of the same solution either in radiation distribution measurement, wavefront sensing or local curvature determination.

A second advantage is that this method guarantees that the sampling points on a given surface section are concentrated in direct proportion to the optical radiation received on the same section of the surface. Figure 8 shows the flow-diagram used for obtaining a 3D CAD design once the parametric freeform surface is known. Flow diagram here below represents the code written in Mathematica® we show in Code File 1 (Ref. [START_REF] Grillon | Code: From parametric representation to CAD/CAM[END_REF]).

Figure 8. Flow-diagram of the method for obtaining a functional 3D CAD design whose error is known, from a parametric function. Note that the sampling density is proportional to the irradiance on the surface is an important characteristic of this method.

Tool correction method

The offset of a surface is defined as the set of regular points located at a constant perpendicular distance ρ t (also known as the offset radius). Let's suppose that a CNC machine with automatic programming is used to manufacture a surface designed with the method described here. In such a case, the freeform offset surface must be calculated to do the tool correction. When the sector p 2 is represented with parameters x and y, then its offset can be obtained with the vector equation

  2 2 2 2 2 2 2 2 2 2 , , , t t x y X (x, y) Y (x, y) Z (x, y) x y                p p p p n p p  (15)
where n 2 is a normal unit vector in the point 2 2 2 ( , , ) x (x, y) y (x, y) z (x, y) . The correct sign in Eq. ( 15) depends on the machining direction. Loss of continuity or auto-intersections are avoided with the condition [0,0,0] , Aperture

x y ( x y ) x y

        p p , (16)
valid in the case of non-lenticular anterior surfaces.

CAD Processing

This method allows the surfaces to preserve their conception initial coordinate's origin once they are converted to the CAD file. This process shown in Fig. 9 facilitates the assembly of the different freeform surfaces conforming a monolithic optical system. We have imported a cloud of points from Mathematica® into SolidWorks®. From SolidWorks it has been possible to convert them in a discrete set of geometric cells (i.e. the mesh) by controlling the cloud of points' distribution. The original coordinate of each point in the cloud must be preserved. Any anomalous point is removed, then it follows an edge smothering process that requires the original cloud to contain sampling point at the surface aperture's edge. After completion of the, the surface and the solid model that allow for assessing the surface details are created.

Conclusions

Unlike direct manufacturing that commonly uses explicit mathematical surface's prescription, indirect manufacturing is more adapted to freeform surfaces. Completely freeform surfaces are easily represented parametrically but their approximated explicit equations, even if preferred by the optical community, can be mathematically extensive. As a consequence, a better idea is to obtain a big cloud of points that described the surface and fit it with a high correlation coefficient. In this model, these points represent the impinging rays on the surface. We have shown that the cloud of points describing the surface can be exported to any CAD/CAM software. We have also shown that it is simpler to use a cloud of points from a parametric representation than to use extensive parametric or implicit representations as the CAD/CAM software is capable to fit the points. In addition to this, the process of introducing the mathematical representation is usually complicated and subject to typos errors. We have established the minimum quantity of points that ensure an insignificant format conversion error. We have also shown how to distribute these points to minimize manufacture errors.

and 2 2 2

 2

  and

Figure 1 .

 1 Figure 1. The optical path tracing describing both reference and arbitrary optical paths related to an arbitrary origin of coordinates. All paths are vectored.

  has conjugate planes, real object and real image. It was designed with the following parameters: a) for the optical reference path p 0 = [2, 0, 69.9715], o 1 = [0, 0, 0], o 2 = [2, 0, 37.9473] and p 3 = (2, 5, 60.663); b) the aperture stop corresponds to the parametric domain (x  15) 2 + (y  15) 2  196 in z = 4; c) the first prescribed surface is a revolution paraboloid (x 2 + y 2 ) / ( 4f ) with a geometrical focal distance f =25 mm and a maximum diameter equal to 28 mm; d) to satisfy Snell-Descartes' law in O 1 the surface was rotated 9.56337 degrees. However, following rotation of axes, the arbitrary position vector become p 1 = [0.000565376 x (x + 1765.89)  0.00444712 y + 0.000565376 y 2 , 0.00156222 (x 2.84666) x + 0.987712 y + 0.00156222 y 2 , 0.00986102 (x 5.73344) x  0.156222 y + 0.00986102 y 2 ]. We have assumed a refractive index n = 1.5. A circle packing algorithm was used to distribute 20 rays in the aperture.

Figure 2 .

 2 Figure 2. Freeform prism-lens. The prism lens shown here has an object O and image I.

Figure 3 .

 3 Figure 3. Representation of the parametric surface in the standard Cartesian coordinates.

  x,y,z), Y(x,y,z), Z(x,y,z))

Figure 4 .

 4 Figure 4. Distribution of points on the aperture stop -diaphragm-using a circle packing algorithm. The points in the edge of the diaphragm guarantee an accurate reconstruction of the parametric freeform surface's edge. The diaphragm and the surface cloud of points are shown for a) 50, b) 200, and c) 1000 sampling points. The transformation represented here is injective.

Figure 5 .

 5 Figure 5. Delaunay triangulation of the sampled points conforming the cloud.

Figure 6 .

 6 Figure 6. Examples where a point of the curve's unit gradient does not match (a) and matches (b) the unit normal of the triangle above this very same triangle.

Figure 7 .

 7 Figure 7. Surface after Delaunay triangulation with point of maximal error for each triangle.Here the error distances are exaggerated in order to clear the figures.

Figure 9 .

 9 Figure 9. Required steps to create a freeform surface using a CAD stitching.

Funding

This project has received funding from the European Union's Horizon 2020 research and innovation program under grant agreement No. 761329.

Disclosures

The authors declare no conflicts of interest.

Annex

Rodrigues rotation (tilt) formula to satisfy Snell-Descartes' law Tilting anterior surface S 1 requires a linear transformation be carried out. Thus, Snell-Descartes' law must be satisfied in the reference point O 1 . Consider that the surface to be tilted follows the reference optical path and that the Rodrigues' rotation formula is used to convert the position vector p 1 into a new position vector having the correct orientation. We present here a tilting recursive process for the refractive case:

where n s is a normal unit vector that satisfies Snell-Descartes' law in the point O 1 , n r is a vector that does not satisfies Snell-Descartes' law in the point O 1 , represented as a cross product of partial derivatives of vector p 1 and presented again divided by its norm. Their dot and cross product cos and n cross respectively, are required to obtain the tilted surface in a faster way. Note that the angle  of these two normal vectors is not needed to obtain the tilted surface. The new position vector p 1 is obtained.

After tilting, the arbitrary path vector is then updated