## 3 Description of the Method
### Definition of the Stations of the Upper Surface  
The outer chine curve and sheer curve should be discretely sampled as the starting points for each station curve of the upper surface. The B-spline surface essentially represents an interpolation function defined on a uv grid of quadrilaterals. The discretization approach determines the distribution of uv grid lines in the upper hull surface. Figure 10(a) illustrates the distribution of uv grid lines formed using the cross-sectional method, where distortions and C\({}^{1}\) discontinuities are present at the bow. Within the range \([0,1]\), \(n\) parameter values of \(u_{i}\) are uniformly sampled, and then these are respectively substituted into the 3D curve expressions in Equations (30) and (36) for the outer chine curve and the sheer curve. The resulting discrete points \(\mathbf{Q}_{si}\) and \(\mathbf{Q}_{ri}\) serve as the endpoints for the station curves, forming the trend of the uv grid, as illustrated in Figure 10(b). The obtained uv grid exhibits a reasonable distribution in the bow region.  
Figure 16: _Cont._  
Figure 15: The sheer curves in lateral view defined by shape coefficients.  
As shown in Figure 17, in most cases, when the points \(\mathbf{Q}_{si}\) and \(\mathbf{Q}_{ri}\) are not located within the same cross-section, a local coordinate system \(\mathbf{Q}_{ri}\)-\(x_{i}y_{i}z_{i}\) is established, with point \(\mathbf{Q}_{ri}\) as the origin. The orientation of the local coordinate system is specified as follows: the corresponding \(Z\)-axis is aligned with the hull coordinate system, the \(Y\)-axis is pointed towards the horizontal projection point of \(\mathbf{Q}_{si}\), and the \(X\)-axis is determined by the right-hand rule. The relationship between the coordinates of point \(\mathbf{P}\) in the hull coordinate system and its coordinates \(\mathbf{P}^{\prime}\) in the local coordinate system \(\mathbf{Q}_{ri}\)-\(x_{i}y_{i}z_{i}\) can be stated as follows:  
\[\mathbf{P}=\mathbf{P}^{\prime}\mathbf{R}_{\varphi}+\mathbf{Q}_{ri} \tag{38}\]  
where \(\mathbf{R}_{\varphi}\) represents the coordinate transformation matrix for the rotation around the \(Z\)-axis, with the rotation angle \(\varphi\) being the angle between the local coordinate system's \(Y\)-axis and the hull coordinate system.  
Within the local coordinate system \(\mathbf{Q}_{ri}\)-\(x_{i}y_{i}z_{i}\), the station curve (Figure 17) can be constructed via a quadratic Bezier curve in the \(y_{i}\)-\(z_{i}\) plane, as follows:  
\[\mathbf{S}_{t,i}(u)=B_{0,2}(u)\cdot\mathbf{Q}_{ri}+B_{1,2}(u)\cdot\mathbf{C}_ {m,i}+B_{0,1}(u)\cdot\mathbf{Q}_{si},\ \ 0\leq u\leq 1 \tag{39}\]  
Following the approach outlined in Section 3.4.2, we are able to convert the control point \(\mathbf{C}_{mi}\) into expressions for the parameters \(\lambda_{e}\) and \(\lambda_{f}\). Utilizing the coordinate relationship presented in Equation (3), we can then derive the coordinates of C, as presented in Equation (40). Notably, d1 governs the distribution of the bulge positions along the station curve, while d2 impacts the overall curvature of the station curve. The specific C's coordinates are given as follows:  
\[\mathbf{C}_{mi}=\mathbf{P}_{1}+(0.5+\lambda_{e})(\mathbf{P}_{2}-\mathbf{P}_{1 })+\lambda_{f}(\mathbf{P}_{2}-\mathbf{P}_{1})\cdot\mathbf{R}_{\varphi}\mathbf{ R}_{\varphi}^{-1} \tag{40}\]  
where \(\mathbf{R}_{y}\) represents the matrix for rotating \(90^{\circ}\) around the \(y\)-axis.