## 3 Parametric Model Definition
### Surface Meshing Method
#### 3.1.2 Generation of Geodesic Master Curves: Algorithm Proposal  
The bending moments about the weak and strong bending axes in the latths of an elastic timber gridshell are directly proportional to the normal and geodesic curvatures, respectively, as will be seen in Section 3.2. In general, due to the forming process, the latths of an elastic timber gridshell arranged in a quadrilateral grid with a constant distance between nodes have bending moments about both bending axes. However, under external loads, bending occurs mainly about the weak bending axis of the latths. Therefore, it is desirable to choose grid paths that minimise the curvature in the strong bending axis, as this significantly reduces the residual stresses due to the forming process. In this way, a higher structural reserve in the latths can be achieved to resist external loads [9]. This could be obtained by imposing geodesic paths for the latths. It is well known that it is not possible to draw on a generic surface a quadrangular grid with a constant distance between nodes in which all curves are geodesic. However, it is possible to draw a quadrangular mesh by taking two geodesic curves as master curves. In this way, at least the first pair of latths will have no bending moments about the strong axis due to the forming process, and the neighbouring latths will have only very small bending moments about the same axis. This is the approach proposed in the present work. Geodesic curves on a surface can be drawn between two points \(O_{\text{n}}\) and \(O_{\text{n+1}}\) (which could be called geodesic endpoints), using existing algorithms in commercial parametric design software. However, the specific purpose of the optimisation problem described in this work requires computing a pair of geodesic curves that pass through a predetermined origin point on the surface while keeping a specified angle at that point. To set such a particular position and direction, it has been necessary to develop a new algorithm that generates geodesic curves from a point and a direction vector (Figure 5). The settings of the optimisation algorithm, as will be seen later (Section 4.1), required the position \(O_{0}\) as one of its genes, this point being the initial intersection point of the master curves and, as  
Figure 4: Relationship between the Frenet and Darboux trihedrons in space (a) and projected (b). another gene, the angle \(\alpha_{0}\) between them; thus, control over the position of this pair of first laths and the grid angle are necessary. Given a starting point \(O_{0}\) and a direction \(\alpha_{0}\), this algorithm performs a recursive process to determine the geodesic master curves as follows:  
* Starting from \(O_{0}\), it calculates the intersection between the surface and a circumference with a centre at point \(O_{0}\), contained in the plane defined by the normal and the tangent vectors with the prescribed direction at \(O_{0}\). The intersection gives \(O_{1}\). A geodesic curve \(g_{0-1}\) is then generated between \(O_{0}\) and \(O_{1}\) (Figure 5a). The smaller the circumference radius \(r\), the more accurate the results (algorithm resolution). It should be noted that the plane used is precisely the osculating plane of the plotted geodesic, since it is perpendicular to the tangent plane of the surface. * The tangent vector of the geodesic \(g_{0-1}\) is then obtained at point \(O_{1}\). * The process is repeated by taking \(O_{1}\) as the new origin and thus obtaining point \(O_{2}\). A geodesic curve \(g_{1-2}\) is then created between \(O_{1}\) and \(O_{2}\) (Figure 5b). * The process is repeated \(n\) times until the intersecting circumference does not intersect the surface because the distance from the last origin point to the boundary is smaller than the radius \(r\), breaking the algorithm (Figure 5c). Figure 6 shows a test of the algorithm with two pairs of geodesic master curves on a test study surface, generated from a pair of orthogonally intersecting parabolic curves in space and a closed base curve.