## 3 Geodesic Paths on Surface Mesh  
We now describe in detail the algorithm for finding the geodesic path of a given length L over the surface mesh given a starting point \(\mathbf{p_{0}}\) and starting direction \(\hat{t}_{0}\). This section is already described in [10] but we repeat it here for more clarity. The length L corresponds to the movement of the camera from node to node as detailed in the next section and it is typically the distance to the next near-rectangle, in the length or width direction. This algorithm is taken from [11] with some modifications but it is worth repeating here and going into the details of how it is implemented. Briefly, it is an iterative algorithm that takes an initial point and direction, determines the next point and direction using a triangle intersection, and then repeats the process until the desired length is reached, or the boundary is reached, in which case it will extend the tangent over the edge up to the final length. A pictorial explanation of the algorithm is shown in Figure 11. First, it is determined whether \(\mathbf{p_{0}}\) lies inside a triangle, on an edge between two triangles, or on a vertex between several triangles. Accordingly, the tessellation normal \(\hat{n}\) is computed. After that the direction vector \(\hat{t}_{0}\) is modified so as to make it perpendicular to \(\hat{n}\) and then an intersection triangle is formed along the directions of \(\hat{t}_{0}\) and \(\hat{n}\), with a length of d which is the geodesic path distance remaining to be covered (see Figure 11a). The size of the intersection triangle is also determined by \(\theta_{s}\), which is the search angle. The search angle is used as a check to decide if the boundary is reached (rather than a continuation of the curvature) and is normally set to 30 degrees. Then we check for the intersection of this triangle with the triangles that \(\mathbf{p_{0}}\) is a part of. There will only be one intersection line in all three cases (as we can see in Figure 11a-c), or no intersection at all in the case where there is no next triangle or the next triangle is folded at an angle greater than \(\theta_{s}\) as we can see in Figure 11d. In both cases it means that the boundary has been reached, so we simply compute the final point with the distance remaining along the tangent vector at that point. The definition ofboundary' here is a sharp discontinuity in the triangle mesh as we can see in Figure 11d, and it is determined by the selection of \(\theta_{s}\). This algorithm also has two sub-functions: determining if \(p\) is a part of a triangle (including being on edges and vertices), and computing the tessellation normal \(n\) at that point. These two functions are described in Algorithms 1 and 2. Triangle-triangle intersection (computing the intersection line of two triangles) is described in [13] and not repeated here. The main algorithm is described in Algorithm 3. Algorithm 1 is based on checking first whether the point is in the plane of the triangle, and then computing barycentric coordinates u,v to check whether it is inside the triangle or not. In the boundary cases where \(p\) lies on the edge or vertex, we would have at least one of \(u=0,u=1,v=0,v=1\) (for vertices two of them would be true). Algorithm 2 computes the tessellation normal as per [11]. If the point is inside the triangle, the normal is the normal vector of that triangle. If the point is on an edge or vertex, the normal is the average of the normal vectors of all the triangles that this point \(p\) is a part of. The inequalities mentioned in the above algorithms are usually evaluated in code with some tolerance built in, in order to account for numerical errors with floating point numbers (e.g., \(u\leq 1+\epsilon\) rather than \(u\leq 1\)). Also, for a closed surface not having a well-defined boundary such as a sphere or a torus, the geodesic path will simply wrap around the surface and continue. The starting point in Algorithm 3 can be any point on the surface.