1 Introduction

Surface modeling is widely applied in creative and industrial sectors to produce 3D geometric models. Current mainstream surface modeling techniques are polygon [1], non-uniform rational B-splines (NURBS) [2] and subdivision [3]. These modeling techniques have been integrated into high-end geometric modeling systems such as Maya, Houdini and 3D Max. All of the three mainstream modeling approaches are purely geometric, which means that no extra constraint forces called sculpting forces are used in creation and manipulation of surface shapes.

Polygon and subdivision modeling techniques are surface vertex-based. They use planar facets to approximate curved surfaces of 3D objects. To represent curved surfaces and create detailed 3D models, a large number of planar facets defined by vertices (design variables) are required, which cause big data, high storage costs, slow network transmissions and heavy manual operations to manipulate the vertices. NURBS modeling is control point-based. It also involves many design variables and requires extra manual operations to stitch adjacent NURBS surfaces together with required continuities and add control points to interactively manipulate NURBS surfaces in small deformation regions. Boundary-based surface creation generates surfaces from boundary curves or boundary curves and tangents (normal derivative functions on boundary curves). The main representative methods are bilinear Coons surfaces and bicubic Coons surfaces [2]. Unfortunately, both of them have the weak ability in creating and manipulating shapes of surfaces because they cannot change the shape in arbitrarily specified local regions.

Partial differential equations (PDEs) were introduced into geometric modeling about 3 decades ago to develop PDE-based geometric modeling. Before that, they had already been applied in engineering and scientific calculations to describe the underlying physics. For example, a fourth-order PDE can be used to describe the underlying physics of bending deformations of a thin elastic plate subjected to lateral loads, and a wave equation, which is a second-order PDE, can be used to describe the underlying physics of transverse vibrations of a tensed string [4]. Due to this nature, PDE-based geometric modeling is physics based, has the potential to create more realistic appearances of 3D models and 3D deformations, and addresses the weaknesses of purely geometric modeling.

PDE-based modeling uses the solution to a vector-valued PDE subjected to user’s specified boundary conditions to create a PDE patch. Like the term on the right-hand side of a fourth-order PDE describing bending deformations of a thin elastic plate, which is a lateral force acting on the plate, the term on the right-hand side of an arbitrary vector-valued PDE used for geometric modeling acts as a sculpting force. It and the coefficients of all the terms on the left-hand side of a vector-valued PDE called shape control parameters greatly affect the shape of a PDE patch and provide flexible and powerful shape manipulation handles.

Since PDE surface patches are defined by the solution to a PDE subjected to exact satisfaction of boundary conditions, adjacent PDE patches automatically achieve required continuities on shared boundaries defined in boundary conditions. Compared with polygon, NURBS and Coons surface modeling techniques, PDE-based modeling only requires boundary information and few coefficients in a vector-valued PDE to define complicated 3D models leading to fewer design variables, naturally achieves specified continuities without any manual operations to stitch two PDE patches together, and uses a sculpting force to create various shapes in any deformation regions more easily and flexibly.

However, due to the difficulty in analytically solving PDEs, existing tools of manipulating sculpting forces are mainly developed from an analytical solution to a vector-valued PDE for simple 2-sided PDE patches [5] or from a numerical solution for complicated 3D models [6]. Various numerical methods such as the finite-element method [7,8,9], finite-difference method [10, 11], and direct discretization of polygonal models using a discrete Laplace operator [12, 13] have been proposed to solve PDEs for hybrid subdivision surface design [14], surface reconstruction [13], estimation of surface normal [12], smoothing arbitrary triangle meshes [15], surface modeling [7], direct shape manipulation [6], and engineering optimization applications [16, 17].

When using PDE-based modeling to create new 3D models from scratch, 3D models are decomposed into some 2-, 3-, and 4-sided PDE patches. For creating 3D models from PDE patches, numerical solutions of PDEs have three weaknesses. (1) The analytical functions of the boundary constraints for a 3- or 4-sided surface patch cannot be exactly satisfied since numerical methods obtain the solutions at discrete points. (2) Numerical methods such as the finite-element and finite-difference methods involve heavy computations, and may not be ideal in interactive geometric modeling or real-time shape manipulations. (3) Numerical methods are needed to obtain coordinate values at many discrete nodes or vertices. Each node or vertex is a vector-valued design variable consisting of 3 components. Therefore, numerical methods will lead to many design variables and high storage costs, and it is essential to develop analytical solutions for PDE patches and interactive user interface from analytical PDE patches for releasing the potential of PDE-based geometric modeling.

Since analytical solutions of 3- and 4-sided PDE patches are very difficult to obtain, the existing research studies on analytical PDE surfaces focus on 2-sided PDE patches, i.e., creating a PDE patch from boundary conditions on two opposite boundaries. Various accurate and approximate analytical solutions of 2-sided PDE patches have been developed [5, 18,19,20,21,22,23,24,25,26]. Using analytical 2-sided PDE patches only is not applicable to all 3D modeling tasks. For example, 2-sided PDE patches are incapable in creating branched models. Here, a branched model is a 3D model with branching structures that are connected to but not part of the central body of the model, such as the trunk of a tree with branches and a human body with limbs. To release the potential of PDE-based geometric modeling, analytical 3- and 4-sided patches with different continuity requirements and powerful shape manipulation functions should be developed. Due to the limit of space, in this paper, we will propose the first analytical \(C^0\) continuous 4-sided PDE patches, investigate how to integrate shape control parameters and sculpting forces into the analytical \(C^0\) continuous 4-sided PDE patches, and develop an interactive interface to facilitate 3D model creation and manipulation from the analytical \(C^0\) continuous 4-sided PDE patches. The development of analytical \(C^n\) continuous 3- and 4-sided PDE patches and demonstration of sculpting forces in creating the deformations in the regions bounded by complicated boundary curves will be our following work.

The contributions of this paper are: (1) obtaining the first analytical \(C^0\) continuous 4-sided PDE patches to create complicated 3D models and release the potential of PDE-based geometric modeling, (2) integrating shape control parameters and sculpting forces into analytical \(C^0\) continuous 4-sided PDE patches to achieve flexible and powerful shape creation and deformations, (3) proposing vertex-frames consisting of eight boundary vertices to represent boundary conditions for PDE patches, reduce design variables and data size of PDE-based geometric modeling, and facilitate the development of the analytical \(C^0\) continuous 4-sided PDE patches, (4) investigating a vertex frame-based modeling technique to quickly create 3D models with positional continuity by filling vertex-frames with the analytical 4-sided PDE patches, and (5) developing a user-friendly interface, which enables users to interactively input and modify vertex-frames, create 3D surface models, and manipulate shapes of the created 3D models.

The remaining parts of this paper are organized as follows. The related works on purely geometric modeling approaches and PDE-based modeling methods are briefly reviewed in Sect. 2. Analytical \(C^0\) continuous 4-sided PDE patches are investigated in Sect. 3. The results and comparisons with polygon, NURBS, and Coons surfaces are given in Sect. 4. Interactive design of 3D modeling is developed in Sect. 5. Finally, conclusions and future work are discussed in Sect. 6.

2 Related work

The work presented in this paper is related to purely geometric modeling techniques and PDE-based geometric modeling. In this section, we first briefly introduce polygon modeling, subdivision, and patch-based modeling in relation to the proposed method, and then review existing work on PDE-based geometric modeling.

2.1 Purely geometric modeling techniques

Purely geometric modeling techniques include polygon, subdivision, and patch surfaces such as NURBS and Coons surfaces. Among them, polygon, subdivision, and NURBS have become industrial standard being integrated in many commercial software packages.

Polygon modeling [1] can produce detailed or branched models, assign uv texture coordinates, and create hard edges more readily than NURBS modeling. However, polygons are incapable of accurately representing curved surfaces. Therefore, a large number of polygons must be generated to approximate curved surfaces in a visually appealing manner, leading to heavy manual operations, a large number of design variables, high storage costs, and slow network transmissions. Subdivision modeling [3, 27] starts the modeling with a coarse polygonal model, subdivides its polygonal faces into smaller faces through approximating or interpolating schemes, and generates a denser polygon mesh of the model. Subdivision makes the modeling of complex geometry easier and rendering more efficient, but has the same weaknesses as polygon modeling.

The typical patch surfaces are NURBS surfaces [2]. Patch surface-based modeling starts from a single NURBS patch and obtains the whole model by manually stitching many patches together [28] to deal with the continuity problem between different patches, leading to heavy manual operations. In addition, this modeling method is control point-based. Although it has fewer design variables than polygon modeling and subdivision, many control points are still required to create complicated 3D models. Unlike NURBS surfaces, which are control point-based, Coons surfaces are boundary-based. A bilinear Coons surface [29] is constructed from four boundary curves, and a bicubic Coons surface [30] is constructed from four boundary curves and four normal derivative functions on the four boundary curves. Coons surfaces are easy to use, and involve fewer design variables than NURBS surfaces since they only involve boundary information. However, bilinear Coons surfaces are not adjustable if boundary curves are not changed. Although the shapes of bicubic Coons surfaces can be manipulated by changing the normal derivative functions on boundary curves, such shape manipulations are not flexible and powerful.

Polygon, NURBS and subdivision involve heavy manual operations and large data. Coons surfaces have small data but are weak in shape manipulation. The PDE-based modeling method will develop analytical 4-sided PDE patches and vertex frame-based 3D model creation to reduce large data and heavy manual operations, and introduce shape control parameters and sculpting forces to obtain flexible and powerful shape manipulations.

2.2 PDE-based geometric modeling

PDEs were introduced in geometric modeling by Bloor and Wilson about three decades ago [22]. After that, PDE-based geometric modeling attracts a lot of research attention. Various numerical, accurate analytical and approximate analytical solutions have been developed to promote their applications. Since the biggest problem for PDE-based geometric modeling is how to solve PDEs, we briefly review existing numerical methods, accurate analytical methods, and approximate analytical methods used to solve PDEs for geometric modeling applications.

2.2.1 Numerical methods

Numerical methods are the most effective in solving PDEs for geometric modeling applications. Popular numerical methods are the finite element method, finite difference method, and direct discretization of polygonal models using a discrete Laplace-Beltrami operator. Since there are many publications on numerical PDE-based geometric modeling, it is impossible to review all of them. In what follows, only some of them are reviewed.

A B-spline finite element method was proposed in [8] and used to approximate PDE surfaces. A bivariant B-spline finite element method was developed in [7] and applied to tackle dynamic PDE surface modeling. By considering Laplacian and Laplacian gradient energies leading to biharmonic and triharmonic equations, respectively, and viewing the discretization of biharmonic and triharmonic equations as a transformation of a mixed element discretization, a mixed finite element method was investigated in [9] to solve the biharmonic and triharmonic equations and address variational surface modeling. Through presenting a novel technique to evaluate the finite element basis functions and coupling the finite element method with a hybrid loop and Catmull-Clark subdivision algorithm, a numerical simulation method was examined in [14] for hybrid subdivision surface design using geometric PDEs.

By solving an Euler–Lagrange equation with the finite difference method, the smoothing properties were achieved by reducing the amplitude of various high-frequency Fourier harmonics in surfaces [31]. Using the finite difference method to discretize a general sixth-order geometric PDE, the problems of surface processing and modeling including creation of high order continuous surfaces are efficiently solved in [10]. Employing the finite-difference discretization and variational interpolating approach with the localized iterative solver, an implicit fourth-order PDE and an implicit second-order PDE were numerically integrated in [11] to achieve shape design of solid models.

Using the umbrella operator to linearly approximate the Laplacian operator at each vertex of polygon models and numerically integrating a diffusion equation involving the Laplacian and the second Laplacian, rough features from irregularly data are rapidly removed to portray a smooth surface [32]. To smooth arbitrary triangle meshes while satisfying \(G^1\) boundary conditions, a new algorithm was presented in [15] to numerically solve a PDE with the discrete Laplace–Beltrami operator and 1-neighborhood based discretization of the mean curvature normal at a vertex. The discrete Laplace–Beltrami operator was also used to estimate surface normal in [12] and perform surface reconstruction in [13].

2.2.2 Accurate analytical methods

Accurate analytical methods exactly satisfy both PDEs and boundary conditions. It is very difficult or even impossible to obtain accurate analytical solutions of PDEs when boundary conditions are complicated. Therefore, the existing work only developed accurate analytical solutions for 2-sided PDE patches subjected to some simple boundary conditions. Treating blending design as a boundary value problem and considering some simple boundary functions, the accurate analytical solutions for x and y components were obtained from a second-order PDE and the accurate analytical solution for z component was obtained from a fourth-order PDE to create parametric surfaces [33]. For primary surfaces represented with a combination of hyperbolic sine and cosine functions, some accurate analytical solutions were presented to blend the primary surfaces together in [22]. By mapping a unit cube in (uvw) parameter space to a hexahedral solid in physical space, the accurate analytical solutions to a second-order PDE with three parametric variables were obtained in [34] to investigate the functionality in solids. The accurate closed form solutions for the boundary conditions represented with triangular functions are investigated in [5] for vase design.

2.2.3 Approximate analytical methods

Approximate analytical solutions cannot exactly satisfy both PDEs and boundary conditions. Existing approximate analytical solutions exactly satisfy boundary conditions, but only minimize the error of PDEs. Fourier series-based approximate analytical solution was proposed in [18] to generate free-form surfaces for the design of hull of yacht-like boat, propeller blade, phone handset, and ship hull. The Fourier series-based approximate analytical solution was used to solve a fourth-order PDE for the interactive surface design in [20] and parametric design of aircraft geometry in [21]. It was also extended to obtain an approximate analytical solution to a sixth-order PDE for surface modeling in [25]. An approximate analytical solution using a sculpting force originating from elastic bending of thin plates was developed to solve a fourth-order PDE for physics-based deformations in [35]. A weighted residual method was presented to approximately solve a time-dependent fourth-order PDE for creation of deformable moving surfaces in [24], a time-independent fourth-order PDE in [23] for \(C^1\) continuous surface blending, and a time-independent sixth-order PDE for surface modeling in [19] and \(C^2\) continuous surface blending in [26].

Numerical methods are the most effective in solving various PDEs but with discrete representations, big data, and high computational costs. Accurate analytical solutions are only applicable to some simple surface modeling tasks. And existing approximate analytical solutions can deal with more complicated surface modeling than accurate analytical solutions, but most studies focus on 2-sided PDE patches. How to develop explicit representations of analytical 4-sided PDE patches has not been well investigated.

3 Continuous and sculpting force-driven 4-sided PDE patches

In this section, we develop the first analytical 4-sided PDE patches, which not only maintain \(C^0\) continuity on curved boundaries but also involve shape control parameters and sculpting forces to achieve flexible and powerful shape manipulations. In what follows, we first introduce the mathematical model of the 4-sided PDE patches that consists of a vector-valued second-order nonhomogeneous PDE and \(C^0\) continuous boundary conditions in Subsection 3.1. Since the general solution of a vector-valued second-order nonhomogeneous PDE consists of a general solution of the corresponding homogeneous PDE and a particular solution satisfying the nonhomogeneous PDE, we will investigate the general solution of the corresponding homogeneous PDE in Subsection 3.2, and the particular solution in Subsection 3.3.

3.1 PDE-based mathematical model

A vector-valued second-order PDE is easier to solve analytically than higher order PDEs. It provides enough degrees of freedom to satisfy the conditions of \(C^0\) continuity between adjacent patches. For the 4-sided PDE patches to have flexible and powerful shape manipulation functions, we also introduce a vector-valued sculpting force function to the right-hand side of the PDE. Based on these considerations, the PDE used to develop analytical 4-sided PDE surfaces takes the form of

$$\begin{aligned} \varvec{a}_\mathbf{1} \frac{\partial ^2\varvec{S}(u,v)}{\partial u^2}+ \varvec{a}_\mathbf{2} \frac{\partial ^2 \varvec{S}(u,v)}{\partial v^2}=\varvec{F}(u,v), \end{aligned}$$
(1)

where \(\varvec{S}(u,v)=[x(u,v)\ y(u,v)\ z(u,v)]^{T}\) represents a 4-sided PDE surface patch, \(\varvec{a}_\mathbf{1}\) and \(\varvec{a}_\mathbf{2}\) are vector-valued shape control parameters, u and v are the parametric variables defined by \(0\le u\le 1\) and \(0\le v\le 1\), and \(\varvec{F}(u,v)\) = \([f_{x}(u,v)\) \(f_{y}(u,v)\) \(f_{z}(u,v)]^{T}\) are vector-valued sculpting forces.

A 4-sided patch \(\varvec{S}(u,v)\) has four boundaries. If the boundary curves on the four boundaries are: \(\varvec{\alpha }(u)\),\(\varvec{\beta }(u)\), \(\varvec{\gamma }(v)\), and \(\varvec{\delta }(v)\), respectively, the 4-sided patch \(\varvec{S}(u,v)\) at its four boundaries \(u=0\), \(u=1\), \(v=0\), and \(v=1\) should have the same curve functions as the four boundary curves, which leads to the following boundary conditions:

$$\begin{aligned} \begin{aligned} \varvec{S}(u,0)&=\varvec{\alpha }(u), \varvec{S}(u,1)=\varvec{\beta }(u)\ \forall u\in [0,1]\\ \varvec{S}(0,v)&=\varvec{\gamma }(v), \varvec{S}(1,v)=\varvec{\delta }(v)\ \forall v\in [0,1]. \end{aligned} \end{aligned}$$
(2)

The mathematical model of our proposed 4-sided patches is defined by the vector-valued second-order PDE (1) and the \(C^0\) continuous boundary conditions (2). The remaining work is how to derive the analytical solution of the mathematical model.

3.2 General solution of second-order homogeneous PDE

When deriving the general solution \(\varvec{S}_{h}(u,v)\) of the homogeneous PDE of Eq. (1), the right-hand side term is zero. We obtain

$$\begin{aligned} \varvec{a}_\mathbf{1} \frac{\partial ^2\varvec{S}_{h}(u,v)}{\partial u^2}+ \varvec{a}_\mathbf{2} \frac{\partial ^2 \varvec{S}_{h}(u,v)}{\partial v^2}=0. \end{aligned}$$
(3)

The surface function of the 4-sided patches should exactly satisfy the positional continuous boundary conditions (2), have some degrees of freedom to minimize the error of the PDE (3), and introduce shape control parameters to manipulate the shape of 4-sided patches. Taking these into account, the vector-valued surface function of the 4-sided patches is taken to be

$$\begin{aligned} \begin{aligned} \varvec{S}_{h}(u,v)=C^{(0)}+C^{(1)}u+C^{(2)}u^2+C^{(3)}u^3+C^{(4)}v+\\ C^{(5)}v^2+C^{(6)}v^3+C^{(7)}uv+C^{(8)}u^{2}v+C^{(9)}uv^{2}, \end{aligned} \end{aligned}$$
(4)

where \(C^{(i)}\) (\(i=0,1,...,9\)) are the vector-valued unknown constants to be explicitly determined below.

We introduce vertex-frames to define four boundary curves for reducing design variables. As shown in Fig. 1a, a vertex-frame consists of eight vertices: four corner vertices \(P^{(1)}\), \(P^{(3)}\), \(P^{(5)}\), \(P^{(7)}\), and four middle vertices \(P^{(2)}\), \(P^{(4)}\), \(P^{(6)}\), \(P^{(8)}\), and each of the four boundary curves is defined by three vertices of a vertex-frame. According to Eq. (2), the four corner vertices and the four middle vertices are related to the four boundary curves through \(P^{(1)}=\varvec{\alpha }(0)\), \(P^{(2)}=\varvec{\alpha }(0.5)\), \(P^{(3)}=\varvec{\alpha }(1)\), \(P^{(4)}=\varvec{\delta }(0.5)\), \(P^{(5)}=\varvec{\delta }(1)\), \(P^{(6)}=\varvec{\beta }(0.5)\), \(P^{(7)}=\varvec{\beta }(0)\), and \(P^{(8)}=\varvec{\gamma }(0.5)\). If a PDE patch \(\varvec{S}_{h}(u,v)\) shown in Fig. 1b is generated from the vertex-frame, its four corner vertices and four middle vertices are \(V^{(1)}=\varvec{S}_{h}(0,0)\), \(V^{(2)}=\varvec{S}_{h}(0.5,0)\), \(V^{(3)}=\varvec{S}_{h}(1,0)\), \(V^{(4)}=\varvec{S}_{h}(1,0.5)\), \(V^{(5)}=\varvec{S}_{h}(1,1)\), \(V^{(6)}=\varvec{S}_{h}(0.5,1)\), \(V^{(7)}=\varvec{S}_{h}(0,1)\), and \(V^{(8)}=\varvec{S}_{h}(0,0.5)\). Since the eight curve vertices and the eight surface vertices indicate the same vertices, we have \(V^{(k)}= P^{(k)}\) \((k=1,2,...,8)\).

Fig. 1
figure 1

The vertex-frame (a) and the generated PDE patch (b)

For the sake of conciseness, the subscript “h” in the patch function \(\varvec{S}_{h}(u,v)\) is omitted in the remaining part of this subsection and the next subsection when more than one subscript is involved. That is to say, we use \(S_{i,j}\) to stand for \(S_{hi,j}\).

To use 4-sided PDE patches to create complicated 3D models, three different groups of 4-sided PDE patches are identified in Fig. 2. The first group contains only a single patch \(S_{i,j}\), which is created first. The second group has four patches \(S_{i-1,j}\), \(S_{i,j+1}\), \(S_{i+1,j}\), and \(S_{i,j-1}\). Each of the four patches shares an edge highlighted in red with the patch \(S_{i,j}\). The third group also has four patches \(S_{i-1,j-1}\), \(S_{i-1,j+1}\), \(S_{i+1,j+1}\), and \(S_{i+1,j-1}\). Each of them shares two edges highlighted in blue with its two adjacent patches. Generating these patches must follow the specified rule and direction. In the following subsection, we first introduce the patch generation rule, and then discuss the patch direction.

Fig. 2
figure 2

PDE surface patches with vertex-frames

3.2.1 Patch generation rule

Since the patch function \(\varvec{S}_{h}(u,v)\) is not the accurate solution of the PDE (3), substituting \(\varvec{S}_{h}(u,v)\) into PDE (3) will cause an error function \(\varvec{E}_{h}(u,v)\). If we uniformly allocate \(M\times N\) points in the region \(\{0\le u\le 1; 0\le v\le 1\}\), the \(M\times N\) points can be represented by (\(u_m\),\(v_n\)) \(\{1\le m\le M; 1\le n\le N\}\) where \(u_{m}=\frac{m-1}{M-1}\) and \(v_{n}=\frac{n-1}{N-1}\). The error of the PDE (3) at the point \((u_m,v_n)\) is denoted by \(\varvec{E}_{h}(u_{m},v_{n})\). We sum the squared errors at all these points, and obtain

$$\begin{aligned} J=\sum _{m=1}^M\sum _{n=1}^{N}\varvec{E}_{h}(u_{m},v_{n})^2 \end{aligned}$$
(5)

where

$$\begin{aligned} \varvec{E}_{h}(u_{m},v_{n})=\varvec{a}_\mathbf{1} \frac{\partial ^2\varvec{S}_{h}(u,v)}{\partial u^2}+ \varvec{a}_\mathbf{2} \frac{\partial ^2 \varvec{S}_{h}(u,v)}{\partial v^2}\bigg |_{(u,v)=(u_{m},v_{n})}.\end{aligned}$$
(6)

Using the least squares method to minimize the squared error sum J with respect to the two unknown constants \(C^{(3)}\) and \(C^{(6)}\) leads to the following equations

$$\begin{aligned} \begin{aligned} \frac{\partial J}{\partial C^{(3)}}=\sum _{m=1}^M\sum _{n=1}^{N}\varvec{E}_{h}(u_{m},v_{n})\frac{\partial \varvec{E}_{h}(u_{m},v_{n})}{\partial C^{(3)}}=0\\ \frac{\partial J}{\partial C^{(6)}}=\sum _{m=1}^M\sum _{n=1}^{N}\varvec{E}_{h}(u_{m},v_{n})\frac{\partial \varvec{E}_{h}(u_{m},v_{n})}{\partial C^{(6)}}=0. \end{aligned} \end{aligned}$$
(7)

In what follows, we use the conditions of the eight boundary vertices \(V^{(k)}= P^{(k)}\) \((k=1,2,...,8)\) and Eq. (7) to determine all the unknown constants involved in the patch function (4) for each of the three groups of 4-sided patches as shown in Fig. 3.

Fig. 3
figure 3

Determination of the unknown constants in Eq. (4) for the three groups of 4-sided patches where Eqs. (A.1), (A.4), (A.6), (A.8), (A.10), and (A.12)-(A.15) are given in Appendix A

3.2.2 Patch direction

The uv-coordinate systems for the PDE patches in different groups shown in Fig. 2 have the same u and v directions. Such a direction uniformity is suitable for creating regular and smooth 3D models. However, for a 3D model with a branching structure, the u and v directions of the uv-coordinate system for the branching structure are usually different from the u and v directions of the uv-coordinate system for the main body of the 3D model. For example, for the basket shown in Fig. 4 below, the u and v directions of the uv-coordinate system for the handle are opposite to the u and v directions of the uv-coordinate system for the main body. Such direction inconformity may lead to the following two situations in the direction parallel to the edge shared by two adjacent PDE patches: (1) the parametric variable of one patch is different from the parametric variable of the adjacent patch, (2) two adjacent patches share a same parametric variable but the direction of the parametric variable for one patch is opposite to the direction of the parametric variable for the adjacent patch. If we still use the same u and v directions shown in Fig. 2 to generate PDE patches for these two situations, position discontinuities on the edge occur. To avoid position discontinuities, it is necessary to adjust one parametric variable or the direction of one parametric variable for one of two adjacent patches in the direction parallel to the shared edge so that two adjacent PDE patches share the same parametric variable and the same direction in the direction parallel to their shared edge.

Fig. 4
figure 4

An example of different patch directions (marked by dashed lines) of the basket model

In total, the inconformity of parametric variables and directions of two adjacent patches in the direction parallel to the shared edge has six cases, which are shown in Fig. 5a–f. In the figure, the PDE patches with odd number (\(S_1\), \(S_3\), \(S_5\), \(S_7\), \(S_9\) and \(S_{11}\)) are known and the PDE patches with even number (\(S_2\), \(S_4\), \(S_6\), \(S_8\), \(S_{10}\) and \(S_{12}\)) are unknown, which need to be generated. The six cases can be divided into three groups. The first group is shown in Fig. 5a and d. In this group, both the parametric variables in the direction parallel to the shared edge and their directions for the two adjacent patches are different. Since the position continuity on the shared edge requires \(S_{2}(u,0)=S_{1}(1,v)\) for the patches 1 and 2 with \(v=0\) corresponding to \(u=1\) and \(S_{8}(0,v)=S_{7}(u,1)\) for the patches 7 and 8 with \(u=0\) corresponding to \(v=1\), we change the parametric variable for the top patches in the direction parallel to the shared edge to the other one and replace the changed parametric variable with 1 minus the changed parametric variable in the position continuity condition, i. e., \(S_{2}(u,0)=S_{1}(1,1-u)\) and \(S_{8}(0,v)=S_{7}(1-v,1)\). The second group is shown in Fig. 5b and e. In this group, the parametric variables in the direction parallel to the shared edge are different but their directions for the two adjacent patches are the same. Since the position continuity on the shared edge requires \(S_{4}(u,0)=S_{3}(0,v)\) for the patches 3 and 4 and \(S_{10}(0,v)=S_{9}(u,0)\) for the patches 9 and 10, we change the parametric variable for the top patches in the direction parallel to the shared edge to the other one in the position continuity condition, i. e., \(S_{4}(u,0)=S_{3}(0,u)\) and \(S_{10}(0,v)=S_{9}(v,0)\). The third group is shown in Fig. 5c and f. In this group, the parametric variables in the direction parallel to the shared edge are the same but their directions for the two adjacent patches are opposite. Since the position continuity on the shared edge requires \(S_{6}(u,0)=S_{5}(u,0)\) for the patches 5 and 6 and \(S_{12}(0,v)=S_{11}(0,v)\) for the patches 11 and 12, we replace the parametric variable with 1 minus the parametric variable for the top patches in the position continuity condition, i. e., \(S_{6}(u,0)=S_{5}(1-u,0)\), and \(S_{12}(0,v)=S_{11}(0,1-v)\).

Fig. 5
figure 5

Six forms of direction inconformity of two adjacent patches

3.3 Particular solution of second-order nonhomogeneous PDE

As discussed previously, the right-hand side term of PDE (1) act as a sculpting force to easily and effectively create different shapes of a PDE surface. The solution corresponding to the right-hand side term of PDE (1) is a particular solution. In this subsection, we investigate the particular solution of PDE (1).

When deriving the general solution \(\varvec{S}_{h}(u,v)\) of the vector-valued second-order homogeneous PDE (3), the positional continuous boundary conditions (2) have been exactly satisfied. Therefore, when deriving the particular solution \(\varvec{S}_{p}(u,v)\) of the vector-valued second-order nonhomogeneous PDE (1), the boundary conditions (2) should not be changed. It means the particular solution must satisfy the following zeroed boundary conditions

$$\begin{aligned} \begin{aligned} \varvec{S}_{p}(u,0)&=0, \varvec{S}_{p}(u,1)=0\ \forall u\in [0,1]\\ \varvec{S}_{p}(0,v)&=0, \varvec{S}_{p}(1,v)=0\ \forall v\in [0,1]. \end{aligned} \end{aligned}$$
(8)

The vector-valued sculpting force function can take different forms. Since the particular solution depending on the vector-valued sculpting force function must satisfy the requirements of both PDE (1) and boundary conditions (8), the construction of the vector-valued sculpting force function must take these requirements into account. There are different functions that can satisfy these requirements. Here, we take the following function as the vector-valued sculpting force function

$$\begin{aligned} \varvec{F}(u,v)=\varvec{f}_{0}{\text {sin}}(\pi u){\text {sin}}(\pi v), \end{aligned}$$
(9)

where \(\varvec{f}_{0}=[f_{0x}\ f_{0y}\ f_{0z}]^{T}\) is a vector-valued coefficient whose direction and size can be changed to apply different sculpting forces to a PDE surface.

According to the vector-valued sculpting force function (9), the vector-valued particular solution can be taken to be

$$\begin{aligned} \varvec{S}_{p}(u,v)=\varvec{s}_{p0}{\text {sin}}(\pi u){\text {sin}}(\pi v). \end{aligned}$$
(10)

Clearly, the above particular solution (10) exactly satisfies the zeroed boundary conditions (8). The remaining problem is to satisfy the PDE (1). Using \(\varvec{S}_{p}(u,v)\) in (10) to replace \(\varvec{S}(u,v)\) in (1) and introducing (9) into (1), we obtain

$$\begin{aligned} \varvec{s}_{p0}=-\frac{\varvec{f}_{0}}{\pi ^2(\varvec{a}_{1}+\varvec{a}_{2})}. \end{aligned}$$
(11)

Substituting Eq. (11) into Eq. (10), the particular solution of the vector-valued second-order nonhomogeneous PDE (1) is obtained as

$$\begin{aligned} \varvec{S}_{p}(u,v)=-\frac{\varvec{f}_{0}}{\pi ^2(\varvec{a}_{1}+\varvec{a}_{2})}{\text {sin}}(\pi u){\text {sin}}(\pi v). \end{aligned}$$
(12)

Putting the obtained general solution of the vector-valued second-order homogeneous PDE (3) and the particular solution (12) of the vector-valued second-order nonhomogeneous PDE (1) together, we obtain the following general solution of the vector-valued second-order nonhomogeneous PDE (1)

$$\begin{aligned} \begin{aligned} \varvec{S}(u,v)=\varvec{S}_{h}(u,v)+\varvec{S}_{p}(u,v)={\bar{P}}_{{\bar{m}},{\bar{n}}}^{(0)}+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(1)}u+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(2)}u^2\\ +{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(3)}u^3+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(4)}v+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(5)}v^2+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(6)}v^3+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(7)}uv\\ +{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(8)}u^{2}v+{\bar{P}}_{{\bar{m}},{\bar{n}}}^{(9)}uv^{2}-\frac{\varvec{f}_{0}}{\pi ^2(\varvec{a}_{1}+\varvec{a}_{2})}{\text {sin}}(\pi u){\text {sin}}(\pi v), \end{aligned} \end{aligned}$$
(13)

where \({\bar{P}}_{{\bar{m}},{\bar{n}}}^{(k)}\) (\(k=0,1,2,...,9\); \({\bar{m}}=i-1,i,i+1\); \({\bar{n}}=j-1,j,j+1\)) are the analytical formulae obtained in Subsection 3.2.1 and given in Appendix A.

The above general solution defines an analytical \(C^0\) continuous 4-sided PDE patch. It can be used to create various shapes of a single patch and generate complicated 3D models to be demonstrated in the following two sections.

4 Results and comparisons

We validated our approach using a set of test models that includes both man-made (the dress, mug and hat) and organic (the human face and ear) models as shown in Fig. 6. These vertex-frame models are generated by extracting feature curves from free 3D objects in TURBOSQUID (http://www.turbosquid.com). The shape of a PDE patch-based surface model generated from a vertex-frame model is controlled by three kinds of parameters: the position coordinate of eight vertices \(P^{(k)}\) (\(k=1,2,...,8\)) used to define the boundary of a PDE patch, the two shape control parameters \(\varvec{a}_1\) and \(\varvec{a}_2\) and sculpting force used to control surface shapes.

Fig. 6
figure 6

Test results of examples. Each example includes its vertex-frame model (left) and PDE patch-base surface model (right)

Fig. 7
figure 7

Comparisons with polygon and NURBS modeling

4.1 Comparison of accuracy and data size

We compare our proposed method with polygon and NURBS modeling techniques. Since the 3D objects used in our tests come from real models, these real models can be regarded as the ground truth in our comparisons. Figure 7 shows the five ground truth models (the first column) rebuilt by polygon (the second column), NURBS (the third column) and our proposed 4-sided PDE patches (the fourth column), respectively. To compare the storage requirements of the three modeling techniques, the corresponding three rebuilt models should have the same or very close accuracy against the ground truth model. We use the root mean square (RMS) error with respect to the bounding box diagonal, which is evaluated with Metro tool [36] to measure the accuracy of the created models. The RMS error is evaluated between the sample points of the rebuilt models and the ground truth model. Our experiment indicates that the number of sample points same as the vertex number of the rebuilt polygon model gives very accurate results. The comparison needs to satisfy the following criteria. (1) RMS errors between the three models and the ground truth model are taken to be the same or very close. (2) The data of the polygon model are the coordinate values of vertices, the data of the NURBS model are the coordinate values of control points and weights, and the data of our PDE model are coordinate values of boundary vertices, the two shape control parameters, and the vector-valued coefficient of the sculpting force defined in Eq. (9). (3) The values of all data used in the comparison are rounded to six significant digits.

Table 1 lists the statistical data of the three modeling techniques for the five surface models, including the number of vertices or control points, RMS errors and storage amounts. According to Table 1, for the surface model of the dress, mug, ear, hat and human face, our proposed modeling of 4-sided PDE patches saves the storage space of 81.3%, 79.5%, 85.2%, 78.3% and 85.9% over the polygon modeling, and 58.0%, 56.6%, 57.6%, 58.1%, and 58.4% over the NURBS modeling. Therefore, our proposed method has a much smaller requirement for storage space. Moreover, the results indicate our proposed method only need a small amount of vertices to generate surface models with almost same RMS errors compared to polygon and NURBS techniques. It means our proposed method is more efficient and easier for users to do manual operations and real-time interactive design. This will be discussed in detail in Section 5.

Table 1 Statistical data of polygon (PO), NURBS (NU) and our proposed method for the five surface models

4.2 Comparison of the local deformation

Since the sculpting force of PDE-based modeling is powerful in creating different deformations, we compare shape manipulation of our proposed method with NURBS and Coons modeling techniques to demonstrate the capacity and effectiveness of our proposed method.

Figure 8 shows the comparison of the interior deformation between PDE and NURBS patches. We generate a simple PDE patch (a) and a NURBS patch (c) with the same surface shape. The PDE patch can easily produce a small convex shape (b) within arbitrary inner local regions by interactively manipulating a sculpting force, but the NURBS patch with the given control points cannot create such a small convex shape through interactively moving its control points, as shown in (d). To obtain the similar shape to that shown in (b), the most common approach is to interpolate the NURBS patch in the deformation region by adding new control points, as shown in (e). However, the interpolation needs extra manual operations and will greatly increase the data size of the NURBS patch.

Fig. 8
figure 8

Comparison of the interior deformation between PDE and NURBS patches. a An original PDE patch. b The PDE patch a with a local deformation created by manipulating a sculpting force. c An original NURBS patch with the same shape as a. d The deformation of the NURBS patch c by moving control points. e The deformation of the NURBS patch c after the interpolation

PDE-based and Coons modeling techniques are both boundary-based surface creation methods. Since bilinear Coons surfaces have no shape manipulation capacity, and bicubic Coons surfaces can manipulate surface shapes by changing boundary tangents, we compare our proposed method with bicubic Coons surfaces in manipulating surface shapes. The sculpting force in our proposed method can deform: (1) the whole PDE patch (Fig. 9b), (2) inner local regions of a single PDE patch (Fig. 9c and d) by controlling the range of parametric variables u and v in \(\varvec{S}_{p}(u,v)\), and (3) arbitrary regions across multiple PDE patches (Fig. 10). In contrast, boundary tangents of a bicubic Coons patch can only deform the whole region rather than arbitrary inner local regions of the patch. Figure 9 shows the comparison between PDE patches (a–d) and bicubic Coons patches (e–h) with the four same boundaries \(\varvec{\alpha }(u)\), \(\varvec{\beta }(u)\), \(\varvec{\gamma }(v)\) and \(\varvec{\delta }(v)\). We apply \(w_{1}\varvec{\alpha }(u)\), \(w_{2}\varvec{\beta }(u)\), \(w_{3}\varvec{\gamma }(v)\) and \(w_{4}\varvec{\delta }(v)\) to describe the boundary tangents of bicubic Coons patches where \(w_i=[w_{ix}, w_{iy}, w_{iz}]^{T}\) (\(i=1,2,3,4\)). The results show that our proposed method is more flexible and powerful in shape manipulations and local deformations.

Fig. 9
figure 9

The comparison between PDE surface patches ad and bicubic Coons surface patches eh. a \(\varvec{f}_0=[0\ 0\ 0]\). b \(\varvec{f}_0=[20\ 1\ 1]\); c \(\varvec{f}_0=[3\ 1\ 2]\) and the deformation region \(0.25\le u\le 0.75\), \(0.25\le v\le 0.75\). d \(\varvec{f}_0=[2\ 0\ 0]\) and deformation region \(0.2\le u\le 0.45\), \(0.2\le v\le 0.45\) and \(0.6\le u\le 0.9\), \(0.55\le v\le 0.8\). e \(w_1=w_2=w_3=w_4=[0\ 0\ 0]\). f \(w_1=w_3=[100\ 0\ 0]\), \(w_2=w_4=[-100\ 0\ 0]\). g \(w_1=w_2=w_3=[0\ 0\ 0]\), \(w_4=[-100\ 0\ 0]\). h \(w_1=[-20\ 0\ -20]\), \(w_2=[-20\ 0\ 0]\), \(w_3=w_4=[0\ 0\ 0]\)

Fig. 10
figure 10

The shape deformation in a region encircled by boundary curves (white) across multiple PDE patches. a \(\varvec{f}_0=[0\ 0\ 0]\). b \(\varvec{f}_0=[-1\ -1\ 1]\). c \(\varvec{f}_0=[-5\ 1\ 0]\). d \(\varvec{f}_0=[-8\ -2\ 2]\)

5 Interactive design

5.1 Shape control parameter and sculpting force

The shape of the PDE patch generated from a given vertex-frame can be effectively controlled by two shape control parameter \(\varvec{a}_1\), \(\varvec{a}_2\) and a sculpting force \(\varvec{f}_0\). We develop a tool shown in Fig. 11 for interactively choosing their suitable values. After inputting a vertex-frame, different shapes of a PDE patch can be generated by moving the slider of different components of \(\varvec{a}_1\), \(\varvec{a}_2\) and \(\varvec{f}_0\). The default range of each slider is [0, 1] , and there is an input box next to each slider for inputting a magnification coefficient. The values of \(\varvec{a}_1\), \(\varvec{a}_2\) and \(\varvec{f}_0\) are displayed in real time under the sliders.

Fig. 11
figure 11

The tool for interactively manipulating \(\varvec{a}_1\), \(\varvec{a}_2\) and \(\varvec{f}_0\)

Fig. 12
figure 12

Design parameter modification of a basket. a \(\varvec{a}_1^{\text {left}}=\varvec{a}_2^{\text {left}}=\varvec{a}_1^{\text {right}}=\mathbf{a} _2^{\text {right}}=[1\ 1\ 1]^{T}\). b \(\varvec{a}_1^{\text {left}}=\varvec{a}_1^{\text {right}}=150\times [1\ 1\ 1]^{T}\), \(\varvec{a}_2^{\text {left}}=\varvec{a}_2^{\text {right}}=[1\ 1\ 1]^{T}\). c \(\varvec{a}_1^{\text {left}}=\varvec{a}_1^{\text {right}}=-100\times [1\ 1\ 1]^{T}\), \(\varvec{a}_2^{\text {left}}=\varvec{a}_2^{\text {right}}=[1\ 1\ 1]^{T}\). d \(\varvec{a}_1^{\text {left}}=\varvec{a}_1^{\text {right}}=[1\ 150\ 1]^{T}\), \(\varvec{a}_2^{\text {left}}=\varvec{a}_2^{\text {right}}=[1\ 1\ 1]^{T}\)

The function of shape control parameters \(\varvec{a}_1\) and \(\mathbf{a} _2\) is to weight the first and second terms on the left-hand side of the PDE (1) and create a smoothing effect to the differential operator in u and v direcions [25]. The two parameters can be used to directly change the shape of PDE patches. As shown in Fig. 12, we change the shape control parameters \(\mathbf{a} _1^{\text {left}}\) and \(\mathbf{a} _2^{\text {left}}\) of the patch at the left joint of the basket strap and \(\mathbf{a} _1^{\text {right}}\) and \(\mathbf{a} _2^{\text {right}}\) of the patch at the right joint to demonstrate the effect of the two shape control parameters. It can be seen from the figure that by changing the two shape control parameters, we can obtain various shapes of the basket strap without moving the vertex positions of vertex-frames.

5.2 Interactive tool

Besides the shape control parameters and sculpting forces, which can be used in surface manipulations, the shape of a PDE surface patch can also be changed by the positions of eight vertices of its vertex-frame. When users are dissatisfied with some shapes of an output surface model, it is time-consuming to remake a new version of the corresponding vertex-frames and create new shapes to replace the unsatisfactory shapes. In contrast, modifying the corresponding vertices of vertex-frames to obtain their desired shapes is easier and will greatly improve the modeling efficiency. To expand the practicability of our proposed method, the user should be able to modify the vertex-frame model and generate the desired surface model in real time. Therefore, we design an interactive interface with which users can move every vertex of an input vertex-frame model and check the quality of an output surface model. The interface of our interactive tool is shown in Fig. 13, which includes three transformation functions, i. e., rotation, moving and scaling, for both the vertex-frame model and surface model.

Fig. 13
figure 13

Interactive tool of PDE patch-based surface modeling. (Load: input a vertex-frame model; Rotate: rotate models in the 3D space; Zoom: zoom in or out models; Pan: move models in current views; Create: create and display a surface model from the inputted vertex-frame model; Save: save the data of the surface model.)

The interactive tool is developed in the Cartesian space. The user can manipulate the models using the three transformation functions, i. e., Rotate, Zoom and Pan. After inputting a vertex-frame model by clicking the Load button, the vertex-frame model is presented in left position. The user can move a vertex by clicking and dragging it with mouse, and releasing the mouse button at desired position (Fig. 14). When the modification ends, the user can click the Create button to generate a surface model in real time and Save button to save the surface model.

Fig. 14
figure 14

Editing of a vertex. a The vertex-frame model. b The surface model

We invited three volunteers to design different surface models using our interactive tool. All of them have experience in 3D modeling tasks. The test objects are the five vertex-frame models shown in Fig. 6. We explained how to use the interactive tool in a ten-minute training session and then asked them to design and recreate new surface models based on the five existing vertex-frame models. Figure 15 shows the results created by the three volunteers. They generated some interesting surface models by modifying only a few vertices of the corresponding vertex-frame models. The feedback from the volunteers was very positive. All of them believed that our proposed method is easier to create and manipulate desired surface models than polygon and NURBS modeling techniques.

Fig. 15
figure 15

Results created by the three volunteers

6 Conclusions and future work

We have developed the first analytical \(C^0\) continuous 4-sided PDE patches to tackle the weaknesses of big data and heavy manual operations of polygon and NURBS modeling, and integrate shape control parameters and sculpting forces into boundary-based PDE patches to avoid weak ability of Coons surfaces in shape manipulations. We have also developed a novel PDE patch-based surface modeling technique to quickly create 3D models from vertex-frames, and implemented the modeling technique into an interactive software tool to input and modify vertex-frame models and create and manipulate surface models in real time. The experiments made by testing several vertex-frame models validate the capacity and effectiveness of our proposed method and demonstrate that our proposed method can create complex surface models with a small number of patches and fewer manual operations. Moreover, we have compared our proposed method with polygon and NURBS techniques in creating different surface models with respect to the ground-truth model. The results indicate that our proposed method greatly reduces the data size of 3D models and saves storage space. We have also compared our proposed method with Coons surfaces in manipulating surface shapes and demonstrated that our proposed method is more flexible and powerful.

Our proposed method has some limitations. First, 4-sided PDE surface patches are not flexible enough to represent complex shapes of some 3D models such as branching structures. For such structures, 4-sided patches combined with 3-sided patches are easier and more powerful to create their surface models and reduce the number of patches. Second, the method developed in this paper can only achieve position continuity between adjacent PDE patches. 3- and 4-sided PDE patches with tangent continuity, curvature continuity, and even higher order \(C^n\) continuity have not been investigated in this paper. Third, how to use sculpting forces to create local deformations in the regions bounded by complicated boundary curves has not been demonstrated. Fourth, the patch generation rule and patch direction discussed in Subsections 3.2.1 and 3.2.2 must be followed when creating 3D models from the analytical \(C^0\) continuous 4-sided PDE patches. In our following work, we will develop \(C^n\) continuous 3- and 4- sided PDE patches without the constraints of the patch generation rule and patch direction and investigate how to use sculpting forces to create different deformations in the regions bounded by various complicated boundary curves to demonstrate the advantages of PDE-based geometric modeling over polygon and NURBS modeling in shape creation and manipulation.