# Viewport Rendering Algorithm with a Curved Surface for a Wide FOV in 360\({}^{\circ}\) Images
## 4 Algorithm Proposed to Render the Viewport  
### Curved UV Surface  
By analyzing Figure 8 in the previous section, when the VP is rendered with the wide FOV, the degradation in the VP is due to the non-uniformed sampling space. In this section, we propose a model for the UV surface, which makes the sampling space uniform. Figure 9 depicts a model to represent the proposed UV surface, which is tangent to the unit sphere. The proposed UV surface is a part of the outer sphere whose center and radius are \(O^{\prime}\) and  
Figure 8: Normalized \(l^{h}(m\,n*)\) when \(n^{*}=H_{VP}/2\).  
\(r\), respectively. The outer sphere intersects with the unit sphere at the center of the UV surface. The outer sphere is represented by the following equation.  
\[x^{2}+y^{2}+(z+r-1)^{2}=r^{2} \tag{29}\]  
In Figure 10, the red curve represents the cross-section of the proposed UV surface, where \(F_{0}\) is the vertical FOV and \(F_{v}^{OUT}\) is the corresponding vertical angle at the center \(O^{\prime}\) of the outer sphere to cover the surface that is generated by applying \(F_{v}\) at the center \(O\) of the unit sphere. The relationship between \(F_{v}\) and \(F_{v}^{OUT}\) is as follows:  
\[\tan\biggl{(}\frac{F_{v}}{2}\biggr{)}=\frac{r\ \sin\left(\frac{F_{v}^{OUT}}{2} \right)}{r\ \cos\left(\frac{F_{v}^{OUT}}{2}\right)-(r-1)} \tag{30}\]  
Figure 10: Cross-section of the proposed UV surface and the unit sphere.  
Figure 9: Curved UV surface, which is the tangent surface for the unit sphere.  
Equation (30) can be rewritten as follows:  
\[F_{v}^{OUT} =4\tan^{-1}\left(\frac{\sqrt{r^{2}+(2r-1)\tan^{2}\left(\frac{F_{v}}{2} \right)}-r}{(2r-1)\tan\left(\frac{F_{v}}{2}\right)}\right) \tag{31}\] \[u = \frac{m+0.5}{W_{VP}},0\leq\ m\ <W_{VP}\] (32) \[v = \frac{n+0.5}{H_{VP}},0\leq\ n\ <H_{VP} \tag{33}\]  
Note that Equation (31) is numerically stable only for \(r>0.5\). \(F_{v}^{OUT}\) has a complex number for \(0<r<0.5\). When \(r=0.5\), \(F_{v}^{OUT}\) is not defined. However, because the curved UV surface is a part of the outer sphere as shown in Figure 10, \(r\) would be larger than 1. Thus, in the proposed algorithm, \(F_{v}^{OUT}\) is always numerically stable.  
Equations (32) and (33) explain the detailed process for \(f_{M}(m,\ n)\) from (6) when the proposed UV surface is used. Based on the geometry that is related to the outer sphere, the coordinates \((x,\ y,\ z)\) of \(P\) are derived as follows:  
\[\Phi^{OUT}=F_{h}^{OUT}\times(0.5-u) \tag{34}\]  
\[\Theta^{OUT}=F_{v}^{OUT}\times(0.5-v) \tag{35}\]  
\[x=r\ \cos(\theta^{OUT})\sin(\phi^{OUT}) \tag{36}\]  
\[y=r\ \sin(\theta^{OUT}) \tag{37}\]  
\[z=r\ \cos(\theta^{OUT})\cos(\phi^{OUT})-(r-1) \tag{38}\]  
Point \(P\) is projected onto point \(P^{\prime}\) on the unit sphere, where the coordinates of \(P^{\prime}\) are \((X,Y,Z)\), which are calculated by using (17)-(19). When the proposed UV surface is used, \(f_{p}(u,\ v)\) from (7) is implemented by applying (34)-(38) and (17)-(19).  
Figure 11 displays the VPs that occur from applying the curved UV surface for the FOV = [75, 120] and \(r\) = [2, 5, 20, 0.3], where a larger outer sphere produces flatter straight lines. When \(r\) is set to 0.3, the generated viewports degrade significantly, because \(r\) = 0.3 is included in the range of instability in Equation (31).  
Figure 11: Viewport pictures (VPs) resulting from applying the curved UV surface.