314
J. Eur. Opt. Society-Rapid Publ. 22, 31( 2026)
two coordinate-value-independent processes: the orthogonalization process and the coordinate system transformation, respectively lead to these two cases of block-wise recurrence.
Building upon the block-wise recursions revealed above and the recursive nature of Pascal’ s triangle, this work presents both a block-wise direct transformation method( equation( 10)) and a block-wise recursive computation method( equation( 12)) for Zernike basis functions. Mathematically, these two methods are equivalent. In contrast to the available Zernike computation techniques: the component-wise computation of Zernike polynomials using a list of functions in the Cartesian coordinate system [ 8 ], the brute-force conversion of Zernike polynomials to Cartesian polynomials( homogeneous xy-polynomials) [ 9 ], and the component-wise recursive computation method [ 6, 7 ], this work contributes to a block-wise understanding of Zernike polynomials.
Our special contributions include: 1. In addition to avoiding cos / sin calculations( as in [ 8 ]), we also avoid all calculations of repetitive factorials, divisions of large integers, and matrix inversions; 2. In contrast to the brute-force implementation of bidirectional conversion up to order 5( with partial extension up to order 8) between Zernike basis functions and homogeneous xy basis functions [ 9 ], we separate the calculations irrelevant to the coordinate values from those relevant to the coordinate values, and offer either the recursive computation of the coordinate-irrelevant factors, or the recursive computation of the complete Zernike basis functions. Such recursions are based on block-wise recurrences for coordinate-irrelevant calculations and their close relationship to a Pascal triangle. We exploit these new insights for Zernike-related computations, thereby eliminating the tediousness / complexity of highorder Zernike components and thus achieving greater flexibility for optical applications without restriction of order. Furthermore, this work discovers a direct, but previously unnoticed, block-wise connection between Zernike polynomials in Cartesian form and their recursive computations( equations( 10)–( 12)).
4.1 Computational performance: a preliminary evaluation
The direct block-wise transformation method described in equation( 10) and equation( 14) for calculating Zernike basis functions can be interpreted as an upgraded version of the xy-form-LUT method mentioned in Section 1. Instead of explicitly defining a LUT of independent functions or equations for individual Zernike components in their xypolynomial form, one or four recursively extendable transformation matrixes and a recursively extendable list of basis functions of Cartesian xy-polynomials( e. g., based on equation( 16)) are combined by matrix multiplications, resulting in the required Zernike basis functions. Theoretically, this upgrade does not change the essential computational complexity for a single Zernike component, which can be measured as the number of two arithmetic CPU instructions: multiplication and addition. For a required Zernike component with polynomial order n = 2j or n = 2j + 1 and azimuth order m =± 2l or m =±( 2l + 1), the numbers of essential arithmetic instructions are listed in Table 3, where the construction of T is not counted because it is coordinate-independent and can therefore be calculated in advance as a factor LUT for the Zernike calculation. In short, this work improves the traditional Zernike computation scheme based on the xy-polynomial form with two significant advantages: 1) It is no longer necessary to repeatedly calculate the xy-basis functions in each calculation function / equation of individual Zernike components in Cartesian form; 2) There is no longer order restriction caused by the limited list of Zernike components with their Cartesian form given in the literature.
It is noticeable that the computational complexity of this direct transformation method is not the same for individual Zernike components with the same polynomial order n, but depends on their azimuth order ± m, where z �n n requires minimum and z 0 n( or z1 n
) maximum calculations. In Figure 1a, two solid curves represent the minimum and maximum number of all multiplications, including the computation of the xy basis functions and the matrix multiplication ½XŠT( equation( 14)), for polynomial orders from 0 to 99. These two curves are compared with two additional dashed-dotted curves representing the corresponding performance measurements of the Zernike computation method based on component-wise recurrence, where the application scenario is set to compute a single Zernike component with given n and m for a coordinate position( x, y). The computational performance of component-wise recursion is achieved by manually programming the formulas( 32)–( 38) in [ 7 ]( Andersen, 2018), extending the threeterm-recurrence to a five-term-recurrence for full Zernike polynomials. Similarly, Figure 1b shows the comparison of computational complexity based on the number of addition operations. These two comparisons demonstrate that the Zernike computation method based on direct block-wise transformation has high computational performance.
The above performance evaluation makes sense in theory, but calculating a single component is not so common in practice. In contrast, preparing all components from order 0 to order n is necessary for surface / wavefront reconstruction and analysis. The implementation of the corresponding methods significantly influences the final performance assessment. Two further aspects must be considered: 1) the reuse of lower-order results; 2) the use of modern computer hardware such as SIMD( Single-Instruction-Multiple-Data) technique and Cache-hierarchy. Blockwise recursion offers a direct route to modern, hardwarecompatible implementations. Another computational performance comparison was performed between the component-wise recursive calculation method mentioned above and the block-wise recursive calculation method. Figure 2 shows the advantage of the latter method. Both methods were implemented and tested in the same MATLAB environment( DELL laptop, Intel( R) Core( TM) i5-1245U, 16GB RAM, 128MB Intel( R) UHD Graphics, Windows- 11 OS, MATLAB-R2020b 64-bit) without any special coding optimization. Although this is only a preliminary assessment, the block-wise recursive method shows better computational performance, scaling linearly with the