Hexagonal pyramid algorithm over a triangular domain

Hexagonal pyramid algorithm over a triangular domain

Graphical Models 100 (2018) 51–60 Contents lists available at ScienceDirect Graphical Models journal homepage: www.elsevier.com/locate/gmod Hexagon...

2MB Sizes 0 Downloads 49 Views

Graphical Models 100 (2018) 51–60

Contents lists available at ScienceDirect

Graphical Models journal homepage: www.elsevier.com/locate/gmod

Hexagonal pyramid algorithm over a triangular domain Wanqiang Shen a,∗, Guozhao Wang b, Yang Yang a, Aihua Hu a a b

School of Science, Jiangnan University, Wuxi, Jiangsu 214122, PR China Department of Mathematics, Zhejiang University, Hangzhou, Zhejiang 310027, PR China

a b s t r a c t In this paper, we introduce Hexagonal Pyramid Algorithm (HPA for short) over a triangular domain. Compared with the traditional pyramid algorithm of BernsteinBézier system over the triangular domain, HPA possesses different paths and connections in a pyramid. Using HPA, a series of general functions of trigonometric polynomials over the triangular domain is provided. The functions possess some Bernstein-like properties, and can accurately construct some surfaces, such as cylindrical and spherical patches, over triangular domains without using rational forms.

1. Introduction Pyramid algorithms appear almost everywhere in computer aided geometric design [1]. For example, the well-known de Casteljau and de Boor algorithms, seen in any CAGD book, such as [2], are used for evaluating and subdividing the Bézier or B-spline model. The k-variable Bernstein polynomials of degree m [3], are defined by the following equation: ( ) ( ) 𝑚 𝑖1 𝑖 +1 𝐵𝒊𝑚 𝑢1 , … , 𝑢𝑘+1 = 𝑢 ⋯ 𝑢𝑘𝑘+1 𝒊 1 where ( ) 𝑚 𝑚! = 𝒊 𝑖1 ! ⋯ 𝑖𝑘+1 ! and u1 , ... , 𝑢𝑘+1 are real numbers that sum to 1. These are constructed by using pyramid algorithms as well, as shown in Fig. 1. The polynomials of degree 𝑚 − 1 and m are separately marked in red and green. When 𝑘 = 2, as shown in Fig. 1(a), three directions, u1 , u2 and u3 , constitute a triangle, and the polynomials form the Bernstein basis over a triangular domain [4]. Each red function moves down to three green ones along three distinct paths in the recursive algorithm, called Triangular Pyramid Algorithm (TPA for short) in this paper. Furthermore, for any k, as shown in Fig. 1(b), the corresponding domain is a (𝑘 + 1)-polygon, and there are 𝑘 + 1 paths from level 𝑚 − 1 to m. Toric surface patches [5] apply to more complex polygon domains, whose vertices have integer coordinates. They are natural extensions of rational Bézier triangles and tensor product patches [6]. In Fig. 2(a), the hexagonal domain is irregular and lacks perfect symmetry. The domains of Box splines [7], defined by some vectors, can be symmetric. For example, in Fig. 2(b), if proper vectors are chosen, then the domain of a quadratic Box spline comprises two regular hexagons.



In contrast to the above work, we introduce a different pyramid algorithm. In the pyramid, 7 paths build a hexagon over a symmetric triangular domain; therefore, this algorithm is called Hexagonal Pyramid Algorithm (HPA). Using this algorithm, we provide a series of functions of trigonometric polynomials over the triangular domain. Related works also include the pyramid algorithm with a parameter [8] and some Bernstein-like bases, such as p-Bézier [9–11] for the trigonometric polynomial spaces, quasi Bézier [12] for the hyperbolic polynomial spaces, C-Bézier [13–15] for the algebraic and trigonometric polynomial spaces, AH-Bézier [16] for the algebraic and hyperbolic polynomial spaces, AHT-Bézier [17] for the algebraic, trigonometric, and hyperbolic polynomial spaces, and 𝜔-Bézier [18,19] with complex numbers for unifying the above spaces. Moreover, Mainar and Peña [20] summarizes the bases as a general class. Although triangular domain bases are important in the Bézier system [4,21–24], extending the work to trigonometric, hyperbolic, or blending spaces over triangular domains is difficult. Only a few bases of lower orders are extended, including the linear and double angle p-Béziers [25,26], and the 4-order C-Bézier [27]. Later, Róth et al [28] overcame this challenge and extended the p-Béziers of any order to triangular domains. The work lacks closed or at least recursive formulae for the normalized coefficients of the basis functions of any order, though it provides a numerical method by solving a system of equations and obtains the coefficients for a few lower orders. Thus, the positivity, symmetry, and recursive evaluation properties of their basis functions for general cases have not been proved. In this paper, we use HPA to provide some general functions with some Bézier-like properties. The main contributions of this paper include:

• Introducing HPA, a type of pyramid algorithm with 7 pathes, a symmetric domain, and triangular and hexagonal forms.

Corresponding author. E-mail addresses: [email protected] (W. Shen), [email protected] (G. Wang), [email protected] (Y. Yang), [email protected] (A. Hu).

https://doi.org/10.1016/j.gmod.2018.10.001 Received 11 February 2018; Received in revised form 11 October 2018; Accepted 14 October 2018 1524-0703/© 2018 Elsevier Inc. All rights reserved.

W. Shen et al.

Graphical Models 100 (2018) 51–60

(a)

(b)

Fig. 1. Pyramid algorithms of triangle (a), and (𝑘 + 1)-polygon (b). (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

(0,2)

(0,1)

(a) (0,0)

(1,2)

(1,1)

(1,0)

(2,2)

(2,1)

(2,0)

(b)

Fig. 2. Domains of toric patches (a), and Box splines (b).

• Using HPA to construct a series of functions of trigonometric polynomials over triangular domains, which is positive, normalized, symmetric and can be evaluated naturally. • Building precise cylindrical and spherical patches over triangular domains without rational forms.

function 1 on Level 0 exists. On Level 1, in Fig. 3(b), 7 functions exist. Fig. 3(c) demonstrates Level 2 with 19 functions. Each point on a current level lowers to the next through 7 paths, as shown in Fig. 3(d). The 7 paths are represented as 7 directions on a plane. These are denoted as U, V, W, UV, VW, WU and O in Fig. 3(e); the 7 directions form a hexagon. This pyramid is called a Hexagonal Pyramid.

The rest of the paper is divided into four parts: in the next section, we introduce HPA; in Section 3, using HPA, we provide a series of functions and the corresponding surfaces over triangular domains for trigonometric polynomial spaces along with some Bernstein-like properties; Section 4 presents some examples, including the cylindrical and spherical patches over triangular domains; and, final conclusions are drawn in Section 5.

2.2. Number of functions Denote the number of functions on the mth Level of HPA as NUMm . From the last subsection, we have NUM0 = 1. In this subsection, we compute NUMm for any 𝑚 ∈ ℕ, where ℕ = {0, 1, 2, …} is a set of natural numbers. In HPA in Fig. 3, where the ‘hexagon’ comprises paths and directions, i.e., the connections between points. This does not imply that the domain must be a hexagon. On the contrary, the domain could be another polygon. A triangle is used instead of the hexagon without changing the connections between the points, as shown in Fig. 4(b) with Level 2. The connections are the same as depicted in Fig. 3(c), and are different from the TPA in 4(a). We call this model the triangular form of HPA. From Fig. 4(b), it is easy to derive the following:

2. Hexagonal pyramid algorithm First, compared with the TPA, a graphical representation of HPA is provided in this section. Second, the number of functions is presented. Lastly, mathematical formulae for HPA are provided. 2.1. Graphical representation Fig. 3 displays HPA, where each function is denoted as a colour point. A different colour represents a different level. In Fig. 3(a), only one

NUM𝑚 = NUM𝑚−1 + 6𝑚. 52

(1)

W. Shen et al.

Graphical Models 100 (2018) 51–60

(a)

(b) (c)

U

UV

WU O

W

V (d)

VW (e) Fig. 3. Level 0 (a), Level 1 (b), Level 2 (c), 7 paths (d), and 7 directions (e). (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

Thus we have

2.3. Formulae

( ) ( ) NUM𝑚 − NUM0 = NUM𝑚 − NUM𝑚−1 + NUM𝑚−1 − NUM𝑚−2 ( ) + ⋯ + NUM1 − NUM0

For a conventional TPA, the position of each point is decided by 𝑚 using 4 natural numbers. We use the notation [ ], where m is the level 𝒊 number, and the vector 𝒊 = (𝑖1 , 𝑖2 , 𝑖3 ) describes the steps along directions U, V and W, respectively. The example for 𝑚 = 2 is shown in Fig. 4(a). Assuming that U(i) refers to the changes of (i1 , i2 , i3 ) when one step is taken along the direction U. Similarly, V(i) and W(i) are defined. In these cases, the recursive formulae of the TPA are simple.

= 6 𝑚 + 6 (𝑚 − 1 ) + ⋯ + 6 = 6 [𝑚 + (𝑚 − 1 ) + ⋯ + 1 ] = 3𝑚(𝑚 + 1),

Consequently, we arrive at the following proposition. 𝑼 (𝒊) = 𝒊 + (1, 0, 0), 𝑽 (𝒊) = 𝒊 + (0, 1, 0),

Proposition 2.1 (Number of points in HPA). The number of points on the mth level of HPA is NUM𝑚 = 3𝑚2 + 3𝑚 + 1.

𝑾 (𝒊) = 𝒊 + (0, 0, 1). 53

(2)

W. Shen et al.

Graphical Models 100 (2018) 51–60

2 [2,0,0 ]

2 [4,0,0 ]

2 2 2 [3,1,0 ] [2,0,0 ] [3,0,1]

2 [1,0,1 ]

2 [1,1,0 ]

2 2 2 2 ] [1,0,1 ] [2,0,2 ] [ 2,2,0 ] [1,1,0 2 [0,0,0] 2 [1,3,0 ] 2 [0,2,0 ]

2 [0,2,0 ]

2 [0,1,1 ]

2 [0,4,0 ]

2 [0,0,2 ]

2 [1,0,3 ] 2 [0,0,2 ]

2 [0,1,1 ] 2 [0,2,2 ]

2 [0,3,1 ]

(a)

2 [0,1,3 ]

2 [0,0,4 ]

(b) Fig. 4. Connections and notations of TPA (a), and HPA (b).

U

may also be considered. So the formulae of HPA are as follows: ⎧ 𝒊 + (2, 0, 0) ⎪ ⎪ 𝒊 + (1, −1, 0) 𝑼 (𝒊) = ⎨ ⎪ 𝒊 + (1, 0, −1) ⎪ ⎩ 𝒊 + (0, −1, −1) ⎧ 𝒊 + (0, 2, 0) ⎪ ⎪ 𝒊 + (−1, 1, 0) 𝑽 (𝒊) = ⎨ ⎪ 𝒊 + (0, 1, −1) ⎪ ⎩ 𝒊 + (−1, 0, −1) ⎧ 𝒊 + (0, 0, 2) ⎪ ⎪ 𝒊 + (0, −1, 1) 𝑾 (𝒊) = ⎨ ⎪ 𝒊 + (−1, 0, 1) ⎪ ⎩ 𝒊 + (−1, −1, 0) ⎧ 𝒊 + (1, 1, 0) ⎪ ⎪ 𝒊 + (0, 1, −1) 𝑼 𝑽 (𝒊) = ⎨ ⎪ 𝒊 + (1, 0, −1) ⎪ ⎩ 𝒊 + (0, 0, −2) ⎧ 𝒊 + (0, 1, 1) ⎪ ⎪ 𝒊 + (−1, 1, 0) 𝑽 𝑾 (𝒊) = ⎨ ⎪ 𝒊 + (−1, 0, 1) ⎪ ⎩ 𝒊 + (−2, 0, 0)

Fig. 5. Changes along direction U. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

𝑚 For HPA, the same notation [ ] is used to provide the position of 𝒊 each point in the pyramid. Here, m is also the level number. The vector i ∈ Im , where

⎧ ⎪𝒊 + (1, 0, 1) ⎪𝒊 + (1, −1, 0) 𝑾 𝑼 (𝒊) = ⎨ ⎪𝒊 + (0, −1, 1) ⎪𝒊 + (0, −2, 0) ⎩

{ ( ) } 𝐼𝑚 ∶= 𝒊 = 𝑖1 , 𝑖2 , 𝑖3 |𝑖1 , 𝑖2 , 𝑖3 ∈ (ℕ), 𝑖1 𝑖2 𝑖3 = 0, 𝑖1 + 𝑖2 + 𝑖3 = 0, 2, … , 2𝑚 . (3)

𝑖1 = max{𝒊} 𝑖3 ≤ 𝑖1 < 𝑖2 𝑖2 ≤ 𝑖1 < 𝑖3

,

(4)

,

(5)

𝑖1 < min{𝑖2 , 𝑖3 } 𝑖2 = max{𝒊} 𝑖3 ≤ 𝑖2 < 𝑖1 𝑖1 ≤ 𝑖2 < 𝑖3 𝑖2 < min{𝑖1 , 𝑖3 } 𝑖3 = max{𝒊} 𝑖1 ≤ 𝑖3 < 𝑖2 𝑖2 ≤ 𝑖3 < 𝑖1

,

(6)

,

(7)

𝑖3 < min{𝑖1 , 𝑖2 } 𝑖3 = min{𝒊} 𝑖1 < 𝑖3 ≤ 𝑖2 𝑖2 < 𝑖3 ≤ 𝑖1 𝑖3 > max{𝑖1 , 𝑖2 } 𝑖1 = min{𝒊} 𝑖3 < 𝑖1 ≤ 𝑖2

,

(8)

= min{𝒊} < 𝑖2 ≤ 𝑖1 , < 𝑖2 ≤ 𝑖3 > max{𝑖1 , 𝑖3 }

(9)

𝑖2 < 𝑖1 ≤ 𝑖3 𝑖1 > max{𝑖2 , 𝑖3 } 𝑖2 𝑖3 𝑖1 𝑖2

and

Fig. 4(b) presents an example for the notations. Here, 𝑚 = 2, and the triangular form of HPA is used. If one step is taken along one of the 7 directions, then i will be altered. Like the notation in the TPA, U(i), V(i), W(i), UV(i), VW(i), WU(i) and O(i) express the changes along the 7 directions, respectively. The direction U is provided as an example. Using the hexagonal form of HPA in Fig. 5, when a step proceeds along U, for the red points, we have 𝑖1 + 2; for the yellow points, 𝑖1 + 1 and 𝑖2 − 1; for the green points, 𝑖1 + 1 and 𝑖3 − 1; and, for the purple points, 𝑖2 − 1 and 𝑖3 − 1. The other directions

𝑶(𝒊) = 𝒊.

(10)

3. Functions of trigonometric polynomials over triangular domains In this section, HPA is used to construct a series of functions of trigonometric polynomials, possessing some Bernstein-like properties, over a triangular domain. The corresponding surfaces are also introduced here. 54

W. Shen et al.

Graphical Models 100 (2018) 51–60

where i ∈ Im . If i ∉ Im , we assume 𝐵𝒊𝑚 = 0 for any m. Note that 𝒋 (𝒊)s are given in Formula (4) ∼ (12).

First, for simplifying the presentations, an overline operator is used to express the opposite direction as follows:

Fig. 6 displays some functions. Here, 𝑚 = 2, 𝛼 = 2 and the triangular domain is D = { 𝒕 = (𝑢, 𝑣, 𝑤)|0 ≤ 𝑢, 𝑣 ≤ 2, 𝑤 = 2 − 𝑢 − 𝑣 ≥ 0}. Considering { } 2 , 𝐵2 , 𝐵2 , 𝐵2 , 𝐵2 , the symmetry of 𝐵𝒊2 , only the figures of 𝐵400 310 220 200 110 2 , in Fig. 6(a)–(f), respectively, are provided. As the ranges of some 𝐵000 functions are relatively smaller than the others, different scales are used for them. The scale 0–1 for vertical Z-axes is used in Fig. 6(a) and (b), and the scale 0–0.2 is used in Fig. 6(c)–(f). { } By Definition 3.1 of 𝐵𝒊𝑚 𝒊∈𝐼 , we have the following Bernstein-like 𝑚 properties:

𝑼 (𝒊) = 𝑽 𝑾 (𝒊), 𝑽 (𝒊) = 𝑾 𝑼 (𝒊), 𝑾 (𝒊) = 𝑼 𝑽 (𝒊), 𝑼 𝑉 (𝒊) = 𝑾 (𝒊),

(11)

𝑽 𝑊 (𝒊) = 𝑼 (𝒊), 𝑾 𝑈 (𝒊) = 𝑽 (𝒊), 𝑶(𝒊) = 𝑶(𝒊).

Proposition 3.1 (Basic properties of general functions). The functions 𝐵𝒊𝑚 (𝒊 ∈ 𝐼𝑚 ) possess the following properties.

Second, the 7 initial directions are denoted as follows: 𝐔 ∶= 𝑼 (𝟎) = (2, 0, 0) = 𝐕𝐖,

(I) Positivity. 𝐵𝒊𝑚 (𝒕) ≥ 0 for any t ∈ D. ∑ (II) Normalization. 𝒊∈𝐼𝑚 𝐵𝒊𝑚 (𝒕) ≡ 1. { } (III) Symmetry. The set of functions 𝐵𝒊𝑚 (𝒕) is symmetric with respect to t. (IV) The case for 𝑚 = 1. 𝐵𝒊1 (𝒕) = 𝑓𝒊 , 𝒊 ∈ 𝐼1 . (V) For 𝑖1 , 𝑖2 , 𝑖3 = 2𝑚, 2𝑚 − 1, … , 0, ( )𝑚−|𝑖1 −𝑚| ) 2 cos 𝛼 ( 2 𝑚 𝑢 𝑣 𝑤 𝑚 𝐵𝑖 ,2𝑚−𝑖 ,0 = sin𝑖1 sin2𝑚−𝑖1 cos𝑚−|𝑖1 −𝑚| 1 1 |𝑖1 − 𝑚| 2 2 2 sin2𝑚 𝛼2

𝐕 ∶= 𝑽 (𝟎) = (0, 2, 0) = 𝐖𝐔, 𝐖 ∶= 𝑾 (𝟎) = (0, 0, 2) = 𝐔𝐕, 𝐔𝐕 ∶= 𝑼 𝑽 (𝟎) = (1, 1, 0) = 𝐖, 𝐕𝐖 ∶= 𝑽 𝑾 (𝟎) = (0, 1, 1) = 𝐔, 𝐖𝐔 ∶= 𝑾 𝑼 (𝟎) = (1, 0, 1) = 𝐕, 𝐎 ∶= 𝑶(𝟎) = (0, 0, 0) = 𝐎.

(12)

3.1. General functions

𝐵0𝑚,𝑖

The previous section only defines the paths of HPA. To use them, at least the functions on Level 0 and Level 1 of the pyramid need to be known. Usually, 1 is used as the initial function on Level 0. The 7 functions on Level 1 [25], denoted as fi ≔ fi (t)(i ∈ I1 ), are as follows: 𝑓 𝐔 ( 𝒕) = 𝑓 𝐕 ( 𝒕) = 𝑓 𝐖 ( 𝒕) = 𝑓𝐔𝐕 (𝒕) = 𝑓𝐕𝐖 (𝒕) = 𝑓𝐖𝐔 (𝒕) = 𝑓 𝐎 ( 𝒕) =

sin2 2𝑢 , sin2 𝛼2 sin2 𝑣2 , sin2 𝛼2 sin2 𝑤2 , sin2 𝛼2 2 cos 𝛼2 sin 2𝑢 sin 𝑣2 cos 𝑤2 , sin2 𝛼2 2 cos 𝛼2 cos 2𝑢 sin 𝑣2 sin 𝑤2 , sin2 𝛼2 2 cos 𝛼2 sin 2𝑢 cos 𝑣2 sin 𝑤2 , sin2 𝛼2 2 sin 𝛼2 sin 2𝑢 sin 𝑣2 sin 𝑤2 . sin2 𝛼2

𝐵2𝑚𝑚−𝑖

𝒋 ∈𝐼1

=

𝑚 |𝑖3 − 𝑚|

sin2𝑚 𝛼2 𝑓𝒅 1 ⋯ 𝑓𝒅 𝑚 .

sin𝑖3

𝑤 2𝑚−𝑖3 𝑢 𝑚−|𝑖3 −𝑚| 𝑣 sin cos 2 2 2

(17)

Proof. It is easy to obtain (I), (II) and (III) by mathematical induction for the positivity, partition of unit and symmetry of the 7 functions {fi , i ∈ I1 }. Therefore, the proofs for (IV), (V), (VI) and (VII) are as follows:

(13)

(IV) When 𝑚 = 1, from (4), we have 𝑼 (2, 0, 0) = (4, 0, 0), which is not in I0 . Therefore, 𝐵40,0,0 = 0. Similarly, in (16), only one non-zero function is presented: 0 𝐵𝑽0 𝑾 (2,0,0) = 𝐵𝐎 =1 1 = 𝑓 . The other functions can be proved analHence, we have 𝐵𝐔 𝐔 ogously. (V) Considered the first equation, from the recursion (16), the functions 𝐵𝑖𝑚 ,2𝑚−𝑖 ,0 , 𝑖1 = 2𝑚, 2𝑚 − 1, … , 𝑚 are the expanded terms 1 ( )1 𝑚 of 𝑓𝐔 + 𝑓𝐔𝐕 . Thus, we have ( )2𝑚−𝑖1 ( ) 2 cos 𝛼 2 𝑚 𝑢 𝑣 𝑤 𝐵𝑖𝑚 ,2𝑚−𝑖 ,0 = sin𝑖1 sin2𝑚−𝑖1 cos2𝑚−𝑖1 1 1 𝑖1 − 𝑚 2 2 2 sin2𝑚 𝛼2

(14)

for i1 ≥ m. Similarly, when i1 ≤ m, 𝐵𝑖𝑚 ,2𝑚−𝑖 ,0 , 𝑖1 = 𝑚, 𝑚 − 1, … , 0 1) 1 ( 𝑚 are the expanded terms of 𝑓𝐔𝐕 + 𝑓𝐕 , we have ( )𝑖 ( ) 2 cos 𝛼 1 2 𝑚 𝑢 𝑣 𝑤 𝑚 𝐵𝑖 ,2𝑚−𝑖 ,0 = sin𝑖1 sin2𝑚−𝑖1 cos𝑖1 1 1 𝑚 − 𝑖1 2 2 2 sin2𝑚 𝛼

(15)

𝒋 (𝒊)

( 3 ,0,𝑖3

( )𝑚−|𝑖3 −𝑚| ) 2 cos 𝛼 2

𝒅 1 , … , 𝒅 𝑚 ∈ 𝐼1 𝒊 = 𝒅 1 ◦ ⋯ ◦𝒅 𝑚 (𝐎)

Definition 3.1 (General functions). Assuming that 𝛼 ∈ (0, 𝜋) is a real number and t is a parameter vector in D. The functions fi (i ∈ I1 ) are { } given in Formula (13). The function sequence 𝐵𝒊𝑚 (𝒕) ∶= 𝐵𝒊𝑚 , 𝒊 ∈ 𝐼𝑚 is defined by the following recursive method:

For m ≥ 1, ∑ 𝐵𝒊𝑚 = 𝐵 𝑚−1 𝑓𝒋 ,

=

(VI) Representation. ∑ 𝐵𝒊𝑚 =

Since it is clear that D is a triangular domain, the following definition could be established:

0 𝐵𝐎 = 1.

2 ,2𝑚−𝑖2

2

where 𝛼 ∈ (0, 𝜋) and 𝒕 = (𝑢, 𝑣, 𝑤) is a parameter vector in D ∶= {𝒕 = (𝑢, 𝑣, 𝑤)|𝑢, 𝑣, 𝑤 ≥ 0, 𝑢 + 𝑣 + 𝑤 = 𝛼}.

( )𝑚−|𝑖2 −𝑚| ) 2 cos 𝛼 2 𝑚 𝑣 𝑤 𝑢 sin𝑖2 sin2𝑚−𝑖2 cos𝑚−|𝑖2 −𝑚| |𝑖2 − 𝑚| 2 2 2 sin2𝑚 𝛼

(

2

for i1 ≤ m. Hence, the first equation is proved and the same would apply for the others.

(16) 55

W. Shen et al.

Graphical Models 100 (2018) 51–60

Fig. 6. 𝐵42,0,0 (a), 𝐵32,1,0 (b), 𝐵22,2,0 (c), 𝐵22,0,0 (d), 𝐵12,1,0 (e), and 𝐵02,0,0 (f).

56

W. Shen et al.

Graphical Models 100 (2018) 51–60

(VI) From (16), we have ∑ 𝐵𝒊𝑚 = 𝐵 𝑚−1 𝑓𝒅 1 𝒅 1 (𝒊)

𝒅 1 ∈𝐼1

∑ ∑

=

𝐵 𝑚−2

𝒅 2 ◦𝒅 1 (𝒊)

𝒅 1 ∈𝐼1 𝒅 2 ∈𝐼1

=⋯ =



𝒅 1 ,…,𝒅 𝑚 ∈𝐼1

𝑓𝒅 1 ⋯ 𝑓𝒅 𝑚 𝐵 0

𝒅 𝑚 ◦⋯◦𝒅 1 (𝒊)



=

𝑓𝒅 1 𝑓𝒅 2

𝒅 1 , … , 𝒅 𝑚 ∈ 𝐼1 𝒊 = 𝒅 1 ◦ ⋯ ◦𝒅 𝑚 (𝐎)

𝑓𝒅 1 ⋯ 𝑓𝒅 𝑚 .



3.2. Relation with trigonometric polynomials We obtain another series of functions that seems more like trigonometric polynomials. In the following proposition, we prove that these can linearly represent the functions stated in Definition 3.1. Proposition 3.2 (Linear representation). Let 𝐹𝑚 ∶= {1, sin (𝛽𝑢 − 𝛾𝑣), cos (𝛽𝑢 − 𝛾𝑣), sin (𝛽𝑣 − 𝛾𝑤), cos (𝛽𝑣 − 𝛾𝑤),

Fig. 7. Example of surface.

sin (𝛽𝑤 − 𝛾𝑢), cos (𝛽𝑤 − 𝛾𝑢)},

(18)

where 𝛽, 𝛾 ∈ ℕ such that 𝛽 > 0 and 𝛽 + 𝛾 ≤ 𝑚. Then any function 𝐵𝒊𝑚 can be represented as a linear combination of some functions in Fm .

cos (𝛽𝑢 − 𝛾𝑣) and any function in F1 can be linearly represented by the functions in Fm . Among these products, consider the following:

Proof. Mathematical induction. If 𝑚 = 1, we have

sin (𝛽𝑢 − 𝛾𝑣) sin 𝑢 =

1 𝐵𝐔 = 𝑓𝐔

For any (𝛽, 𝛾) ∈ 𝐽𝑚−1 , we ascertain that cos [(𝛽 − 1)𝑢 − 𝛾𝑣] and cos [(𝛽 + 1)𝑢 − 𝛾𝑣] are both included in Fm . Other products can be proved in a similar manner. This implies that the linear representations also stand true for m. Thus, any function 𝐵𝒊𝑚 can be linearly represented by the functions in Fm . □ { } In conclusion, 𝐵𝒊𝑚 (𝒕) 𝒊∈𝐼 presented in Definition 3.1 are trigono𝑚 metric polynomial functions over a triangular domain, possessing some Bernstein-like properties.

=

sin2 2𝑢 sin2 𝛼2

=

1 (1 − cos 𝑢), 2sin2 𝛼2

1 𝐵𝐔𝐕 = 𝑓𝐔𝐕

2 cos =

=

2 sin

2 sin

=

𝑢 sin 𝑣2 2 sin2 𝛼2

sin

cos

𝑤 2

cos 𝛼2 (sin 𝑢 + sin 𝑣 − sin 𝑤)

1 𝐵𝐎 = 𝑓𝐎

=

𝛼 2

𝑢 2

sin sin

𝑣 2 𝛼 2

sin

𝛼 2

cos [(𝛽 − 1)𝑢 − 𝛾𝑣] cos [(𝛽 + 1)𝑢 − 𝛾𝑣] − . 2 2

3.3. Definition of surfaces over triangular domains

+

cos2 𝛼2 (cos 𝑢 + cos 𝑣 − cos 𝑤 − 1) 2sin2 𝛼2

The corresponding surfaces are defined in the usual way. Definition 3.2 (General surface). Assuming that 𝛼 ∈ (0, 𝜋), the surface over the triangular domain D formed by {𝐵𝒊𝑚 , 𝒊 ∈ 𝐼𝑚 } can be written as follows: ∑ 𝑺 (𝒕 ) = 𝐵𝒊𝑚 (𝒕)𝑷 𝒊 , (19)

,

𝒊∈𝐼𝑚

𝑤 2

where t ∈ D and {Pi } are the control points, and the connections of these control points are the same as the connections of the functions in HPA.

𝛼 (cos 𝑢 + cos 𝑣 + cos 𝑤 − 1) cos 2 (sinu + sinv + sinw) . 2 2 sin 𝛼

From Proposition 3.2, we know that the proposed functions are trigonometric polynomials. They can construct surfaces with forms of sin , cos and their products. Particularly, for 𝑚 = 2, the space spanned by the proposed functions is span{1., sin 2u, cos 2u, sin 2v, cos 2v, sin 2w, cos 2w, sin usin v, sin vsin w, sin usin w, cos ucos v, cos vcos w, cos ucos w, sin ucos v, sin vcos w, cos usin w, sin ucos w, cos usin v, .cos vsin w}. So our functions can construct spherical patches. Note the following formulae:

2

{

} From the symmetry property of the functions, 𝐵𝒊1 (𝒕) 𝒊∈𝐼 can be linearly 1 represented by the following equation: 𝐹1 = {1, sin 𝑢, cos 𝑢, sin 𝑣, cos 𝑣, sin 𝑤, cos 𝑤}. Assuming that any 𝐵𝒊𝑚−1 can be linearly represented by the functions in 𝐹𝑚−1 , we have ∑ [ 𝛽,𝛾 𝛽,𝛾 𝑎𝒊 sin (𝛽𝑢 − 𝛾𝑣) + 𝑏𝛽,𝛾 𝐵𝒊𝑚−1 = 𝑒𝒊 + 𝒊 cos (𝛽𝑢 − 𝛾𝑣) + 𝑔𝒊 sin (𝛽𝑣 − 𝛾𝑤)

sin 𝑢 = sin (𝛼 − 𝑣 − 𝑤) = sin 𝛼 cos 𝑣 cos 𝑤 − sin 𝛼 sin 𝑣 sin 𝑤 − cos 𝛼 sin 𝑣 cos 𝑤 − cos 𝛼 cos 𝑣 sin 𝑤, cos 𝑢 = cos (𝛼 − 𝑣 − 𝑤)

(𝛽,𝛾)∈𝐽𝑚−1

] 𝛽,𝛾 𝛽,𝛾 + ℎ𝛽,𝛾 𝒊 cos (𝛽𝑣 − 𝛾𝑤) + 𝑝𝒊 sin (𝛽𝑤 − 𝛾𝑢) + 𝑞𝒊 cos (𝛽𝑤 − 𝛾𝑢) .

= cos 𝛼 cos 𝑣 cos 𝑤 − cos 𝛼 sin 𝑣 sin 𝑤 + sin 𝛼 sin 𝑣 cos 𝑤 + sin 𝛼 cos 𝑣 sin 𝑤, Consequently, the cylindrical patches can also be constructed. The proposed functions for m-harmonics can build surfaces that may be reparameterized with the linear combinations of (sin lu)s (cos kv)r ,

As the symmetry property and any 𝐵𝒊𝑚 is regarded as the sum of the products of 𝐵𝒊𝑚−1 and fj , we need to prove that the products of sin (𝛽𝑢 − 𝛾𝑣) or 57

W. Shen et al.

Graphical Models 100 (2018) 51–60

Fig. 8. Recursive evaluation process.

Fig. 9. Order of control points.

Proposition 3.4 (Recursive evaluation). For any parameter 𝒕∗ = (𝑢∗ , 𝑣∗ , 𝑤∗ ) ∈ D, the corresponding point on S(t) can be recursively generated by using the following equation:

(sin lu)s (sin kv)r and (cos lu)s (cos kv)r , where l, k, s, and r are nonnegative integers, such that 𝑙𝑠 + 𝑘𝑟 ≤ 𝑚. The examples of cylindrical and spherical patches will be provided in Section 4. In the example presented in Fig. 7, 𝛼 = 2 and 𝑚 = 3. The connections of the 37 control points are the same as the connections in the triangular form of HPA. From the recursive process of HPA and the properties of the functions, the properties of the surfaces can be obtained.

⎧𝑷𝒊 ⎪ 𝑷 [𝒊𝑛] = ⎨ ∑ 𝑷 [𝑛−1] 𝑓 (𝒕∗ ) ⎪ 𝒋 ∈𝐼 𝒋(𝒊) 𝒋 1 ⎩

1 ≤ 𝑛 ≤ 𝑚,

where 𝒊 ∈ 𝐼𝑚−𝑛 . The final point 𝑷 [𝐎𝑚] = 𝑺 (𝒕∗ ).

Proposition 3.3 (Basic properties of general surface). Surface S(t) presented in Definition 3.2 possesses the following properties:

Obtaining this evaluation process from the hexagonal pyramid method is easy. An example for 𝑚 = 2 is provided in Fig. 8. Here, 𝛼 = 2 and 𝒕∗ = (1, 0.5, 0.5). The final point 𝑷 [2] is visible on the surface. 𝐎

(I) Convex hull property. S(t) is contained in the convex hull of its control points. (II) Corner interpolation. ⎧𝑷 ⎪ 2𝑚,0,0 𝑺 (𝒕) = ⎨𝑷 0,2𝑚,0 ⎪𝑷 0,0,2𝑚 ⎩

𝑛=0

4. Examples { 𝑚} The functions can represent the functions 𝐵𝒊 𝒊∈𝐼 𝑚 sin u, cos u, sin usin v, sin ucos v, cos ucos v, … , if m ≥ 2. Hence, they can build cylindrical and spherical patches without rational forms. For simplicity, we assign an order for the control points:

𝒕 = (𝛼, 0, 0) 𝒕 = (0, 𝛼, 0) . 𝒕 = (0, 0, 𝛼)

The tangent planes at the corner points (𝛼, 0, 0), (0, 𝛼, 0), (0, 0, 𝛼) are the following planes, respectively:

𝑷 2𝑚,0,0 , 𝑷 2𝑚−1,1,0 , … , 𝑷 0,2𝑚,0 , 𝑷 0,2𝑚−1,1 , … , 𝑷 0,0,2𝑚 , 𝑷 1,0,2𝑚−1 , … , 𝑷 2𝑚−1,0,1 , 𝑷 2𝑚−2,0,0 , 𝑷 2𝑚−3,1,0 , … , 𝑷 0,2𝑚−2,0 , … , 𝑷 0,0,0 .

𝑷 2𝑚−1,1,0 𝑷 2𝑚,0,0 𝑷 2𝑚−1,0,1 , 𝑷 1,2𝑚−1,0 𝑷 0,2𝑚,0 𝑷 0,2𝑚−1,1 , 𝑷 1,0,2𝑚−1 𝑷 0,0,2𝑚 𝑷 0,1,2𝑚−1 .

For example, when 𝑚 = 2, the order of the 19 control points is shown in Fig. 9.

(III) Affine invariance. S(t) is invariant under affine transformations of its control points. 58

W. Shen et al.

Graphical Models 100 (2018) 51–60

Fig. 10. Arc boundary patch. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

Fig. 12. Sphere. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

Third, Fig. 12 shows a unit sphere. Here, 𝑚 = 2 and 𝛼 = 𝜋2 . The 1/8 spherical surface in the first octant is surrounded by the three red arcs. It comprises two patches, which are separated by a blue curve. One of the two patches, bounded by the blue curve and a red arc, is degenerated, where the control points P0, 4, 0 , P0, 3, 1 , P0, 1, 3 and P0, 0, 4 are the same. The entire sphere comprises 16 patches. Lastly, compared with the conventional Bernstein-Bézier surfaces over triangular domains with level 2m, the proposed surface has more control points, which implies more freedom for adjusting the shape. Fig. 13 demonstrates a deformation process of a trigonometric polynomial surface. Here, 𝑚 = 3 and 𝛼 = 2. With the middle control point, PO , transforming from (−5, −5, −5) to (5,5,5), the surface deforms from Fig. 13(a)–(f).

5. Conclusions In this paper, HPA is introduced. In constract to the conventional TPA, HPA possesses different connections of points on each level in the pyramid. HPA is then used to obtain a series of functions of trigonometric polynomials over a triangular domain, which have some Bernsteinlike properties. We also provide the corresponding surfaces over triangular domains and discuss some of their Bézier-like properties. Compared with the basis in [28], our functions are given in the same number, in the same space, but additionally possess positivity, symmetry, partition of unit, and recursive evaluation properties. Although the paper provides some new results, at present, this study is in its infancy and mainly remains at the theoretical stage. First, as a matter of fact, the proposed functions lack the boundary property. It can not degenerate to the p-Bézier [10] on the three boundaries of the triangular domain if m > 1. Second, compared with the linearly independent basis in [28], we have not found a rigorous mathematical proof on the linear independence of the proposed functions. Thus, it is not clear if the expression given by the proposed functions is unique. We hope to overcome these two shortcomings in future and continue to develop this study. Furthermore, adding more elements into HPA to control its paths may be a direction for the future research as well.

Fig. 11. Cylinder. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

Four examples are provided below. First, some patches with arc boundaries can be constructed, as shown in Fig. 10. Here, 𝑚 = 3 and 𝛼 = 𝜋2 . The three boundaries on the planes XOY, YOZ and ZOX of the triangular patch are all 1/4 unit arcs. For verifying the correctness of the boundaries, the three arcs are drawn in red. It can be seen that the three arcs match the three boundaries completely. Note that the surface is not a spherical patch. A 1/8 spherical surface needs two patches. It will be presented in the third example. Second, Fig. 11 is an example of a cylinder, where 𝑚 = 2 and 𝛼 = 𝜋2 . The three boundaries of a cylindrical patch are shown in red. The entire cylinder, lying in the first, second, third, and fourth octants, comprises 8 patches, with two patches in each octant. 59

W. Shen et al.

Graphical Models 100 (2018) 51–60

Fig. 13. PO is (−5, −5, −5) (a), (−3, −3, −3) (b), (−1, −1, −1) (c), (1,1,1) (d), (3,3,3) (e), and (5,5,5) (f).

Acknowledgments

[12] W. Shen, G. Wang, Class of quasi Bézier curves based on hyperbolic polynomials, J. Zhejiang Univ. Sci. A (Appl. Phys. Eng.) 6 (Suppl. 1) (2005) 116–123, doi:10.1007/BF02887226. [13] J. Zhang, C-curves: an extension of cubic curves, Comput. Aided Geom. Des. 13 (3) (1996) 199–217, doi:10.1016/0167-8396(95)00022-4. [14] J. Zhang, C-Bézier curves and surfaces, Graph. Models Image Process. 61 (1) (1999) 2–15, doi:10.1006/gmip.1999.0490. [15] Q. Chen, G. Wang, A class of Bézier-like curves, Comput. Aided Geom. Des. 20 (1) (2003) 29–39, doi:10.1016/S0167-8396(03)00003-7. [16] Y. Li, G. Wang, Two kinds of B-basis of the algebraic hyperbolic space, J. Zhejiang Univ. Sci. A (Appl. Phys. Eng.) 6 (7) (2005) 750–759, doi:10.1007/BF02856184. [17] G. Xu, G. Wang, AHT Bézier surfaces and NUAHT B-spline curves, J. Comput. Sci. Technol. 22 (4) (2007) 597–607, doi:10.1007/s11390-007-9073-z. [18] M. Fang, G. Wang, 𝜔-Bézier, in: Proceedings of the Tenth IEEE International Conference on Computer Aided Design and Computer Graphics, CAD/Graphics, Beijing, 2007, pp. 38–42. 10.1109/CADCG.2007.4407852. [19] J. Zhang, F. Krause, H. Zhang, Unifying C-curves and H-curves by extending the calculation to complex numbers, Comput. Aided Geom. Des. 22 (9) (2005) 865–883, doi:10.1016/j.cagd.2005.04.009. [20] E. Mainar, J. Peña, A general class of Bernstein-like bases, Comput. Math. Appl. 53 (11) (2007) 1686–1703, doi:10.1016/j.camwa.2006.12.018. [21] G. Chang, P. Davis, The convexity of Bernstein polynomials over triangles, J. Approx. Theory 40 (1) (1984) 11–28, doi:10.1016/0021-9045(84)90132-1. [22] G. Chang, Y. Feng, An improved condition for the convexity of bernsteinBézier surfaces over triangles, Comput. Aided Geom. Des. 1 (3) (1984) 279–283, doi:10.1016/0167-8396(84)90014-1. [23] J. Carnicer, M. Floater, J. Peña, Linear convexity conditions for rectangular and triangular Bernstein-Bézier surfaces, Comput. Aided Geom. Des. 15 (1) (1997) 27– 38, doi:10.1016/S0167-8396(97)81783-9. [24] J. Cao, G. Wang, An extension of Bernstein-Bézier surface over the triangular domain, Prog. Nat. Sci. 17 (3) (2007) 352–357, doi:10.1080/10020070612331343269. [25] W. Shen, G. Wang, Triangular domain extension of linear Bernstein-like trigonometric polynomial basis, J. Zhejiang Univ. Sci. C (Comput. Electron.) 11 (5) (2010) 356–364, doi:10.1631/jzus.C0910347. [26] W. Shen, G. Wang, The triangular domain extension of Bézier-like basis for 5-order trigonometric polynomial space, J. Comput. Aided Des. Comput. Graph. 22 (7) (2010) 1099–1103. In Chinese. [27] Y. Wei, W. Shen, G. Wang, Triangular domain extension of algebraic trigonometric Bézier-like basis, Appl. Math. A J. Chin. Univ. (Ser. B) 26 (2) (2011) 151–160, doi:10.1007/sl1766-011-2672-z. [28] A. Róth, I. Juhász, A. Kristály, A constructive approach to triangular trigonometric patches, 2013. Supplied on http://arxiv.org/pdf/1309.4747v2.pdf.

We are very grateful to the referees for their helpful suggestions and comments. We also wish to thank Editage Company for the help in improving the language. This work was partially supported by the National Natural Science Foundation of China (Grants no. 61772013, 61402201, 61272300, 11501252), the State Scholarship Fund (Grant no. 201806795027) from China Scholarship Council, and the Natural Science Foundation of Jiangsu Province of China (Grant no. BK20130117). References [1] R. Goldman, Pyramid Algorithm: A Dynamic Programming Approach to Curves and Surfaces for Geometric Modeling, Morgan Kaufmann, San Francisco, 2003, doi:10.1016/B978-1-55860-354-7.50013-1. [2] G. Farin, Curves and Surfaces for CAGD: A Practical Guide, Academic Press, San Diego, 2002, doi:10.1016/B978-1-55860-737-8.50031-4. [3] C. Loop, T. DeRose, A multisided generalization of Bézier surfaces, ACM Trans. Graph. 8 (3) (1989) 204–234, doi:10.1145/77055.77059. [4] G. Farin, Triangular Berstein-Bézier patches, Comput. Aided Geom. Des. 3 (2) (1986) 83–127. 10. [5] R. Krasauskas, Toric surface patches, Adv. Comput. Math. 17 (1) (2002) 89–113, doi:10.1023/A:1015289823859. [6] L. García-Puente, F. Sottile, C. Zhu, Toric degenerations of Bézier patches, ACM Trans. Graph. 30 (5) (2011) 1317–1329, doi:10.1145/2019627.2019629. [7] C. DeBoor, K. Höllig, S. Riemenschneider, Box Spline, Springer, New York, pp. 1– 201. 10.1007/978-1-4757-2244-4 [8] P. Simeonova, V. Zafirisa, R. Goldman, H-blossoming: a new approach to algorithms and identities for h-Bernstein bases and h-Bézier curves, Comput. Aided Geom. Des. 28 (9) (2011) 549–565, doi:10.1016/j.cagd.2011.09.003. [9] J. Peña, Shape preserving representations for trigonometric polynomial curves, Comput. Aided Geom. Des. 14 (1) (1997) 5–11, doi:10.1016/S0167-8396(96)00017-9. [10] J. Sânchez-Reyes, Harmonic rational Bézier curves, p-Bézier curves and trigonometric polynomials, Comput. Aided Geom. Des. 15 (9) (1998) 909–923, doi:10.1016/S0167-8396(98)00031-4. [11] J. Sânchez-Reyes, Bézier representation of epitrochoids and hypotrochoids, Comput. Aided Des. 31 (12) (1999) 747–750, doi:10.1016/S0010-4485(99)00061-5. 60