# Optimal View Estimation Algorithm and Evaluation with Deviation Angle Analysis
## 3 Methods
### Uniform Sampling on a Unit Sphere
Several representative methods include the CFLS [33], Continuous Stochastic Dynamics (CSDyn) [34], Inverse Transform sampling ([[https://github.com/benroberts999](https://github.com/benroberts999)]([https://github.com/benroberts999](https://github.com/benroberts999)) /inverseTransformSample, access date: 10 March 2025) (InveT), analytically exact spiral scheme (Spiral) [35], sampling of concentric spherical shells in k-space with the new strategy (Kspace) [36], the traditional Spherical Coordinate Sampling using Azimuthal rotation and the Polar rotation (SCS-AP), and ours. The spherical sampling results of these methods are shown in the first row of Figure 3.  
The differences between these results are easily noticeable when the number of points is small. When the number of points is relatively large, the difference is not obvious. We design a method to visualize the uniform distribution effect here. For any sampling point \(p_{m}\), the average distance of \(p_{m}\) to its \(k\) nearest neighbors \(q_{j}(j=1,2,\ldots,k)\) can be calculated (Figure 4a) as  
\[\overline{d}_{m}=\frac{1}{k}{\sum_{j=1}^{k}}\big{\|}p_{m}-q_{j}\big{\|}_{2}. \tag{3}\]  
where \(\big{\|}p_{m}-q_{j}\big{\|}_{2}\) is the 2-norm distance between point \(p_{m}\) and its neighbor point \(q_{j}\). Then, we let \(p_{m}\) move to a new position \(p_{i}^{{}^{\prime}}\) using the bellow formula. \[p_{m}^{{}^{\prime}}=p_{m}+\overline{d}_{m}\times\overset{\longrightarrow}{ Op_{m}}^{o}. \tag{4}\]  
Figure 4: Schematic diagram of visualization scheme of the nearest neighbor average distance. (**a**) Moving direction; and (**b**) color scheme. Figure 3: The spherical uniform sampling results of seven methods. From top to bottom, the number of sampling points are 25, 250, and 900. (Please zoom in for a clear view.) where \(\overset{\rightarrow}{Op}_{m}^{o}\) is the unit vector parallel to \(\overset{\rightarrow}{Op}_{m}\). In addition, to enhance the visualization effect, we also design a coloring scheme (Figure 4b) for the moved sampling points. The sampling results are visualized in Figure 5. If the uniform sampling of the sphere is uniform, then the colored sphere is a perfectly spherical shape and the coloring is also evenly distributed. The best result is that the colors are the same within the sphere. Based on these two visual indicators, our method demonstrates the best performance among these seven methods. In addition to comparing visual effects, we also quantitatively analyze and compare the spherical sampling results of various methods. Quantitative analysis is mainly conducted on the average distance between neighbors, calculated by Formula (3). An assumption is that, in an ideal uniform sampling, the average distance \(\widetilde{d}_{m}(m=1,2,\ldots,N)\) between the neighbors of each point should be the same. Therefore, we calculate the minimum (minAveD), maximum (maxAveD), and standard deviation (stdAveD) of the average distance \(\left\{\widetilde{d}_{m},m=1,2,\ldots,N\right\}\) between the nearest neighbors of all points, and perform a Kolmogorov-Smirnov (KS) test for uniform distribution and normal distribution. \(N\) is the number of sampling points, and we test three sampling densities, namely \(N=25\), \(250\), and \(900\), corresponding to the cases of a few, a medium number, and many points, respectively. The quantitative index calculation results of the sampling points obtained by seven methods are shown in Tables 3-5.