## 2 Natural Interactions
### Catmull-Clark Refinement Algorithm Adapted for Triangular Meshes
For this purpose, the Catmull-Clark algorithm can be adapted for VR and AR applications by converting the triangular mesh into a quadrilateral mesh where possible. The subdivided quadrilateral mesh must then be reconverted into a triangular mesh, as triangular meshes are optimised for faster rendering and better performance in real-time applications. The conversion from triangular to quadrilateral mesh, as well as the subsequent reconversion from quadrilateral to triangular mesh after refinement, must be carefully controlled, with a specific focus on the diagonals of the quadrilateral faces. In transitioning from the initial triangular mesh to the initial quadrilateral mesh, each pair of triangles highlights a diagonal of the corresponding quadrilateral face. After the subdivision process, to achieve the desired result, the conversion from quadrilateral to triangular faces in the final stage should ensure the alignment of the directions between the diagonal identified by each pair of final triangles and the diagonal of the initial generator pair (Figure 4). In particular, the control of the direction of the diagonals of each pair of triangles, necessary for using the Catmull-Clark algorithm adapted to triangular meshes, is based on the use of base cubes with face indexing (Figure 5a). The face indexing \(F_{ID}\) allows for the identification of the reference frame RF of the faces and their types (front-face or back-face). Adjacent faces of different base cubes are defined by the same \(F_{ID}\). Each face is described by an \(F_{Num}\), which consists of a set of indices corresponding to the vertices that compose it. The order of these indices is determined by the corresponding RF. For faces indexed with F1 and F4, the order of the indices follows the \(x\)-axis first and then the \(y\)-axis; for faces indexed with F2 and F5, the order follows the \(y\)-axis first and then the \(z\)-axis; and for faces indexed with F3 and F6, the order follows the \(z\)-axis first and then the \(x\)-axis. For each quadrilateral face, the pairs of triangles can be generated using the \(F_{Num}\) and the type. Two lists of information describe the mesh of a triangle: the first contains the spatial coordinates of the three vertices, while the second specifies the order of these vertices. This order is fundamental for managing back-face culling [46]. To extract the second list of information, two arrays of integer are used, which contain the positions of the vertices in the \(F_{Num}\). The array in Equation (8) is used for front-faces, while the array in Equation (9) is used for back-faces. \[\mathbf{v}_{Front} = \begin{bmatrix}0&2&3&0&3&1\end{bmatrix}  \tag{8}\] \[\mathbf{v}_{Back} = \begin{bmatrix}0&3&2&0&1&3\end{bmatrix}  \tag{9}\]  
The first three indices identify the first triangle, and the last three identify the second triangle of the pair. These arrays are invariant under cyclic rotations for the two groups of three elements, as each cyclic permutation of each group preserves the geometric structure of the triangles defined by the specified vertices. By extracting from \(F_{Num}\) the indices at the positions specified by the vectors \(\mathbf{v}_{Front}\) and \(\mathbf{v}_{Back}\), a new array \(\mathbf{T}_{\mathbf{FV}}\) is obtained for each face if it is a front-face, or \(\mathbf{T}_{\mathbf{BV}}\) if it is a back-face. The arrays \(\mathbf{T}_{\mathbf{FV}}\) and \(\mathbf{T}_{\mathbf{BV}}\) contain the order of the vertices needed to generate each pair of front and back triangles, respectively. These arrays contain two pairs of repeating vertices: by using nested loops, it is possible to view all the combinations and generate the integer array that defines the quadrilateral face. The conversion from a quadrilateral mesh to a triangular mesh is achieved by starting from new arrays of four integers that identify the indices of the new vertices describing  
Figure 4: Catmull–Clark algorithm adapted for triangular meshes preserving the diagonal direction when transitioning between triangular and quadrilateral meshes.