Modeling technology of curved surface development for puffer fish

The drag reduction mechanism of puffer epidermis was closely related to its real geometry. In order to solve the modeling problem of epidermal spines on the puffer surface, a modeling method for the expansion of puffer shape was proposed. The three-dimensional scanning and non-uniform rational B-spline surface modeling technology was used to reconstruct the puffer model. According to the curvature characteristics, the surface mathematical equations including exponential, logarithmic, and sinusoidal functions were established based on the multinomial function. The surface was generated by a mathematical equation, and the surface was divided into several non-uniform rational B-spline patches according to curvature. After discretization, the point cloud Gaussian curvature and average value were calculated based on the implicit equation of moving least square surface, and whether the surface is approximately extensible or not was judged. Finally, the puffer surface was divided into 46 curved patches. In this article, the surface expansion algorithm gave priority to ensure the area unchanged, and four feature surfaces were selected according to the epidermal spines arrangement of the puffer surface. The results showed that the technique can simply and efficiently unfold the curved surface of the puffer fish, thus the mapping relationship between the epidermal spines on the surface and the plane was determined, which established a foundation for the accurate arrangement and modeling of the epidermal spines on the surface.


Introduction
Drag reduction for ships and underwater vehicles has always been a hot research topic. By means of the bionic method, underwater drag reduction can be achieved by imitating the non-smooth skin of organisms. The shield scales and ribs on the surface of shark skin, the adaptive epidermis of dolphins, and the surface microstructure of crucian scales have been proven to have good underwater drag reduction effects and have been widely used in the shipbuilding field. [1][2][3][4][5][6] Microstructure of the convex (concave) and ridging (triangle and arcshaped) shapes of fresh lotus leaves and shark skin was applied to soil adhesion and resistance reduction. The surface microstructure of bird feather was applied to drag reduction in air. 7,8 But the surface of bionic object is complex, so it needs to replace the biological surface with plane or simplified model, which changes the original shape of biological characteristics and limits the development of bionic technology. The puffer is a kind of migratory and breeding fish, which is small in size and long in navigation with dense epidermis and good elasticity. We have confirmed that the puffer fish possessed excellent underwater drag reduction effects, 9,10 and the mathematical modeling of the back surface for the puffer fish has been established by the three-dimensional (3D) scanning and mathematical modeling. 11 The height of puffer epidermis spines was less than 2 mm, and the arrangement was dense. The normal vectors of each epidermal spines on the surface were different, so it is difficult to achieve mass modeling. In order to realize the arrangement and modeling of the epidermal spines on the surface, it is necessary to unfold the puffer surface, thereby obtain the mapping relationship between the surface and the development plane.
The Gaussian curvature can be used to judge whether the surface is expandable or not. Mohammed Mostefa Mesmoudi et al. 12 have proved that the centralized curvature can be used to estimate the Gauss and mean curvature, but the average value cannot be obtained accurately. Pinghai Yang and Qian 13 proposed a set of analytical equations for directly calculating the Gaussian curvature of point set surface. Based on the implicit equation of moving least squares (MLS) surface, the differential geometry analysis can be performed on discrete surfaces, but the calculation accuracy is not high. The approximate development of non-extensible surface was generally divided into two steps: 14 in the first step, the non-extensible surface was divided into several smaller surfaces, in a certain threshold range, the non-extensible surface is approximated as an expandable surface. Wei Pan et al. 15 proposed a meshing method based on surface development and mapping ideas. The surface expansion is equivalent to the mapping of rectangular lattices, which can reflect the shape and area distribution of the surface well; however, the free surface should be meshed properly, and the expansion steps are complicated. Chen and Tang 16 proposed a method using G2 continuous Bezier patches to interpolate arbitrary spatial curves; the given curves were divided into a number of segments and then ordered quadrilateral G2 Bezier patches were constructed to interpolate these segments. Although this method has a good effect of surface expansion, there are some limitations. This is because, the construction of elemental Bezier patches (EBP) mainly focused on G2 constraints, and the boundary-forced Gauss curvature is zero, so the optimal effect only corresponds to this special structure. In addition, Konstantions Gavriil et al. 17 casted into an algorithm for thinning the Gauss image by increasing the planarity of the Gauss images of appropriate neighborhoods, the problem of paneling a freeform architectural surface with developable panels was tackled.
In this article, the geometric model of the puffer fish was established using 3D scanning and non-uniform rational B-spline (NURBS) surface modeling technology, and the mathematical equation of the puffer fish surface was obtained by surface fitting. The puffer fish surface constructed by mathematical equations was used as research subject, according to the curvature variation, the non-expandable surface was divided into several smaller approximate developable surfaces. The average value of gauss curvature for the discrete surface was obtained. The subarea was adjusted appropriately based on the above results, and the surface development algorithm was adopted to unfold the puffer shape surface. Four characteristic surfaces of puffer were selected according to the arrangement of epidermal spines. By comparing the area between the algorithm and 3D software, the reliability of unwrapping algorithm was verified, and the mapping relationship between the surface and the plane for the epidermal spines was acquired, which provided a new modeling method for the study of biological surfaces and microscopic features on surfaces.

3D reconstruction of puffer fish model
The adult healthy puffer fish (fugu obscurus) was selected in the middle and lower reaches of the Yangtze River in China, as shown in Figure 1. After freezing, the 3D scanning was used to obtain the point cloud data of the puffer fish shape, as shown in Figure 2. NURBS surface is a modeling method based on the Bspline concept, which has better surface fitting effect, so the reverse engineering software Geomagic Studio was adopted for point cloud processing. The point cloud of the pectoral fin, ventral fin, and dorsal fin of the puffer fish was deleted, and the 3D puffer fish model was established after reverse processing, as shown in Figure 3. The maximum deviation of surface and point cloud is + 0.082 mm and 20.135 mm, the average deviation is 0.028 mm, and the standard deviation is 0.036 mm. It can be concluded that the surface possessed a good fitting effect on point cloud.

Curved surface subarea of puffer fish
To establish the mathematical model of puffer fish surface, it is necessary to satisfy the unique output value corresponding to each input value, so the puffer fish was divided into two regions, namely the back and the abdominal. In addition, to improve the fitting effect, the back and abdomen also were differentiated.
The middle longitudinal contour of the back and abdomen was selected as the characteristic curve, which was represented by sum of sine. The fitting equation was shown in equation (1), and the curve coefficient was shown in Table 1. The sum of the squared errors (SSE) of the back and abdomen were 55.45 and 20.9; the root mean squared errors (RMSEs) were 0.5139 and 0.4549, and the coefficients of determination R 2 were 0.9972 and 0.9953, respectively Figure 4 showed the curvature graph of characteristic curves for the back and abdomen. In the range of 0-180 mm, the inflection point was selected as the intercept point of the cross section. The radius of curvature was calculated according to the fitted curve equation. According to the spatial coordinates of the outermost inflection point of curvature radius, the back and abdominal surfaces were divided into two parts: the main area and the side area. The curvature for the characteristic curve and the transverse section occurred fluctuation in a certain range, and the back curve was more smooth than the abdominal.

The establishment of mathematical model for puffer fish surface
The point cloud data of each area was imported into MATLAB for surface fitting. Based on the polynomial function, customize functions with types such as exponents, logarithms, sum of sine, and so on. The equations of the main and side areas for the back were shown in equations (2) and (3), and the equations of the main and side areas for the abdomen were shown in equations (4) and (5) F(x, y) = a + bx + cx 2 + dy 2 + fx 2 y    F(x, y) = a + bx + cy + dx 2 + fy 2 + gx 2 y + hy 3 + i ln (jy) ð3Þ F(x, y) = ay + bx 2 + cy 2 + dxy 2 + fy 3 + g sin (hx + i) ð5Þ Equation coefficients and surface fitting evaluation indexes were shown in Table 3.
The fitting results of the back and abdomen surface were shown in Figures 5 and 6, respectively.

Mathematical modeling
The surface model was built using the fitted mathematical equations in MATLAB. The merged surface model of the puffer fish was shown in Figure 7.
The obtained curved surface needs to be smoothed and filled. In the B-spline wavelet base multi-level decomposition process, according to the curvature characteristics of the surface near the merge, use Geomagic Studio to process the surface to ensure the continuity and smoothness of the surface merging. 18 The treated puffer fish model was shown in Figure 8. For simplified mathematical modeling, the puffer fish head, eye, and mouth area features were neglected.   Subarea and Gaussian curvature analysis of the puffer fish surface Establishment NURBS surface model of puffer fish. The functional expression of k*l NURBS surfaces 19,20 was shown in equation (6) P(u, v) = P m The control points P i,j (i = 0, 1,..., m; j = 0, 1,..., n) presented a topological matrix, and control network was formed; weight factor v i,j and control vertex P i,j were interrelated; and B i,j,k,l (u, v) are bivariate rational basis functions.
The contour was generated according to the curvature change. The mesh surface was divided into 46 approximate matrix patches with low curvature variation. The analysis result of Gaussian curvature was shown in Figure 9, and the partition number was showed in Figure 10.
The variation degree of the surface was presented by the cloud chart of Gaussian curvature. The Gaussian curvature of head surface for Puffer fish is larger than others. The Gaussian curvature values for 1 and 3 are about 17.9e-3, while for 2, 4, 5, 6,7,8,9,11,13,15, and 17 maintain at higher values. In addition, the Gaussian curvature values at the junctions of 24 and 25, 36 and 37 are larger, so the surface presents convex characteristics. The Gaussian curvature at the junction of 2, 5 and 6, 20 and 21, 28, 29, 32 and 33, 40 and 41     are about 234.7e-3. Moreover, the Gaussian curvature near the middle of the abdomen is smaller, thus the surface presents concave feature. Gaussian curvature of the rest parts tends to zero.

Approximate development of puffer fish surface
Gaussian curvature of discrete points on curved surfaces Gaussian curvature is an important geometric feature for curved surface. The current 3D software only obtains the cloud diagram of Gaussian curvature; although the visualization can be realized, it is difficult to get the Gaussian curvature value for certain point on the surface, and even the average value of Gaussian curvature. The surface was discretized into point clouds, and the curvature values of each point were calculated by the following algorithm.
Point q i 2R 3 , v i is a normal vector, the vector field n(x) is shown in equation (7) n u(x, q i ) is a Gaussian weighting function, as shown in equation (8). h is a Gaussian scale parameter The energy field e(y, n(x)) is defined as e(y, n(x)) = X The points were projected to MLS surfaces through vector and energy fields. In order to calculate the Gaussian curvature of the MLS surface, the MLS equation was transformed into an implicit form The expression of Gaussian curvature k is as follows where H(g(x)) is a hessian matrix

Surface unwrapping algorithm
After the surface discretization, the center point was determined as the reference point O. The distance between each point-to-point O was calculated, and the development calculation was performed in groups of four points. Its position was difficult to adjust artificially owing to the density degree of the point clouds. There were six kinds of arrangement of any four points for counterclockwise, and the four-or three-point collinear situation may occur. In order to solve the above problems, the algorithm was simplified; the points were divided into four groups according to the quadrant and were sorted from the first to the fourth quadrant based on counterclockwise. The three points collinear can be excluded by means of the sum of the two sides greater than the third edge.
Four points in space and four points after development were shown in Figure 11. The relationship between the angle b i after the expansion and the angle a i before the expansion was as follows When the distance of three points and the Gaussian curvature are sufficiently low, the area of the curved surface A 1 OA 2 can be regarded as the area of DA 1 OA 2 . The curved surface was approximately unfolded based on area invariant criterion. Assuming that the development extension ratio M in X and Y directions are the same, the equations were shown in equation (15) Figure 11. Four-point development diagram.

Solve the equations as follows
The coordinates of the point B 1 can be obtained by the extension ratio M and the coordinate value of the point A 1 , and then the coordinates of the other points were successively determined according to the expanded angle b i , the next set of calculations was performed after a set of four points was unfolded.
It is difficult for surface discretization to ideally distribute points to four quadrants. The curvature of each part is unequal. The efficiency of artificial adjustment is very low. Therefore, a single-point unwrapping algorithm was needed to supplement the four-point unwrapping algorithm. In other words, the single-point unwrapping algorithm is derived from the four-point unwrapping algorithm, which starts with the number of one quadrant point to zero, the calculation ends at the last point.
The original and development coordinates of three points were determined; thereby, the development coordinates were calculated according to the original coordinates of the fourth point. Taking the number of first quadrant points is zero as an example. The areas of MA 4 A 3 A 1 , MA 4 A 2 A 1 , MA 3 A 2 A 1 are d 1 , d 2 , d 3 , respectively, which was calculated by Heron's formula. The areas of MB 4 B 3 B 1 , MB 4 B 2 B 1 , MB 3 B 2 B 1 were e 1 , e 2 , and e 3 , respectively. The points that form the triangle were arranged in a counterclockwise direction. Here, the three sides of d are a, b, and c, and the coordinates of e point are (x i , y i ), (x j , y j ), (x k , y k ), respectively The area difference before and after development is S In order to minimize the area difference after development, the minimum value of S partial derivative was computed, thus the equations are as follows The coordinates of the development point were obtained, and then the unexpanded points in the next quadrant were solved.

Development example of puffer fish surface
According to the arrangement of the puffer fish epidermal spines, the surfaces 11, 18, 23, and 30 were selected as an example to unfold, which realized the mapping that the epidermal spines on curved surface and the plane, and its normal vector was retained.
The sampling point cloud g for surface 30 is 734, and the curvature g# is 253, as shown in Figure 12 The coordinate data of sampling and curvature point cloud, the normal data were substituted into discrete curvature algorithm. The number of adjacent points was defined as h. The Gaussian curvature of each point was obtained, and the average value K of Gaussian curvature was calculated by the following formula K = The average value of Gaussian curvature for surface 30 is 9.747e-5 \ 1e-3, which can be regarded as an approximate expansion. The discrete Gauss curvature of surfaces 11, 18, 23, and 30 was shown in Figure 13.
The point cloud data on surface 30 was imported into MATLAB, and divided into four groups according to the quadrant. The plane coordinates corresponding to the coordinates of space points were calculated by the four-point and the single-point unwrapping algorithm, and accordingly, the normal vectors were saved. The corresponding relation of point clouds before and after the expansion for surface 30 was shown in Figure  14. The original surface area is 381.15 mm 2 , and the development area is 380.95 mm 2 , while the development area using 3D SolidWorks software is 380.56 mm 2 . The development parameters for surfaces 11, 18, 23, and 30 were shown in Figure 15. The variation value of surface area by the algorithm was obviously lower than that by SolidWorks expansion, and the effective area was improved more than 40%. The average value of Gauss curvature for each surface was less than 1e-3, which was approximately developable. The area difference was proportional to the average Gauss curvature.

Conclusion
In this article, a modeling method for surface development of the puffer shape was proposed. The global model of the puffer fish was built using the 3D scanning and NURBS modeling technology. The average deviation was 0.028 mm, and the standard deviation was 0.036 mm. According to the curvature inflection point of the longitudinal middle surface for puffer's back and  abdomen, the selection position of transverse section was determined. Based on the outermost inflection point of the curvature radius of the transverse section profile, the back and abdomen areas were divided into the main and side area, and mathematical equations of puffer surface also were established, respectively. The curved surface of puffer fish was constructed by mathematical equations to analyze Gaussian curvature, and the surface was divided into 46 NURBS patches. An unwrapping algorithm suitable for bionic surface was designed to realize the approximate development of puffer fish shape. According to the arrangement of epidermal spines and the Gaussian curvature of the curved surface, the mapping relation between the surface and the point on the plane was obtained by discrete expansion of four surfaces. The method is simple and efficient, which not only can realize the arrangement and modeling of the epidermal spines on the curved surface but also provide a new idea for the drag reduction technology of underwater bionic non-smooth surface.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.