## 4 Node Insertion Algorithm for Determining Viewpoints
### Nodes and Viewpoints  
A new data structure is created for the node and its details are explained in Table 1.  
We note that the position of the node is recorded in both 3D and 2D space. In 3D space, the node's position \(\mathbf{p}\) is a point (x,y,z) on the mesh that is calculated by the geodesic path algorithm. In 2D space, the node's position is not in units of distance but as integer (i,j) which denotes the projection from the initial point in the horizontal (tangent) and vertical (binormal) directions. The initial point is at (0,0) and expanding to the right creates a node at (1,0) and so on. The normal, tangent, and binormal \(\mathbf{n,t,b}\) are unit vectors that form a right-handed vector basis with its origin at the node (also called Frenet Serret reference frame), and the normal is oriented outwards from the mesh so that the viewpoint \(\mathbf{v}\) can be located at some offset distance \(d_{0}\) looking down on at the node. The view camera's up-direction vector is oriented along the binormal direction. Figure 13 describes the node and view camera. \begin{table}
\begin{tabular}{c c c} \hline
**Data** & **Data Type** & **Explanation** \\ \hline
**p** & vector(3) & Position vector of the node in R3 (on Mesh) \\
**n** & vector(3) & Outward normal vector of the node \\
**t** & vector(3) & Tangent vector of the node \\
**b** & vector(3) & Binormal vector of the node \\ i & integer & X-coordinate of the node in the 2D space \\ j & integer & Y-coordinate of the node in the 2D space \\ active & boolean & Whether the node is active or not \\ \hline \end{tabular}
\end{table} 
Table 1: Node data structure. Figure 12: Geodesic path on surfaces. (**a**) Panel for inspection; (**b**) Geodesic paths on 3D model of panel. Figure 13 also shows us the projection of the viewing frustum on the surface. As we have assumed a quasi-flat approximation, we can say that the projection on the surface is approximately that of the viewing frustum. The horizontal projection \(p_{h}\) and vertical projection \(p_{v}\) can be thus calculated by the following formulas (Equation (1)). \[ \begin{split} p_{h}&=2p_{f}d_{0}tan(\theta_{HFOV}/2)\\ p_{v}&=2p_{f}d_{0}tan(\theta_{VFOV}/2)\end{split}  \tag{1}\]  
This can be understood by referring to Figure 14. We see in Figure 14b that on an ideal flat surface, the viewpoint can see a frustum of length \(2d_{0}tan(\theta_{HFOV}/2)\) in the horizontal direction (and \(2d_{0}tan(\theta_{VFOV}/2)\) in the vertical direction. Since we are using a quasi-flat approximation, we will assume that we need to move the same distance away to create another viewpoint with no overlap or gap. We add a projection factor \(p_{f}\), which will decide whether the viewing areas have gaps in between them or overlaps. If \(p_{f}>1\), there will be gaps (because we will be inserting nodes further away than their actual projection on the surface), and if \(p_{f}<1\), there will be overlaps (Figure 14a shows gaps and Figure 14b shows overlaps). In practice, we want some overlaps between images but this makes the visualization of the coverage algorithm very confusing; hence, in this paper, we set \(p_{f}=1.1\) in order to visualize each viewing area (corresponding to the node and viewpoint) separately on the surface. The lengths \(p_{h}\) and \(p_{v}\) are important because these are our length inputs (L) to the geodesic path algorithm. We will find the child nodes from the parent node by moving by \(p_{h}\) in a horizontal (tangent) direction and \(p_{v}\) in a vertical (binormal) direction along the surface. Figure 14: Viewpoint projection on surface. (**a**) Multiple viewpoints corresponding to neighboring nodes; (**b**) Section view of horizontal projection. Figure 13: Node point and view camera.