ABSTRACT (original article): We present a closed-form equation to design a generator lens. Using our procedure, the lens shape can be obtained to focus on a single image point given an arbitrary input wavefront. Several scenarios have been tested, and the results are as expected. CITATION (original article): Rafael Guillermo González-Acuña “Method to design a wavefront generator singlet,” Optical Engineering 63(10), 105101 (4 October 2024). https://doi.org/10.1117/1.OE.63.10.105101
Freeform generator lenses are a lens or a set of lenses often used generated desired freeform waterfronts. The idea of these lenses is to generate a desired wavefront for different applications. Freeform generator lenses are typically designed with numerical approaches and optimisation techniques. Some analytical method can be used to design freeform generator lenses, however, those methods are generally restrained only considering third order aberration approximation. With the advance of CNC manufacturing processes that provide fraction of waves precision to build aspherical and freeform surface shapes, the fabrication of such lens could be explored. Particularly, generator lenses can be used as an alternative to other methods in optical shop testing to test complex optical system by generating the proper wavefront or to do null lens testing.
In this notebook we are going to obtain the general equation describing the sag of the freeform lens following the Fermat principle. Section \ref{sec:math_model} presents the mathematical process to obtain the freeform generator lens design equation. The details to transform an arbitrary wavefront generated by a given mirror and design the freeform lens to transform it into a spherical wavefront will be presented. This will be done using no paraxial approximation nor iterations, like in our previous works. Using this new formalism, not only the number of lenses is reduce to one, but also the first surface of the lens is given by the user. This enables the possibility that the first surface can be flat, the complexity of testing the freeform generator lens is decreased since only the second surface needs to be tested. Various design with the first surface being flat is presented in section \ref{sec:applications} before concluding.
An illustration of the freeform generator lens is shown in Figure 1. To design a freeform generator lens, the light of the input wavefront needs to converge into a single image point.
In order to fulfil this requirement, we need to express each surface of the lens in terms of the ray paths, as all the rays should have the same optical path length (OPL).
In order to fulfil this requirement, we need to express each surface of the lens in terms of the ray paths, as all the rays should have the same optical path length (OPL).
We express the first surface of the freeform generator lens in terms of the input rays . The wavefront coming from the mirror $w$ starts at the mirror. Thus its direction will be along the normal vectors of the mirror. Therefore, the cosine directors of the rays of $w$ are given by the cosine directors of the normal vector of the mirror, such as
(*Thewavefrontisw*)w[x_,y_]:=+;(*Itsnumericderivativeis*)e=10^(-5);wdx[x_,y_]:=(w[x+e,y]-w[x,y])/e;wdy[x_,y_]:=(w[x,y+e]-w[x,y])/e;
2
(x)
2
(y)
50
cosine directors are wx, wy, wz
wx[x_,y_]:=++1;wy[x_,y_]:=++1;wz[x_,y_]:=++1;ϑa[x_,y_]:=4xa[x_,y_]:=x+ϑa[x,y]wx[x,y]ya[x_,y_]:=y+ϑa[x,y]wy[x,y]za[x_,y_]:=w[x,y]+ϑa[x,y]wz[x,y];dxxa[x_,y_]:=(xa[x+e,y]-xa[x,y])/e;dyxa[x_,y_]:=(xa[x,y+e]-xa[x,y])/e;dxya[x_,y_]:=(ya[x+e,y]-ya[x,y])/e;dyya[x_,y_]:=(ya[x,y+e]-ya[x,y])/e;dxza[x_,y_]:=(za[x+e,y]-za[x,y])/e;dyza[x_,y_]:=(za[x,y+e]-za[x,y])/e;
-wdx[x,y]
2
wdx[x,y]
2
wdy[x,y]
-wdy[x,y]
2
wdx[x,y]
2
wdy[x,y]
1
2
wdx[x,y]
2
wdy[x,y]
The normal vectors of the first surface
Φx[x_,y_]:=(-dxza[x,y]dyya[x,y]+dxya[x,y]dyza[x,y])(++);Φy[x_,y_]:=(dxza[x,y]dyxa[x,y]-dxxa[x,y]dyza[x,y])(++);Φz[x_,y_]:=(-dxya[x,y]dyxa[x,y]+dxxa[x,y]dyya[x,y])(++);
2
(-dxya[x,y]dyxa[x,y]+dxxa[x,y]dyya[x,y])
2
(dxza[x,y]dyxa[x,y]-dxxa[x,y]dyza[x,y])
2
(-dxza[x,y]dyya[x,y]+dxya[x,y]dyza[x,y])
2
(-dxya[x,y]dyxa[x,y]+dxxa[x,y]dyya[x,y])
2
(dxza[x,y]dyxa[x,y]-dxxa[x,y]dyza[x,y])
2
(-dxza[x,y]dyya[x,y]+dxya[x,y]dyza[x,y])
2
(-dxya[x,y]dyxa[x,y]+dxxa[x,y]dyya[x,y])
2
(dxza[x,y]dyxa[x,y]-dxxa[x,y]dyza[x,y])
2
(-dxza[x,y]dyya[x,y]+dxya[x,y]dyza[x,y])
The cosine directors of the refracted rays at the first surface
ϱx[x_,y_]:=-no(wy[x,y]Φx[x,y]Φy[x,y]+wz[x,y]Φx[x,y]Φz[x,y]-wx[x,y](+))+Φx[x,y]1-(++);ϱy[x_,y_]:=no(-Φy[x,y](wx[x,y]Φx[x,y]+wz[x,y]Φz[x,y])+wy[x,y](+))+Φy[x,y]1-(++);ϱz[x_,y_]:=no(wz[x,y](+)-(wx[x,y]Φx[x,y]+wy[x,y]Φy[x,y])Φz[x,y])+Φz[x,y]1-(++);ζ[x_,y_]:=w[x,y]-zi-zo;
1
ni
2
Φy[x,y]
2
Φz[x,y]
1
2
ni
2
no
2
(wy[x,y]Φx[x,y]-wx[x,y]Φy[x,y])
2
(wz[x,y]Φx[x,y]-wx[x,y]Φz[x,y])
2
(wz[x,y]Φy[x,y]-wy[x,y]Φz[x,y])
1
ni
2
Φx[x,y]
2
Φz[x,y]
1
2
ni
2
no
2
(wy[x,y]Φx[x,y]-wx[x,y]Φy[x,y])
2
(wz[x,y]Φx[x,y]-wx[x,y]Φz[x,y])
2
(wz[x,y]Φy[x,y]-wy[x,y]Φz[x,y])
1
ni
2
Φx[x,y]
2
Φy[x,y]
1
2
ni
2
no
2
(wy[x,y]Φx[x,y]-wx[x,y]Φy[x,y])
2
(wz[x,y]Φx[x,y]-wx[x,y]Φz[x,y])
2
(wz[x,y]Φy[x,y]-wy[x,y]Φz[x,y])
Then, the second surface is expressed in terms of the rays refracted by the first surface.
FullSimplify[Solve[((wx[x,y]ϑa[x,y]+x)^2+(wy[x,y]ϑa[x,y]+y)^2)ϡw[x,y]+ϑa[x,y]wz[x,y],ϑa[x,y]]]
ϑa[x,y]-2ϡ(xwx[x,y]+ywy[x,y])+wz[x,y]-(-4ϡ((+)ϡ-w[x,y])(+)+)(2ϡ(+)),ϑa[x,y]-2ϡ(xwx[x,y]+ywy[x,y])+wz[x,y]+(-4ϡ((+)ϡ-w[x,y])(+)+)(2ϡ(+))
2
x
2
y
2
wx[x,y]
2
wy[x,y]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x,y]ϱz[x,y])
2
ni
2
ni
2
ni
1
2(-)
2
n
2
ni
2
ni
2
ni
2
ni
2
n
2
ni
2
f[x,y]
2
ni
2
xa[x,y]
2
ni
2
ya[x,y]
2
ni
2
ζ[x,y]
2
(-2nf[x,y]-2xa[x,y]ϱx[x,y]-2ya[x,y]ϱy[x,y]-2ζ[x,y]ϱz[x,y])
2
ni
2
ni
2
ni
The above’s equations are the most relevant equations of this manuscript. Given the input wavefront $w$ and the first surface, the second surface is defined such that the lens generates a null freeform lens.
Notice that we use no approximation to get them. These equations are analytical solutions to design freeform generator lenses given a wavefront and a first surface. In other words, above’s equations are natural extension of the Fermat principle. No paraxial approximation, no iteration, no optimisation are needed. As long as the Fermat principle remains the fundamental axiom, equations of the type described above are theorems that have been derived from it. Moreover, one should note that the general design equation have one unique solution for a given set of input values. Therefore, it guarantees that all the rays have the same optical path, thus the input wavefront w(x,y) can also be consider as an the output wavefront given a point object located in the image point.
Notice that we use no approximation to get them. These equations are analytical solutions to design freeform generator lenses given a wavefront and a first surface. In other words, above’s equations are natural extension of the Fermat principle. No paraxial approximation, no iteration, no optimisation are needed. As long as the Fermat principle remains the fundamental axiom, equations of the type described above are theorems that have been derived from it. Moreover, one should note that the general design equation have one unique solution for a given set of input values. Therefore, it guarantees that all the rays have the same optical path, thus the input wavefront w(x,y) can also be consider as an the output wavefront given a point object located in the image point.
Example
Example
We present two illustrative examples of freeform generator lenses using the general design equation. We set the first surface of the lens to be flat (i.e. $z_a=0$). This choice is based on the fact that the manufacture of such plano-freeform lenses would be eased with CNC manufacturing processes. Then, using the presented equations for a given wavefront, the second surface is computed.
The input wavefront for the first example is w(x,y)=(1/60)(x^2+y^2), the rest of the input values can be seen following command.
ClearAll["Global`*"](*Thewavefrontisw*)
w[x_,y_]:=++zo;(*Itsnumericderivativeis*)e=10^(-5);wdx[x_,y_]:=(w[x+e,y]-w[x,y])/e;wdy[x_,y_]:=(w[x,y+e]-w[x,y])/e;(*cosinedirectorsarewx,wy,wz*)wx[x_,y_]:=++1;wy[x_,y_]:=++1;wz[x_,y_]:=++1;ϑa[x_,y_]:=-w[x,y]/wz[x,y]
2
(x)
2
(y)
60
-wdx[x,y]
2
wdx[x,y]
2
wdy[x,y]
-wdy[x,y]
2
wdx[x,y]
2
wdy[x,y]
1
2
wdx[x,y]
2
wdy[x,y]
The first surfacs is a flat but expressed in terms of eays of the wavefront it is
Second surface
Input values
Plots
Plots
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Method to design a wavefront generator singlet
by Rafael G. González-Acuña
Wolfram Community, STAFF PICKS, May 8, 2025
https://community.wolfram.com/groups/-/m/t/3457271
by Rafael G. González-Acuña
Wolfram Community, STAFF PICKS, May 8, 2025
https://community.wolfram.com/groups/-/m/t/3457271