Journal of Computational and Applied Mathematics 355 (2019) 1–10
Contents lists available at ScienceDirect
Journal of Computational and Applied Mathematics journal homepage: www.elsevier.com/locate/cam
Constructing Bézier curves with monotone curvature ∗
Aizeng Wang a,b , Gang Zhao a,b , , Fei Hou c,d a
School of Mechanical Engineering & Automation, Beihang University, Beijing 100191, PR China State Key Laboratory of Virtual Reality Technology & Systems, Beihang University, Beijing 100191, PR China State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing, 100190, PR China d University of Chinese Academy of Sciences, Beijing 100049, PR China b c
highlights • A sufficient condition of Bézier curves with monotone curvature is given. • A new designing approach of monotone curvature variation Bézier curves is presented. • The effectiveness of the new designing method is verified by some examples.
article
info
Article history: Received 22 January 2018 Received in revised form 2 November 2018 Keywords: Bézier curves Monotone curvature Aesthetic shapes CAD
a b s t r a c t Monotone curvature plays an important role on curve design with aesthetic shapes. In this paper, we analyze the curvature distributions of Bézier curves and show that if three conditions are satisfied, then the curvature of the Bézier curve is monotone. We also give a sufficient geometric condition of Bézier curves with monotone curvature. Furthermore, we present a designing approach of monotone curvature variation (MCV) Bézier curves. Experiments show that curves constructed by the new method perform well not only in terms of aesthetically pleasing shape, but also in monotone curvature distribution. © 2019 Elsevier B.V. All rights reserved.
1. Introduction The curves with monotone curvature play an important role in industrial products, since industrial design and styling require aesthetic shapes with monotone curvature [1,2]. In conventional computer-aided design (CAD) systems, the curves based on parametric forms, such as Béziers or B-splines, are not adequate for aesthetic requirements. It is very difficult to control the variation of curvature which determines the shape of curves, except for simple straight lines or circles. The requirement of monotone curvature is also an important factor for automatic and aircraft design. Up till now, curves with monotone curvature variation (MCV) can be designed only for some special cases. In 1992, Sapidis et al. gave a sufficient and necessary condition for MCV quadratic Bézier curves [3]. Later, Frey et al. presented a sufficient MCV condition for quadratic rational Bézier curves [4]. Furthermore, Mineur et al. proposed a sufficient condition for a class of planar typical Bézier curves with monotone curvature [5]. In 2004, Y. Wang et al. gave a sufficient MCV condition for planar Bézier curves by two criterion coefficients. But the MCV coefficients are very complex formulas [6]. Refs. [3] and [4] gave the efficient methods for constructing quadratic Bézier curves and rational quadratic Bézier curves with monotone curvature. Compared with Refs. [3] and [4], the proposed approach can be applied to Bézier curves of arbitrary degrees. Essentially Ref. [3] is a special case of our method with degree two. Ref. [5] gave a sufficient method for constructing planar Bézier curves with monotone curvature by an identical rotation and scale to the previous polygon leg. Compared with ∗ Corresponding author at: School of Mechanical Engineering & Automation, Beihang University, Beijing 100191, PR China. E-mail address:
[email protected] (G. Zhao). https://doi.org/10.1016/j.cam.2019.01.004 0377-0427/© 2019 Elsevier B.V. All rights reserved.
2
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
Fig. 1. Control polygon of a Bézier curve and its derivatives.
Ref. [5], our method has more flexibility, because the new approach does not have the requirement of polygon legs with the same rotation and scale. In 2006, G. Farin proposed a concept of Class A Bézier curves [7], which are 3D Bézier curves with monotone curvature, generalizing the 2D class of curves by Y. Mineur et al. [5]. However, Cao et al. discovered that the proof of the curvature monotonicity of Class A Bézier curves was incomplete [8]. Later, Wang et al. [9] gave some counter examples of Class A Bézier curves. MCV curves are important in CAD and computer-aided manufacturing (CAM) applications. Recently, some construction methods of planar MCV curve segments are proposed and used for curve design and fairing [10–13]. The shape of curves is primarily defined by their curvature distribution, and the aesthetically pleasing shape curve has a curvature plot with monotonically varying curvature [14]. But the monotonicity of curvature is not easily achieved and controlled. Aiming to this problem, in this paper we show how to guarantee monotone curvature by enforcing simple geometric constraints on the control polygons of Bézier curves. Since Bernstein polynomials have been widely applied in computer aided geometric design, we are especially interested in the curvature properties of Bézier curves. The rest of this paper is organized as follows. Section 2 introduces Bézier curves and their derivatives. Section 3 presents a sufficient condition for Bézier curves with monotone curvature, and a new designing approach of MCV Bézier curves is also proposed. Finally, several examples of designing Bézier curves by the new approach are given in Section 4, and conclusions are summarized in Section 5.
2. Bézier curves and their derivatives Give a Bézier curve of degree k, P(t) =
k ∑
bi Bi,k (t),
0≤t≤1
(1)
i=0
where bi is the control point (see Fig. 1(a)), Bi,k (t ) is the Bernstein polynomial, and k denotes the degree of the curve. Then, the derivatives of P(t) can be represented as P ′ (t) = k
k−1 ∑
b1i Bi,k−1 (t)
(2)
i=0
b1i = (bi+1 − bi )
(i = 0, 1, . . . , k − 1)
(3)
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
3
Fig. 2. The choose of x-axis.
where P ′ (t) is the first derivative of the Bézier curve, and b1i denotes its control point (see Fig. 1(b)). It also can be followed to get P ′′ (t) = k (k − 1)
k−2 ∑
b2i Bi,k−2 (t)
(4)
i=0
b2i = b1i+1 − b1i
(
(i = 0, 1, . . . , k − 2)
)
(5)
′′
where P (t) represents the second derivative of P(t), and
b2i
denotes its control point (see Fig. 1(c)).
3. A sufficient condition of monotone curvature for Bézier curves In this section, we show if the following three conditions are satisfied, the curve has monotone curvature. Specially, in this paper, the direction of the first control vector b0 b1 of the Bézier curve is chosen as the x-axis (see Fig. 2).
{ }
{ }
Condition (1) The first and second derivative control points b1i and b2i can be in the same quadrant (see Fig. 1(b) and (c)). ′ From condition (1), it can be inferred that P ′ (t) ≥ 0 for t ∈ [0, 1].
)T )1/2
( )T +P ′ (P ′′ )T = P ′ (P ′′ )T , where P ′ and P ′′ denote P ′ t and () ) ( T 1 /2 ∥P ′ ∥ 2 P ′ (P ′ ) ′ P ′′ (t ), respectively. If P ′ and P ′′ in the same quadrant, it can be inferred that P ′ (t) ≥ 0 for t ∈ [0, 1]. □
(
Proof. Because P ′ (t) =
(
P ′ (t) P ′ (t)
′
, we get P ′ =
P ′′ P ′
Condition (2) The angle ̸ Ob2i+1 b2i ≥ π2 , where 0 ≤ i ≤ k − 3 (see Fig. 1(c)). ′ From condition (2), it can be inferred that P ′′ (t ) ≤ 0 for t ∈ [0, 1].
2 Proof. Because ̸ Ob2 b2 ≥ π2 , ∆Ob2i+1 b2i is an obtuse or a right triangle. From the law of cosines, we get Ob2i ≥ 2 2 2 2 2 2 i+2 1 i Ob + b b . That is Ob ≥ Ob . Note that i i+1 i+1 i i+1 k−2 ′′ ∑ 2 P (t ) = Ob Bi,k (t)
(6)
i
i=0 k−2 ′′ ∑ 2 P (t + ∆t ) = Ob Bi,k (t + ∆t)
(7)
i
i=0
′ We have P ′′ (t + ∆t ) ≤ P ′′ (t ), where ∆t ≥ 0 and t ∈ [0, 1]. Then, P ′′ (t ) ≤ 0 for t ∈ [0, 1].
Condition (3) k
Ob1i+1
≤ kb1
b1 i+1 i+2
≤ kb1 b1 (or kOb1 i
i+1
i+1
≤ kOb2
i+1
□
≤ kOb2 ), where 0 ≤ i ≤ k − 3 and k represents the slope of i
the corresponding line segment (see Fig. 1(d)). ⟨ ⟩′ From condition (3), it can be inferred that sin P ′ (t ) , P ′′ (t ) ≤ 0 for t ∈ [0, 1], where ⟨⟩ denotes the angle between the two vectors. Proof. Because the vector Ob2i = b1i b1i+1 (0 ≤ i ≤ k − 3), we get k
Ob2i
we have kOP ′ (t =0) = k
Ob10
≤ kOb1 ≤ kOb1 i
i+1
≤ kOb1
k−1
= kb1 b1 . (a) According to kOb1 i
i +1
i+1
≤ kb1
b1 i+1 i+2
≤ kb1 b1 , i
i+1
= kOP ′ (t =1) . Then, OP (t = t ) has only one intersection point with the ′
∗
control polygon of P ′ (t ). By variation diminishing property of Béziers, OP ′ (t = t ∗ ) also has one intersection point with the) ( curve P ′ (t ). Therefore, kOP ′ (t ) ≤ kOP ′ (t +∆t ) for t ∈ [0, 1]; (If there exists t a < t b such that kOP ′ (t a ) > kOP ′ t b , OP ′ t = t b
will have at least two intersection points with the curve P ′ (t ). This is a contradiction.) (b) From k
Ob1i+1
( ) ≤ kOb2
i+1
≤ kOb2 , i
4
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
Fig. 3. Conditions of Bézier curves with monotone curvature: Red dashed region of b2i+1 , defined by the lines Ob2i , Ob1i+1 , and the red circle where Ob2i is its director.. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 4. One simple case of Bézier curves with monotone curvature.
we get kOP ′′ (t =0) = k
Ob20
̸
⟨
≥ kOb2 ≥ kOb2 i
P ′ (t ) , P ′′ (t ) − ̸
⟩
(
(
⟨
i+1
≥ kOP ′′ (t =1) = kOb2
P ′ (t + ∆t ) , P ′′ (t + ∆t ) ,
⟩
)
(
and kOP ′′ (t ) ≥ kOP ′′ (t +∆t ) . Based on (a) and (b), we get
k−2
))
(
0≤t≤1
(
(8)
)
(
))
= arctg kOP ′′ (t ) − arctg kOP ′ (t ) − arctg kOP ′′ (t +∆t ) − arctg kOP ′ (t +∆t ) ≥ 0 (9) ⟨ ′ ⟩ With ̸ P (t ) , P ′′ (t ) ≤ ̸ b10 Ob20 ≤ π2 , we have ⟩ ⟩ π ⟨ ⟨ 0 ≤ ̸ P ′ (t + ∆t ) , P ′′ (t + ∆t ) ≤ ̸ P ′ (t ) , P ′′ (t ) ≤ (10) 2 ⟩ ⟩ ⟨ ⟨ ′ ′ ′′ ′′ where ⟩ t ∈ [0, 1]. Then, we obtain sin P (t + ∆t ) , P (t + ∆t ) ≤ sin P (t ) , P (t ) . This implies that ⟨ ′ ∆t ′′≥ 0, sin P (t ) , P (t ) is decreasing for 0 ≤ t ≤ 1. □ Theorem 1. If conditions (1–3) are satisfied, then the Bézier curve P(t) has monotone curvature.
′
′
⟩′
Proof. If the three conditions (1–3) are satisfied, we get (1) P ′ (t ) ≥ 0; (2) P ′′ (t ) ≤ 0; (3) sin P ′ (t ) , P ′′ (t ) ≤ 0 for
0 ≤ t ≤ 1. It can be followed that κ (t + ∆t) ≤ κ (t) according to κ (t) =
⟨
∥P ′ ∧P ′′ ∥ ∥P ′′ ∥ sin⟨P ′ ,P ′′ ⟩ = , where ∆t ≥ 0, t ∈ [0, 1]. ∥P ′ ∥3 ∥P ′ ∥2
Then κ (t) is a decreasing function for 0 ≤ t ≤ 1. That is P(t) has monotone curvature. □
2 Corollary 1. If the following three { }conditions { }are satisfied, (1) bi+1 (0 ≤ i ≤ k − 3) is located in the red dashed region (see Fig. 3), (2) k 1 ≤ k 2 ≤ k 2 , (3) b1i and b2i are located in the same quadrant, then the Bézier curve has monotone curvature. Obi+1
Obi+1
Obi
Proof. According to the given geometrical requirement, it can be inferred that (1) b10 , b11 , . . . , b1k−1 and b20 , b21 , . . . , b2k−2
{
are located in the same quadrant; (2) the angle ̸ Ob2i+1 b2i ≥ the director; (3) k 1 ≤ k 2 ≤ k 2 (or k 1 ≤ k 1 1 Obi+1
Obi+1
Obi
Obi+1
π
2
bi+1 bi+2
}
{
}
, because b2i+1 is located in the red circle region, where Ob2i is ≤ k 1 1 ) (see Fig. 3). Conditions (1–3) of Theorem 1 can be bi bi+1
satisfied by the Bézier curve. Therefore, the curvature of this curve is monotone on [0,1]. □
Corollary 2. If b1i+1 b1i+2 ≤ b1i b1i+1 and b1i+1 b1i+2 //b1i b1i+1 are satisfied for 0 ≤ i ≤ k − 3 (see Fig. 4), the Bézier curve has monotone curvature, because it is a special case of Corollary 1. Corollary 3. Designing Bézier curves with monotone curvature
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
5
Fig. 5. The initial vector.
Fig. 6. The second vector.
Fig. 7. The third vector . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
According to Corollary 1, it contains the following several steps. (Step 1) Give an initial vector V0 = b1 − b0 (see Fig. 5), (Step 2) Determine V1 = V0 + ∆V0 , where V0 and ∆V0 are located in the same quadrant (see Fig. 6). (Step 3) Determine V2 = V1 + ∆V1 , where k
Ob11
≤ kOb2 , and ∆V1 (b21 ) is located in the red dashed region (see Fig. 7). 0
(Step 4) Determine Vi+2 = Vi+1 + ∆Vi+1 (0 ≤ i ≤ k − 3), where k
Ob1i+1
≤ kOb2 , and ∆Vi+1 (b2i+1 ) is located in the red dashed i
region (see Fig. 8). { } { } By the above steps, the three conditions of Theorem 1 can be satisfied. That is (1) the control points b1i and b2i are in the same quadrant condition, (2) k 1 ≤ k 2 ≤ k 2 , and (3) ̸ Ob2i+1 b2i ≥ π2 . Then, the designed curve has monotone curvature.
Obi+1
Obi+1
Obi
4. Numerical examples In this section, the new designing approach is verified by four examples, and all experiments are carried out on a PC with CPU 2.30 GHz and RAM 4.00 GB. The first example is a cubic Bézier curve points (see Fig. 9(a)). As shown in Fig. 9(b), we get (1) the { with } four { control } first and second derivative control points b1i and b2i are located in the same quadrant; (2) the angle ̸ Ob21 b20 ≥ π2 ;
6
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
Fig. 8. The vector Vi+2 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 9. The first example of designing Bézier curves with monotone curvature.
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
7
Fig. 10. The second example of designing Bézier curves with monotone curvature.
(3) k
Ob11
≤ kb1 b1 ≤ kb1 b1 , where k represents the slope of the corresponding line segment. Because the three conditions of 1 2
0 1
Theorem 1 are satisfied, the cubic Bézier curve P(t) has monotone curvature (see Fig. 9(c) and (d)). The second example is also a cubic Bézier curve (see Fig. 10). The third and the fourth examples provide two Bézier curves with degree 4 and 5, respectively (see Figs. 11 and 12). As shown in Figs. 10(b), 11(b) and 12(b), we get (1) the control points
{ 1} bi
{ }
and b2i are located in the same quadrant; (2) the angle ̸ Ob2i+1 b2i ≥
π 2
; (3) k
Ob1i+1
≤ kb1
b1 i+1 i+2
≤ kb1 b1 . Because the i
i+1
three conditions of Theorem 1 are satisfied, the Bézier curves with degree 3, 4 and 5 (see Figs. 10(c), 11(c) and 12(c)) have monotone curvature, and their curvature distributions are also given (see Figs. 10(d), 11(d) and 12(d)).
8
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
Fig. 11. The third example of designing Bézier curves with monotone curvature.
Example 1 See Fig. 9. Example 2 See Fig. 10. Example 3 See Fig. 11. Example 4 See Fig. 12.
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
9
Fig. 12. The fourth example of designing Bézier curves with monotone curvature.
5. Conclusions The shape of curves is primarily defined by its curvature distribution, and monotone curvature is important in CAD/CAM. In this paper, we analyze the curvature distributions of Bézier curves and obtain that the curvature of the Bézier curve is monotone if the three conditions are satisfied. Then, we propose a novel geometrical condition of Bézier curves with monotone curvature, and a new designing approach of MCV Bézier curves. Several examples are given to show that curves constructed by our method have monotone curvature distributions and aesthetically pleasing shapes.
10
A. Wang, G. Zhao and F. Hou / Journal of Computational and Applied Mathematics 355 (2019) 1–10
Acknowledgments This work was supported partially by the Fundamental Research Funds for the Central Universities, the Natural Science Foundation of China (Project No. 61572056) and Special Plan for the Development of Distinguished Young Scientists of ISCAS (Y8RC535018). References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
G.D. Birkhoff, Aesthetic Measure, Harvard Univ. Press, Cambridge, MA, 1933. G. Farin, N. Sapidis, Curvature and the fairness of curves and surfaces, IEEE Comput. Graph. Appl. 9 (2) (1989) 52–57. N.S. Sapidis, W.H. Frey, Controlling the curvature of quadratic Bézier curve, Comput. Aided Geom. Design 9 (2) (1992) 85–91. W.H. Frey, D.A. Field, Designing Bézier conic segments with monotone curvature, Comput. Aided Geom. Design 17 (2000) 457–483. Y. Mineur, T. Lichah, J.M. Castelain, H. Giaume, A shape controlled fitting method for Bézier curves, Comput. Aided Geom. Design 15 (9) (1998) 879–891. Y. Wang, B. Zhao, L. Zhang, J. Xu, K. Wang, S. Wang, Designing fair curves using monotone curvature pieces, Comput. Aided Geom. Design 21 (2004) 515–527. G. Farin, Class A Bézier curves, Comput. Aided Geom. Design 23 (7) (2006) 573–581. J. Cao, G. Wang, A note on Class A Bézier curves, Comput. Aided Geom. Design 25 (7) (2008) 523–528. A. Wang, G. Zhao, Counter examples of Class A Bézier curves, Comput. Aided Geom. Design 61 (2018) 6–8. D.J. Walton, D.S. Meek, Cubic Bézier spiral segments for planar G2 curve design, in: Proceedings Afrigraph (2010) 21-25. D.J. Walton, D.S. Meek, A further generalisation of the planar cubic Bézier spiral, J. Comput. Appl. Math. 236 (11) (2012) 2869–2882. L. Ma, C. Zhang, X. Zhang, F. Cheng, Construction of G3 conic spline interpolation, Comput. Aided Des. 71 (2016) 15–27. A. Wang, G. Zhao, Curvature variation factor and its application, Int. J. Wavelets Multiresolution Inf. Process. 15 (2) (2017) 1–10. G. Farin, Curves and Surfaces for Computer Aided Geometric Design, fifth ed., Morgan Kaufmann, 2001.