# Fast 3D Analytical Affine Transformation for Polygon-Based Computer-Generated Holograms
## 4 Simulations and Optical Experiment
### Comparison with Previous Methods  
The _Pseudo Inverse Matrix Method_ by [PERSON] et al. [25; 26] sets up an affine transformation matrix that contains all the information on the transformation. However, they have defined the primitive triangle located at \(z_{\rm s}=0\), i.e., the plane of the source local coordinate system, leading to the concept of a pseudo inverse matrix to perform matrix inversion. The introduction of the pseudo inverse matrix has produced calculation errors and slowed down the calculation speed. [PERSON] et al. [29] have introduced a _Full Analytical 3D Affine Method_ to avoid the use of the pseudo inverse matrix. The method includes three core steps: rotation transformation for the tilted triangle until it is parallel to the hologram plane, 2D affine transform of the rotated triangle and finally the computation of the field distribution on the hologram by using the angular spectrum (AS) method for diffraction. [PERSON] et al. [8] also have proposed a Fast 3-D Affine Transformation (_F3 DAT_) method based on the 3D affine transformation by [PERSON] et al., to improve the computation efficiency. In the method, they have defined the primitive triangle located at \(z_{\rm s}\
eq 0\), allowing the affine matrix to be fully inverted. The result of the F3 DAT method provides a faster calculation time compared with that of the pseudo inverse matrix method and full analytical 3D affine method.  
In the present proposed fast 3D analytical affine transformation (_F3 DAT_) method, we have obtained the affine matrix directly and derived an analytical expression of the spectrum of the primitive triangle. The more meshes that are calculated the more time F3 DAAT will save. We have generated the holograms with a resolution of 1024 \(\times\) 1024, and the hardware includes Intel Core i7-11700 @ 4.8 GHz, 16G-byte RAM under the environment of MATLAB 2018b.  
The Stanford bunny consisting of 31,724 meshes (after back-face culling) takes 893 s for the calculation, and the calculation of \"Alex\" of 49,272 meshes takes about 1288 s (See Figure 9). Additionally, shown in Figure 9 where we have used \"Alex\", we can see that the computational efficiency of F3 DAAT has increased by almost two times compared with the previous methods. The calculation of the four methods is based on the same hardware condition and only CPU is used for the calculation. In one of the most recent studies, [PERSON] et al. [43] proposed a polygon-based method using LUTs (look-up tables) with principal component analysis to speed up the calculation of CGHs. However, the method in the process of pre-computing the affine matrix still needs to solve a pseudo inverse matrix, and our proposed method is more general and efficient for solving the mapping relationship between the two coordinate systems, the global and the affine coordinate systems.  
Figure 8: Numerical reconstruction of “Alex”: (**a**) 3D mesh of Alex and (**b**) numerical reconstruction. The geometric surface with the texture image in (**a**) is from a publicly accessible geometric archive from the 3D Scanning Laboratory in Stony Brook University [42].