J. Eur. Opt. Society-Rapid Publ. 22, 31( 2026) 313
In addition to the direct block-wise transformation method, this work also presents a block-wise recursive method for calculating Zernike basis functions, which is described in equation( 12). These two methods are not only mathematically equivalent but also practically interchangeable. The block-wise recursion can start either from any order n once the previous basis functions of order n � 1andn � 2are known, or from the 0th order.
3.2 Surface / wavefront reconstruction
Given a set of samples of a surface or wavefront, which can be either a set of 3D coordinate values, {( x i, y i, z i)| i = 0,1, 2, } or a set of normal vectors {( x i, y i,( z x = oz / ox, z y = oz / oy) i)| i = 0,1,2, }, a polynomial description of such a surface or wavefront can be reconstructed using a Least-Squares optimization:
C fkg ¼ arg min
C fkg
X
k w fig
� � 2 Z fig � X figfkg C fkg �! C fkg
� � ¼ X T �1 � � w fig I X X T w fig I Z fig; ð17Þ
where C { k } denotes a set of coefficients, X { i } { k } basis function values at( x, y) with { i } rows for individual samples and { k } columns for individual basis functions, which can be either homogeneous xy basis functions, or Zernike basis functions. Z { i } denotes the set of measurement values of surface height z { i } or of surface normal vectors( z x, z y) { i }, while w { i } assigns weights to the individual samples: if w { i } 1, all samples are equally important for the reconstruction.
3.3. Polynomial coefficients
A surface / wavefront can be expressed based on Zernike polynomials with basis functions ½z m n
Š or based on homogenous xy polynomials with basis functions [ x n�i y i ], as
! zðx; y = q; uÞ ¼ XN X þn d m n z m n ðq; u = x; yÞ n¼0
XN n¼0
m¼�n; step2
X n
i¼0 a ni x n�i y i!: ð18Þ
According to equation( 17), C fkg ¼½d m n
Š holds for the coefficient vector of Zernike polynomials, and C { k } =[ a ni ] the coefficient vector for homogeneous xy polynomials. This leads to another group of transformations
d m ðnþ1Þðnþ2Þ n
¼ T �1 ½ a
2 1 ni
Šðnþ1Þðnþ2Þ
2 1 ð19Þ
½ a ni Šðnþ1Þðnþ2Þ ¼ T
2 1 dm n ðnþ1Þðnþ2Þ ð20Þ
2 1
which allow us to freely transform not only the basis functions but also the corresponding coefficients between Zernike polynomials and homogeneous xy polynomials describing a surface or a wavefront.
3.4 Derivatives
Derivative analysis plays an important role in optical applications: first-order derivatives for vertex detection and ray tracing, second-order derivatives for surface curvature analysis, third-order derivatives for local apex detection( with local maximum / minimum curvature) and surface tilt evaluation, etc. Using the two sparse transformation matrices mentioned above, derivative calculations, as well as the evaluation of the optical properties of a surface / wavefront, can be flexibly performed based on its polynomial description, either Zernike or homogeneous xy polynomials. In particular, we have the following equation for homogeneous xy polynomials:
8 ><
>:
n i þ 1; i � 1 0 �!
@ zðx; y = q; uÞ
¼ PN P n
@ x n¼0 i¼0
@ zðx; y = q; uÞ
¼ PN P n
@ y n¼0 i¼0
8
><
>:
@ z @ x
@ z @ y a ni ðn � iÞx n�i�1 y i
a ni ix n�i y i�1
¼ PN�1 P n n¼0 i¼0
¼ PN�1 P n n¼0 i¼0
a ðnþ1Þi ðn � i þ 1Þx n�i y i; a ðnþ1Þðiþ1Þ ði þ 1Þx n�i y i
ð21Þ
from which two first-order derivatives of a surface / wavefront described by homogeneous xy polynomials with order 0 n N correspond to two surfaces described by two homogeneous xy polynomials with order 0 n N � 1, according to the following equation 8
><
>:
@ zðx; y = q; uÞ @ x
@ zðx; y = q; uÞ @ y
¼ PN�1 P n n¼0 i¼0
¼ PN�1 P n n¼0 i¼0 a ðxÞ ni x n�i y i
a ðyÞ ni x n�i y i
; ð22Þ
in which we newly introduce two sets of polynomial coefficients have: a ðxÞ ni ¼ a ðnþ1Þi ðn � i þ 1Þ for @ z =@ x and a ðyÞ ni ¼ a ðnþ1Þðiþ1Þ ði þ 1Þ for oz / oy, which can be calculated directly from the coefficients of the original surface. Furthermore, second-order derivatives can be calculated from first-order derivatives, third-order derivatives from second-order derivatives, etc. Using equation( 19), thesealso apply to Zernike polynomials in polar and Cartesian coordinate systems.
4 Discussion
The two block-wise recurrences discovered in Section 2 can be interpreted as a two-dimensional extension of the chronically observed three-term-recurrence-relation( TTRR) in orthogonal polynomials. The Gram – Schmidt orthogonalization process, which naturally introduces the TTRR( i. e., P n ðxÞ ¼ðA n x þ B n ÞP n�1 x þ C n P n�2 ðxÞ), is widely used to construct orthogonal bases from homogeneous xy-polynomials. In particular, for Zernike polynomials,