# Fast 3D Analytical Affine Transformation for Polygon-Based Computer-Generated Holograms
## 4 Simulations and Optical Experiment  
### Numerical Reconstruction  
Based on the 3D mesh in Figure 1, the Stanford bunny consists of 59,996 polygons, and we have reconstructed the bunny using our proposed method. The actual size of the bunny was 3.11 \(\times\) 3.08 \(\times\) 2.41 mm\({}^{3}\). We have increased its size to 6.56 \(\times\) 6.49 \(\times\) 5.08 mm\({}^{3}\) before the generation of the hologram. In order to improve the computational efficiency and image quality, we have implemented back-face culling by judging normal. The normal vector of a hologram is \(\overrightarrow{n_{h}}\), and \(\overrightarrow{n_{u}}\) is the normal vector of a tilted triangle. If \(\overrightarrow{n_{h}}\cdot\overrightarrow{n_{h}}\geq 0\), the tilted triangle will be calculated, and tilted triangles that do not meet the condition will be discarded.  
After back-face culling, the bunny only contains 31,724 polygons. However, in Section 3 the result of Equation (12) is based on the assumption that the amplitude distribution of a triangle is a unit constant and the reconstructed results will lack realism. As shown in Figure 6, in order to reproduce the details of the 3D object, we assign the surface function of the tilted triangle \(I(x,y)\) as follows:  
\[I(x,y)=\Big{[}\overrightarrow{n_{ux}},\overrightarrow{n_{uy}},\overrightarrow {n_{uz}}\Big{]}\cdot[cos\alpha,cos\beta,cos\gamma]^{t}+bias=constant, \tag{17}\]  
where \(\overrightarrow{n_{ux}},\overrightarrow{n_{uy}},\overrightarrow{n_{uz}}\) are the components of unit normal vector \(\overrightarrow{n_{u}}\) of the xyz-axis in the global coordinate system, and \(bias\) represents ambient reflected light. \(cos\alpha\), \(cos\beta\) and \(cos\gamma\) are the direction cosine values of illumination directions. In our case, \(bias=0.2,\alpha=60^{\circ}\), \(\beta=60^{\circ}\), \(\gamma=5^{\circ}\).  
The surface function usually refers to the strength information, and the amplitude is expressed as \(\sqrt{I(x,y)}\). The surface function of the titled triangle \(I(x,y)\) is a constant for each tilted triangle according to Equation (17), so that we can let \(I=I(x,y)\) (\(I\) is a constant here) and by using the property of Fourier transform: \(\sqrt{I}.f(x,y)=\mathcal{F}^{-1}\Big{\{}\sqrt{I}.F(u,v)\Big{\}}\), the spectrum in the hologram of a tilted triangle with added flat shading and the elimination of the \"offset\" is based on Equation (12), together with Equation (15), we have:  
\[F_{HOLO}(u,v)=\sqrt{I}\cdot\int\cdot\mathrm{e}^{-j2\pi(ux_{1}+vy_{1}+wz_{1})} \cdot F_{\Delta}(u,v_{t}\prime). \tag{18}\]Figure 7 shows the numerical reconstructions of the bunny based on our proposed F3 DAAT method. Figure 7a is the result of calculating Equation (12), and we can see that because the amplitude of each mesh is the same constant the reconstruction result is a lack of realism. Additionally, the bunny has self-occlusion, so that back-face culling by judging normal will have some errors for some polygons. Due to the wrong judgment, visible polygons and invisible polygons are superimposed together and the reconstructed part of the image is shown in the red box on Figure 7a. Figure 7b,c are the reconstruction results based on Equation (18), and from these two reconstructed images we can clearly see the details of various parts of the bunny. Figure 7b focuses on the bunny's leg, shown in the yellow box, and Figure 7c focuses on the bunny's ear, shown in the yellow box.  
We have also scanned a human face called \"[PERSON]\" with a 3D camera, and the 3D mesh of \"[PERSON]\" is shown in Figure 8a, which consists of 49,272 meshes. In this case, there is no need to use back-face culling, because the data is the result from actual image scanning. We have calculated the CGH of \"[PERSON]\", and its holographic reconstructed image is shown in Figure 8b.  
Figure 6: Principle of flat shading.  
Figure 7: Numerical reconstruction of the bunny. (**a**) Focus on leg without shading, (**b**) focus on leg with shading, (**c**) focus on ear with shading.