3D Modelling with C 2 Continuous PDE Surface Patches

: In this paper, we present a new modelling method to create 3D models. First, characteristic cross section curves are generated and approximated by generalized elliptic curves. Then, a vector-valued sixth-order partial differential equation is proposed, and its closed form solution is derived to create PDE surface patches from cross section curves where two adjacent PDE-surface patches are automatically stitched together. With the approach presented in this paper, C 2 continuity between adjacent surface patches is well-maintained. Since surface creation of the model is transformed into the generation of cross sectional curves and few undetermined constants are required to describe cross sectional curves accurately, the proposed approach can save manual operations, reduce information storage, and generate 3D models quickly.


Introduction
3D modelling is an important and widely used step in the production pipeline for film and game industries. Using partial differential equation (PDE) surface patches to create 3D models has the advantages of representing complicated polygon models with fewer design variables and automatically achieving required continuity to avoid manual operations to stitch two adjacent surface patches together. Owing to their analytical mathematical expressions, this approach can also facilitate other applications such as levels of detail for multi-resolution models and deep learning-based tasks for reducing processing time.
In this paper, we use this partial differential equation method to create C 2 continuous 3D models from generalized elliptic curves. In order to generate a complicated 3D model, first we create a set of cross section curves. Each of the cross-section curves is approximated by a generalized elliptic curve whose analytical mathematical expression is in the form of a Fouier series. With the help of the analytical mathematical expression of generalized elliptic curves, a very complicated cross section curve can be defined with fewer design variables, which decreases information storage, speeds up network transmission, and facilitates consequent geometric processing. The design variables involved in generalized elliptic curves are used as the input of C 2 continuous PDE surface creation, which is based on the accurate closed form solution to a vector-valued sixth-order PDE. All created PDE surface patches are automatically connected together to obtain a C 2 continuous 3D model. Since all the undetermined constants in the closed form solution are determined by the design variables involved in the analytical mathematical expression of generalized elliptic curves, the proposed PDE-based modelling method also has the advantage of few design variables. form solution are determined by the design variables involved in the analytical mathematical expression of generalized elliptic curves, the proposed PDE-based modelling method also has the advantage of few design variables.
The remaining parts of this paper are organized as follows: In Section 2, we review the related work in the area. Then, an overview of the algorithm is given in Section 3. It consists of two steps: curve fitting and the creation of continuous PDE surfaces. A number of examples and results are given in Section 4. Conclusions and future work are discussed in Section 5.

Related Work
There are many different approaches for 3D modeling (see Figure 1). Roughly speaking, they can be classified as pure-geometric modeling and physics-based modeling techniques. Traditional pure-geometric modeling methods such as polygon modeling [1], NURBS modelling [2,3] modeling and subdivision modeling [4] are widely used in commercial graphics packages. Polygon modeling and subdivision modeling approaches can generate detailed or branching models; they are suitable for linear shapes and rigid objects. However, it is hard to use a small number of polygons to accurately represent smooth surfaces. On the other hand, NURBS modeling could use a few control points to create smooth curved objects. The disadvantage is the continuity problem between different patches, which typically require a lot of manual work to stitch adjacent patches together. Physics-based modeling [5] considers the basic physics of surface deformation. Compared with polygon modeling and NURBS modeling, it has the ability to create a more realistic look. Physics-based modeling methods include finite element method [6], finite difference method [7], finite volume method [8], mass-spring systems [9], the meshless method [10], coupled particle systems [11] and simplified deformation models for modal analysis [12].
PDE geometric modeling was pioneered by Bloor and Wilson [13] in computer graphics three decades ago. Since then, PDE methods have been developed to tackle various geometric modeling problems, such as surface modeling [14,15], surface design [16], and solid modeling [17], and are used to represent high-speed train head models [18] and optimize aerodynamic performance of high speed train heads [19]. One major advantage is that the differential operator of PDE can generate smooth surfaces [18]. Another advantage of using the PDE approach is that PDE surfaces can be generated by intuitive manipulation of the relatively small set of boundary conditions for PDE [20]; it can transform geometric modeling problems into boundary value PDE problems. Physics-based modeling [5] considers the basic physics of surface deformation. Compared with polygon modeling and NURBS modeling, it has the ability to create a more realistic look. Physics-based modeling methods include finite element method [6], finite difference method [7], finite volume method [8], mass-spring systems [9], the meshless method [10], coupled particle systems [11] and simplified deformation models for modal analysis [12].
PDE geometric modeling was pioneered by Bloor and Wilson [13] in computer graphics three decades ago. Since then, PDE methods have been developed to tackle various geometric modeling problems, such as surface modeling [14,15], surface design [16], and solid modeling [17], and are used to represent high-speed train head models [18] and optimize aerodynamic performance of high speed train heads [19]. One major advantage is that the differential operator of PDE can generate smooth surfaces [18]. Another advantage of using the PDE approach is that PDE surfaces can be generated by intuitive manipulation of the relatively small set of boundary conditions for PDE [20]; it can transform geometric modeling problems into boundary value PDE problems. Therefore, the PDE modeling method can obtain continuous smooth surfaces without manual work to stitch adjacent patches together.
Elliptic cross sections have been used in sweeping surfaces to describe human shapes [21]. Surface generation from cross-sections is used in many applications, especially in medical visualization. Some illustrative examples include human body 3D visualization with 2D computed tomography (CT) slices [22] or magnetic resonance imaging (MRI) data [23]. Different methods have been developed to reconstruct 3D models or surfaces from cross sections or point clouds [24][25][26][27]. A method for modeling and deforming the human arm and leg by using cross section ellipses and displacement diagrams is proposed in [28]. Another method dealing with curve networks of arbitrary shape and arbitrary topology with arbitrary direction about non-parallel cross sections is reported in [29]. Barton et al. [30] presented an approach to detect if a surface can be represented by the sweeping of a planar profile or not. It shows applications in functional architectural design. Kovács and Várady [31] proposed an algorithm to detect and reconstruct the profile curves from the property that they are principal curvature lines. Barton et al. [32] studied the evolution of an arc spline curve which constitutes an effective discretization of smooth curves.Recently an analytical mathematical representation of cross section curves including generalized ellipses, generalized elliptic curves and composite generalized elliptic segments was proposed, and surfaces were reconstructed from the curves in [33]. Figure 2 shows the overall algorithm of our proposed approach. It consists of two steps: curve fitting and the creation of C 2 continuous PDE surfaces.

Algorithm Overview
Before curve fitting, cross section curves of 3D models are created. Four different methods can be used to generate cross section curves. The first method is to manually draw cross section curves by artists or modelers. The second method is to extract the contour of computed tomography slices. The third method is to slice 3D surface models and obtain 2D cross section curves. And the last method is to reconstruct cross section curves from point clouds.
Therefore, the PDE modeling method can obtain continuous smooth surfaces without manual work to stitch adjacent patches together.
Elliptic cross sections have been used in sweeping surfaces to describe human shapes [21]. Surface generation from cross-sections is used in many applications, especially in medical visualization. Some illustrative examples include human body 3D visualization with 2D computed tomography (CT) slices [22] or magnetic resonance imaging (MRI) data [23]. Different methods have been developed to reconstruct 3D models or surfaces from cross sections or point clouds [24][25][26][27]. A method for modeling and deforming the human arm and leg by using cross section ellipses and displacement diagrams is proposed in [28]. Another method dealing with curve networks of arbitrary shape and arbitrary topology with arbitrary direction about non-parallel cross sections is reported in [29]. Barton et al. [30] presented an approach to detect if a surface can be represented by the sweeping of a planar profile or not. It shows applications in functional architectural design. Kovács and Várady [31] proposed an algorithm to detect and reconstruct the profile curves from the property that they are principal curvature lines. Barton et al. [32] studied the evolution of an arc spline curve which constitutes an effective discretization of smooth curves.Recently an analytical mathematical representation of cross section curves including generalized ellipses, generalized elliptic curves and composite generalized elliptic segments was proposed, and surfaces were reconstructed from the curves in [33]. Figure 2 shows the overall algorithm of our proposed approach. It consists of two steps: curve fitting and the creation of continuous PDE surfaces. Before curve fitting, cross section curves of 3D models are created. Four different methods can be used to generate cross section curves. The first method is to manually draw cross section curves by artists or modelers. The second method is to extract the contour of computed tomography slices. The third method is to slice 3D surface models and obtain 2D cross section curves. And the last method is to reconstruct cross section curves from point clouds. In the first step, i.e., curve fitting, we use generalized elliptic curves to approximate and reconstruct each of the cross section curves. Then these cross section curves are changed into an analytical mathematical expression with few undetermined constants. We call it a generalized elliptic curve. Through this simple procedure, we can get some smooth curves as well as achieve an adequate trade-off between the approximation errors In the first step, i.e., curve fitting, we use generalized elliptic curves to approximate and reconstruct each of the cross section curves. Then these cross section curves are changed into an analytical mathematical expression with few undetermined constants. We call it a generalized elliptic curve. Through this simple procedure, we can get some smooth curves as well as achieve an adequate trade-off between the approximation errors and the amount of data required to approximate cross section curves. It works well on complicated curvebased models with smooth cross-sections. In other words, the ground truth closed curves are defined by few coefficients involved in the mathematical expression of generalized elliptic curves, which will be used in the following processes.

Algorithm Overview
In the second step, C 2 continuous PDE surface patches are constructed from generalized elliptic curves obtained in the previous step. A vector-valued sixth-order partial differential equation is proposed for this purpose and an accurate closed form solution is obtained from the vector-valued sixth-order partial differential equation, which is used to interpolate the generalized elliptic curves. The interpolation operation generates a PDE surface patch. Since two adjacent PDE surface patches share three same cross section curves or share the same curve, first partial derivatives, and the second partial derivatives on their joint boundary, C 2 continuity between two adjacent PDE surface patches is naturally achieved. Figure 3 shows the first step of the algorithm. In the figure, the ground truth curves are highlighted in blue, the generalized elliptic curves defined by Equation (1) below are in red, and n indicates the number of Fourier series terms in Equation (1). First, we use the cross-section curves of a 3D model as input. For each ground truth cross-section curve (blue), we use a generalized elliptic curve (red) to fit it. The mathematical expression of generalized elliptic curves is given in Equation (1). In doing so, the ground truth curves are now defined by the few coefficients involved in the mathematical expression of the generalized elliptic curves.

Curve Fitting
Mathematics 2022, 10, x FOR PEER REVIEW 4 of 20 and the amount of data required to approximate cross section curves. It works well on complicated curve-based models with smooth cross-sections. In other words, the ground truth closed curves are defined by few coefficients involved in the mathematical expression of generalized elliptic curves, which will be used in the following processes.
In the second step, continuous PDE surface patches are constructed from generalized elliptic curves obtained in the previous step. A vector-valued sixth-order partial differential equation is proposed for this purpose and an accurate closed form solution is obtained from the vector-valued sixth-order partial differential equation, which is used to interpolate the generalized elliptic curves. The interpolation operation generates a PDE surface patch. Since two adjacent PDE surface patches share three same cross section curves or share the same curve, first partial derivatives, and the second partial derivatives on their joint boundary, continuity between two adjacent PDE surface patches is naturally achieved. Figure 3 shows the first step of the algorithm. In the figure, the ground truth curves are highlighted in blue, the generalized elliptic curves defined by Equation (1) below are in red, and indicates the number of Fourier series terms in Equation (1). First, we use the cross-section curves of a 3D model as input. For each ground truth cross-section curve (blue), we use a generalized elliptic curve (red) to fit it. The mathematical expression of generalized elliptic curves is given in Equation (1). In doing so, the ground truth curves are now defined by the few coefficients involved in the mathematical expression of the generalized elliptic curves. The figure above shows that the blue ground truth curves are approximated by the red generalized elliptic curves very well and the errors between them are very small. When = 1, large differences between the ground truth curves and the generalized elliptic curves can be seen. When increases, the differences become smaller and smaller. When = 10, visiable differences between the ground truth curves and the generalized elliptic curves disappear. The figure above shows that the blue ground truth curves are approximated by the red generalized elliptic curves very well and the errors between them are very small. When n = 1, large differences between the ground truth curves and the generalized elliptic curves can be seen. When n increases, the differences become smaller and smaller. When n = 10, visiable differences between the ground truth curves and the generalized elliptic curves disappear.

Curve Fitting
Good fitting accuracy is also demonstrated by the data given in Table 1. When n = 1, the average and maximum errors are 0.044169 and 0.065371, respectively. When n is raised to 7, they are reduced to 0.001767 and 0.005312, which are small. When the terms are further increased, the errors will be reduced further. They indicate that by using different terms in Equation (1), the fitting accuracy can be controlled and ground truth curves can be approximated accurately by generalized elliptic curves. Because there are no sharp points in organic shapes like a human body, through this process we can get smooth curves and eliminate input sharp points if they exist. By doing so, we can also fix errors in an artist's drawn models and improve the final results. The mathematical expression of generalized elliptic curves can be written as where 0 ≤ v ≤ 2π, a xn and a yn (n = 0, 1, 2, 3, · · · , N) are undetermined constants, which are determined by using Equation (1) to fit cross section curves represented with discrete points. As shown in Equation (1), the parameter N could be set to different numbers in order to get different resolutions and degree of approximation.

Creation of C 2 Continuous PDE Surfaces
According to [32], "there is no restriction upon the type and order of the PDE to be solved" and "elliptic PDEs have been chosen to develop this technique since this kind of PDE is regarded as an averaging process throughout the entire surface". In this paper, an elliptic PDE will be introduced to develop a 3D modelling method.
When a C 2 continuous PDE surface patch is created from known boundary conditions on two boundaries, it should satisfy the position functions and the first and second partial derivatives on the two boundaries. Therefore, there are six boundary conditions in total. It is known that the closed form solution of a sixth-order partial differential equation involves six undetermined constants which can be used to exactly satisfy the six boundary conditions. Therefore, in order to achieve C 2 continuity between two adjacent PDE surface patches, the following vector-value sixth-order partial differential equation is proposed to define PDE surface patches: According to the above Equation (1), the solution to the partial differential Equation (2) can be taken to be: In the above Equations (3)-(5), the undetermined functions A w0 (u) (w = x, y, z) and A wn (u) and B wn (u) (w = x, y, z; n = 1, 2, 3, . . . , N) are derived in Appendix A, which can be written as Equations (6), (7), and (8) below, respectively.
Twelve curves shown in Figure 3 are used to demonstrate how to reconstruct three PDE surface patches with C 2 continuity. The mathematical equations for 12 curves C 1 − C 12 are: As shown in Figure 4, the six curves C 4 − C 9 are used to construct the first PDE surface patch (Patch 1). Then, two different methods are used to construct PDE surface patch 2 and patch 3 with C 2 continuity. For curve C 4 , u = 0 of Patch 1 is the same as u = 1 of Patch 2. Similarly, for curve C 9 , u = 1 of Patch 1 is the same as u = 0 of Patch 3. Curve C 1 is at u = 0 of Patch 2 and C 12 is at u = 1 of Patch 3.
The first method uses the six curves C 4 − C 9 to construct the PDE surface patch 1, the curves C 1 − C 6 to construct the PDE surface patch 2, and the six curves C 7 − C 12 to construct the PDE surface patch 3. With this construction method, the patch 1 and patch 2 at the curve C 4 and the patch 1 and patch 3 at the curve C 9 achieve up to C 2 continuity.
Substituting u = 1 into Equations (10)- (13), we obtain the first and second partial derivatives of the PDE surface patch 3 at u = 0. They together with the curves C 9 − C 12 are used to construct the PDE surface patch 3.

PDE Surface Patch 1 Creation
The six curves C 4 − C 9 for Patch 1 are at u = 0, u = 0.2, u = 0.4, u = 0.6, u = 0.8, and u = 1. At these positions, the PDE surface patch 1 passes through the six curves, which gives six equations for x component, y component, and z component.
For the middle PDE surface patch 1, we introduce the superscript P1 into Equations (3)-(5) and change them into: The middle PDE surface patch 1 is created from 6 curves C 4 − C 9 . The PDE surface Patch 1 passes through the Curves C 4 − C 9 , which gives the following equations.

Creation of PDE Surface Patch 2
Two methods can be used to create the bottom PDE surface patch 2. The first method uses the six curves C 1 − C 6 to create the PDE surface patch 2, and the second method uses the curves C 1 − C 4 and the first and second partial derivatives of the PDE surface patch 1 at the curve C 4 . For creation of the bottom PDE surface patch 2 from 6 curves C 1 − C 6 , the three curves C 4 − C 6 are shared by both PDE surface Patches 1 and 2 to ensure C 2 continuity on the curve C 4 .
With the second method, the PDE surface patch 2 shares the same first and second partial derivatives with the PDE surface patch 1 on the curve C 4 , and the PDE surface patch 2 passes through the curves C 1 − C 4 . According to these requirements, we obtain the following equations: The undetermined functions A P2 w0 (u) (w = x, y, z) and A P2 wn (u) and B P2 wn (u) (w = x, y; n = 1, 2, 3, . . . , N) involved in Equation (26) are determined by solving Equations (24) and (25). The details of solving Equations (24) and (25) are given in Appendix B.

Creation of PDE Surface Patch 3
With the same method as creating PDE surface patch 2, we can create PDE surface patch 3, which can be written as the following equations.

Results
The above method and corresponding mathematical equations have been implemented using C++. The implemented computer program consists of two parts. The first part determines the coefficients involved in Equation (1) by fitting it to cross section curves, and the second part determines the undetermined coefficients a P1 w0,i (w = x, y, z; i = 0, 1, 2, 3, 4, 5) and a P1 wn,i and b P1 wn,i (w = x, y; n = 1, 2, 3, . . . , N; i = 0, 1, 2, 3, 4, 5) for the PDE surface patch 1, a P2 w0,i (w = x, y, z; i = 0, 1, 2, 3, 4, 5) and a P2 wn,i and b P2 wn,i (w = x, y; n = 1, 2, 3, . . . , N; i = 0, 1, 2, 3, 4, 5) for the PDE surface patch 2, and a P3 w0,i (w = x, y, z; i = 0, 1, 2, 3, 4, 5) and a P3 wn,i and b P3 wn,i (w = x, y; n = 1, 2, 3, . . . , N; i = 0, 1, 2, 3, 4, 5) for the PDE surface patch 3. Figure 5 gives an example of creating the parts of shoulder, body, left arm and leg with the above obtained PDE surface patches.  Figure 6 shows the cross section curves of the human body and the reconstructed human body in front and side views. The reconstructed and rendered human body models show that our method can obtain smooth models without any manual operations to stitch adjacent patches together.  Figure 7 shows smooth models of a vase, a horse belly, elephant front legs, and an elephant nose generated from vertical or horizontal cross section curves by using the method proposed in this paper.  Figure 6 shows the cross section curves of the human body and the reconstructed human body in front and side views. The reconstructed and rendered human body models show that our method can obtain smooth models without any manual operations to stitch adjacent patches together.  Figure 6 shows the cross section curves of the human body and the reconstruc human body in front and side views. The reconstructed and rendered human body m els show that our method can obtain smooth models without any manual operation stitch adjacent patches together.  Figure 7 shows smooth models of a vase, a horse belly, elephant front legs, and elephant nose generated from vertical or horizontal cross section curves by using method proposed in this paper.  Figure 7 shows smooth models of a vase, a horse belly, elephant front legs, and an elephant nose generated from vertical or horizontal cross section curves by using the method proposed in this paper. Figure 6. The cross section curves of the human body and the created human body model in front and side views using continues PDE method. Figure 7 shows smooth models of a vase, a horse belly, elephant front legs, and an elephant nose generated from vertical or horizontal cross section curves by using the method proposed in this paper.

Conclusions
We have developed a PDE-based modelling method to create 3D models in this paper. Fourier series have been used to define generalized elliptic curves which can approximate ground-truth cross section curves with few coefficients and high accuracy. A vector-valued sixth-order partial differential equation has been proposed to construct 3D models from cross section curves and achieve C 2 continuity between two adjacent PDE surface patches. The accurate closed form solution to the vector-valued sixth-order partial differential equations has been derived, and the undetermined constants involved in the closed form solution have been determined by interpolating cross section curves while keeping C 2 continuity between two adjacent PDE surface patches. A number of examples have been presented to demonstrate the application of the proposed method in creating 3D models from cross section curves.
With the help of the physics-based analytical mathematical solution, a very complicated cross section curve can be represented with few variables. Compared with the polygon modeling, the proposed approach generates complicated and smooth surface models with fewer design variables and requires less hardware storage. In comparison with NURBS modeling, the proposed method has no continuous problem between different patches, which leads to the advantages of saving manual operations and reducing geometric modelling workload and time.
Moreover, the presented examples show that our method is accurate and effective in creating a 3D surface model from cross section curves. Because of fewer variables and analytical mathematical expression, the proposed approach is applicable to many applications involving heavy calculations such as machine learning-based shape reconstruction and computer animation and situations such as level of detail where different resolutions of a geometric model are used for different visual requirements.
The limitation of our method is additional processing of 3D models with more than one branch. For this situation, 3D models are segmented into parts. Each part is created with the method proposed in this paper. When two adjacent part models cannot be directly connected together, a transition surface is created to connect the two adjacent part models together. The transition surface is defined by two boundary curves respectively on the adjacent part models and the continuity requirements on the two boundary curves. The blending method proposed in [33] can be used to create the transition surface, which smoothly connects the two adjacent part models together with C 2 continuity.
Our work opens up several directions for future work. The first direction is input data processing. Although the method of reconstructing cross section curves from point clouds is mentioned in Section 3, how to obtain reconstructed cross section curves has not been discussed in this paper. In our following work, we will develop a new method to reconstruct Fourier series-represented cross section curves from point clouds.
The second direction is to extend the proposed method to more modelling applications of organic models and smooth man-made models. These organic models and smooth manmade models include non-human animals such as horses, bell peppers, vases, mountain contours, and streamlined aircrafts, trains and cars. We will investigate these modelling applications in our following work.
This paper discusses 3D modelling based on cross section curves. Actually, the method proposed in this paper can be extended to deal with spatial curves. In this case, the position component z is also the function of the parametric variables u and v. The undetermined constants involved in the z component function can be determined with the same method as the one used to determine the undetermined constants involved in the x and y component functions.

Conflicts of Interest:
The authors declare that they have no conflict of interest.

Appendix B. Determination of the Undetermined Functions B
In order to determine the undetermined functions A P2 w0 (u) (w = x, y, z) and A P2 wn (u) and B P2 wn (u) (w = x, y; n = 1, 2, 3, . . . , N), we first calculate the first and second partial derivatives of the PDE surface patch 1 at u = 0, i.e., on the curve C 4 .
Substituting Equations (14) and (26) into Equation (24), we obtain the following equations describing the continuity of the first and second partial derivatives.