Blending Basic Shapes By C-Type Splines and Subdivision Scheme

: In this article, we adopt the C-type spline of degree 2 to model and blend basic shapes including conics and circle arcs. The C-type spline belongs to the ω B-spline category of splines that are capable of blending polynomial, trigonometric and hyperbolic functions. Commonly used basic shapes can be exactly represented by these types of splines. We derive explicit formulas for the convenience of modeling the basic curves. The entire blending curve is C 1 -continuous. In comparison with the existing best blending method by rational G 2 splines, which are rational splines of degree 3, the proposed method allows simpler representation and blending of the basic curves, and it can represent numerous basic shapes including the hyperbolic types. We also design a subdivision method to generate blending curves; this method is precise for the basic curves and approximate for the blending sections. The subdivision process is efficient for modeling and rendering. It has also proven to be C 1 -continuous by the asymptotically equivalent theory and the continuity of stationary subdivision method. In addition, we extend the proposed methods to cases involving the modeling and blending of basic surfaces. We provide many examples that illustrate the merits of our methods.


Introduction
The modeling and blending problems of basic shapes are classical problems in computeraided geometry design (CAGD) and very important in many other application domains  ;Shen, Hu and Fan (2017); Wang, Lin and Fang (2017)]. Many types of methods have been continuously proposed in the past decade [Shen, Hu and Fan (2017); Hui (1999); Erich (2001); Kouibia, Pasadas, Sbibihb et al. (2013); Kiciak (2013) ;Lin, Xiong and Liao (2014)]. The Rational G 2 spline proposed in ] allows the modeling of multiple basic shapes, including segments of conics and circle arcs in one structure; This is important in conceptual design to avoid the posteriori need to stitch the conceptual pieces together. This method was also extended to cases that require blending of the basic surfaces for more background information ]. The traditional 2 C-type spline curve of degree 2 The ωB-splines proposed in Fang et al. [Fang and Wang (2008)] used a frequency sequence to determine their types and corresponding coefficients. Therefore, blending different types of curves is permitted when different frequencies are included in the frequency sequence. Moreover, the ωB-splines space is blended by polynomial, trigonometric and hyperbolic spaces, thus many analytical curves are exactly reproduced by ωB-splines. For conics and circular arcs, C-type splines of degree 2 are sufficient, and the lower degree is beneficial for modeling suitable blending segments. Therefore, we select C-type splines of degree 2 to represent and blend basic curves. The definitions for the C-type spline basic functions and curves of degree 2 are given below.
is called a C-type spline curve corresponding to the knot vector T.
Because different frequencies can be set for different knot intervals, C-type splines can represent numerous types of curves. Corresponding to the value of β, 0, 1 or i, C-type spline curves are polynomial, trigonometric polynomial and hyperbolic polynomial types respectively. For the basic surfaces, they can be modeled by revolving around the basic curves. For more details please refer to Fang et al. [Fang and Wang (2008)].
3 Blending basic shapes with C-type splines of degree 2 , which can exactly reproduce basic curves. Their representation structure is similar to polynomial B-splines, without rational forms. According to the standard equations and the corresponding parameters of the basic curves, we can use C-type splines to derive the explicit formula for computing control points that are necessary for representing basic curves. Corollary 3.1, 3.2, and 3.3 show these formulas for parabolas, hyperbolas and Lissajous curves respectively. Please note that ellipses are special cases of Lissajous curves. We can see that these formulas are very simple and regular. Corollary 3.1 The sufficient conditions that a piece of parabola The sufficient conditions that a piece of hyperbola The sufficient conditions that Lissajous curve All these formulas are derived from the standard equations of basic curves and there are no quality issues. We know all basic curves with the same type can be obtained through executing coordinate transformations to the standard equations mentioned above. Their control points can also be obtained from the corresponding results through corresponding transformations. Based on above representation of basic curves, the algorithm of blending basic curves by C-type spline curves are described as Algorithm 3.1.

Algorithm 3.1 Giving the general equation representations (x(t), y(t)) of basic curves
waited to be blended. We need to blend them into a whole curve represented by C-type splines. The control polygon P and the frequency sequence ω are determined by the following procedures: • For each piece of basic curve through a total coordinate transformation T (k) , including rotation, translate and scale transformations.
• For each piece of basic curve ( ) k C′ , we determine a suitable number num (k) of segments according to its parameter interval. Then the frequency parameter ( ) can be determined by the formulas listed in the first condition of the above corollaries. We extend it to the parameter sequence as • In order to blend these ( ) , we combine their parameter sequences control points sequences as is new frequency parameters for those edges generated because of joining adjacent two basic curves. These new parameters can be set by users.
• As for the shape of each blending segment between two adjacent blended basic shapes, the number of control points can be set by users to frequently control this shape.
, we use Corollary 3 and Corollary 1, respectively, to determine their C-type spline representations. As illustrated in Fig. 1(upper-left), C (1) is represented by four segments of C-type spline curves (red) with ( ) 8 cos π ω = i , and C (2) is represented by 16 segments of C-type spline curves (black) with 0 = i ω . By directly connecting their control polygon (blue), we obtain a blending C-type spline curve ( Fig. 1(upper-right)). Certainly, one can also insert, delete or adjust some control points to locally change the shape of the blending curve. Please look at Fig. 1 (bottom-left); a new control point marked with a black square is inserted and the four original control points marked with red squares are deleted. For the entire blending curve, only the shapes of two segments of the circular arcs and four segments of the parabolas are locally changed. In Fig. 1(bottom-right), the simple drawing of a cup is blended with a piece of ellipse C (1) , a piece of hyperbola C (2) and two pieces of parabolas C (3) and C (4) by C-type splines. Additionally, several new control points are inserted between each two adjacent blended basic curves to frequently control the shapes of the blending segments. The experiment in Fig. 1 illustrated in  is like the first experiment here. Also, two basic curves are blended where parabola is common. Another basic curve is with circular, not trigonometric form. We can compare the proposed method and G 2 -spline method through these two experiments. Please refer to the following Tab. 1. From Tab. 1, we can see that C-type splines of degree two are non-rational, one degree lower than them, but persist C 1 -continuous. In fact, C-type splines of degree two can be easily elevated to C 2 -continuous (naturally G 2 -continuous) C-type splines of degree three. Further, our method is more convenient to model and blend basic curves. All computation formulas are simple and direct because C-type splines have similar representation forms like B-splines. While by G 2 rational splines method, one needs to sample on the basic curves and compute B-spline-like control points and weights according to very complicated transformation formulas.
As we all know, by taking a piece of basic curve as a generatrix we can easily model different types of basic surfaces. Fig. 2 shows the process of generating a hyperbolic surface from its generatrix, a piece of hyperbolic curve. Similarly, the blending problem between basic surfaces can be solved by an extended method from the cases of various curves discussed above. Fig. 3 illustrates some examples. Compared to the blending method of basic surfaces by rational bicubic G 2 splines proposed in Karciauskas et al. ], our method is much simpler.

Blending basic curves by subdivision
In this section, we propose a subdivision method to blend the basic curves. In addition, the subdivision blending curve also reproduces the basic curves to be blended. However, in this section the blending segments are different from the C-type spline blending curve proposed in the last section, and the subdivision blending curve uses a common control polygon and parameter sequence. In fact, the blending segments are also very approximate. In this section, we derive the subdivision scheme and prove its C 1continuity. To introduce the subdivision scheme, we first discuss its special case of using the constant frequency parameter. In this case, the subdivision curve converges to the corresponding C-type spline curve. D-type spline curves belong to B-like spline curves. Therefore, it has the optimal properties of B-spline curves including control polygon refinement. In Proposition 4.1, we derive its refinement formula when using the constant frequency parameter.
Proposition 4.1 (The case of using the constant frequency parameter 0 ) Let  (1). In addition, there exists the following relationship between the two sets of bases:    , vol.120, no.1, pp.45-62, 2019 (a) (b) Figure 4: The tooling paths of a mold represented by circular splines can also be represented by C-type splines and can be generated by our subdivision scheme Circular splines are very popular in the domain of NC machining, while control-point curves such as B-splines, NURBS and B-like splines are more commonly used during the modeling period. The control-point curves usually have to be approximated by circular splines before machining. It would be ideal if these two forms could be precisely transformed and generated by subdivision. However, this ideal has never been implemented. Generating circular splines by subdivision has only been researched and has never been implemented, for example Ahmad et al. [Ahmad, Nasri, Overveld et al. (2001)]. As an application of Algorithm 4.1, Fig. 4 illustrates such an example. In Fig.  4(left), we can see two similar tooling paths represented by circular splines. Taking the inside one as an example, it consists of 12 pieces of circular arcs, where each of the 6 yellow pieces spans a π angle and each of the 6 pink pieces spans a 2 3

CMES
angle. First, we split them into three segments and two segments of circular arcs, each segment spanning a 3 angle. Then, according to Corollary 3.3, we derive their representations by C-type splines with ≡ √3 2 and the control points marked with blue circles in Fig. 4(right). Based on this, both tooling paths can be generated by the subdivision scheme described in Algorithm 4.1 and are marked with black curves in Fig. 4(right). In the following section we further derive the subdivision formula for general C-type spline curves. However, it is very complicated. Under the premise of reproducing basic curves, we adopt a simpler method to generate blending segments by subdivision. In addition, the entire blending curve is very approximate to the corresponding C-type spline curve. This new subdivision scheme is described in the following algorithm:   Figure 6: Compare the blending curves respectively generated by C-type splines (red) and our subdivision scheme for blending curves (black). Those blending segments existing a little deviation between them are circled by gray ellipses Algorithm 4.2 simplifies the refinement rule for C-type spline curves. When using it to blend basic curves, we set the subdivision parameter to zero for blending segments. In fact, it is just a special mark. We can see that −1 is used to compute the left new control point and +1 is used to compute the right point in the formulas for computing control points in Algorithm 4.2. This ensures that each piece of the basic curve is generated by the same rule of Algorithm 4.1, which converges to those basic curves exactly represented by C-type splines. Actually, the entire blending curve obtained by Algorithm 4.2 is approximate to the corresponding C-type spline curve. In Fig. 6, the red curves and the black curves, respectively, are generated by C-type splines and our proposed subdivision scheme for blending curves with common control polygons and corresponding parameter sequences. We can see that those basic curves exactly coincide and only those blending segments in the gray ellipses have a small deviation. Furthermore, according to the theorem proposed in Dyn et al. [Dyn and Levin (1995)] and similar proofs in Tang et al. [Tang, Fang and Wang (2018)], we prove that the proposed subdivision scheme for blending curves is also C 1 -continuous. Let 2, be the mask of the subdivision scheme described in Algorithm 4.2 of the l-th level. Obviously, it is a nonstationary subdivision scheme. To prove its C 1 -continuity, we propose corresponding theorems between it and its relative stationary scheme.  Please note, the proposed subdivision method and corresponding theories can be naturally extended to the case of tensor product surfaces.

Conclusions
Compared with rational G 2 splines used to blend basic shapes, the C-type splines adopted in this paper have shown many advantages such as a nonrational form, one degree lower, a B-spline-like representation, C 1 -continuity, and simpler blending procedures and computational formulas. Furthermore, the subdivision scheme for blending shapes, which also reproduces basic shapes and wholly approximates the C-type spline shapes is proposed. Both blending methods proposed in this paper are C 1 -continuous. However, rational G 2 splines can be reparameterized to obtain its C 2 transitions. C-type splines of degree 2 are only C 1 -continuous at most. Certainly, C 2 -continuity can do this if we elevate to C-type splines of degree 3. Because of the simplicity of the blending method and formulas used to reproduce basic shapes, we choose C-type splines of degree 2. In the future, we will develop more applications, with the exception of applications for blending problems of C-type splines. For example, the C-type spline is also very suitable for an iso-geometric analysis (IGA) and the boundary element method (BEM), which have become hot topics in the recent ten years [Austin, Thomas and Yuri (2009) ;Nguyen, Anitescu, Bordas et al. (2015); Zhang, Sabin and Cirak (2018); Beer and Duenser (2019)]. Basic shapes are commonly used, especially for IGAs relative to CAD/CAM. If we adopt C-type basic functions both for modeling and analysis, there is some merit for modeling geometry, interpolating physical items and making refinements.