Original Research ARTICLE
Necessary and Sufficient Conditions for Expressing Quadratic Rational Bézier Curves
- 1School of Economics and Management, Anhui University of Science and Technology, Huainan, China
- 2School of Computing and Information Technology, Faculty of Engineering and Information Sciences, University of Wollongong, Wollongong, NSW, Australia
- 3School of Mathematics and Physics, Anhui University of Science and Technology, Huainan, China
Quadratic rational Bézier curve transformation is widely used in the field of computational geometry. In this paper, we offer several important characteristics of the quadratic rational Bézier curve. More precisely, on the basis of proving its monotonicity, the necessary and sufficient conditions for transforming a quadratic rational Bézier curve into a point, line segment, parabola, elliptic arc, circular arc, and hyperbola are proved, respectively.
Bézier curves have wide application in computer-aided geometric design, being used to provide precisely described points along a given curve . Compared to other methods, such as the French curve, Bézier-based approaches are more computationally affordable and reliable. Additionally, the advantages of the Bézier curve in geometric design include its simple but clear mathematical function . For instance, it is capable of incorporating both conic sections and parametric cubic curves as special cases . As such, one can deal with two different curves simultaneously using one unique computational procedure. Some preliminary studies and applications of Bézier curves can be found in Lu et al. , Lee , and Han .
In this paper, to better understand the basic characteristics of Bézier curves, we conduct some fundamental research. In particular, we discuss the necessary and sufficient conditions for representing six different basic shapes, including a point, line segment, parabola, elliptic arc, circular arc, and hyperbola, using Bézier curves [7, 8]. These results play a fundamental role in the shape formulation and can help in facilitating any subsequent computer-based geometric design.
To begin with, we introduce the mathematical model of the quadratic rational Bézier curve .
Definition 1. The quadratic rational Bézier curve is defined as follows:
and ω0 and ω2 are not zero values at the same time.
The monotonicity of Formula (1.2) is discussed below. Let μ1 ∈ [0, 1], μ2 ∈ [0, 1], and μ1 ≤ μ2. Accordingly, in the case of μ1 = 0, we have:
Note that 1 ≥ μ2 > μ1 ≥ 0, and ; then it is easy to have t2 ≥ t1 = 0.
In the case of μ1 ≠ 0 and μ2 ≠ 0, according to Formula (1.2), we have:
Let and substitute μ with t in the standard form of the quadratic rational Bézier curve. To this end, we have the simplified version of the quadratic rational Bézier curve, which is expressed as follows:
2. Sufficient and Necessary Conditions for a Quadratic Rational Bézier Curve to Degenerate into a Point
Theorem 1. A quadratic rational Bézier curve degenerates into a point if and only if three control points P0, P1, P2 coincide.
Proof. Assume that the quadratic rational Bézier curve degenerates to a point PA. That is,
As can be seen from Formula (7), when t ∈ (0, 1), we have (1−t)2 ≠ 0, t2 ≠ 0, 2t(1−t) ≠ 0, so P0 = PA, P1 = PA, P2 = PA. That is, when the quadratic rational Bézier curve degenerates into a point, P0, P1, P2 are the same point of PA.
On the other hand, when three control points coincide (say, the same point PA), we know that:
3. Necessary and Sufficient Conditions for Degradation of a Quadratic Rational Bézier Curve into a Linear Section
Theorem 2. The quadratic rational Bézier curve degenerates into a straight line segment if and only if the control points P0, P2 do not coincide, the weight factor ω = 0, or the control point P1 is on the line segment [14–16].
Proof. First, we assume that one point is with two coordinates; alternatively, we have P0 = (x0, y0), P1 = (x1, y1), and P2 = (x2, y2). As such, for an arbitrary point p(t) = (x, y), according to Formula (6) it is easy to have:
On the other hand, a general form for a line function can be expressed as: y = ax + b, where a, and b is a constant . Then, substituting x and y using Formula (12), we can get:
If we simplify the above formula, it is easy to know:
First, we assume that one point is with two coordinates; alternatively, we have P0 = (x0, y0), P1 = (x1, y1), and P2 = (x2, y2). As such, for an arbitrary point p(t) = (x, y), according to Formula (6) it is easy to have:
Therefore, Formula (11) is further simplified:
Next, Formula (14) is analyzed in the following aspects:
1. If the control point P1 is also on the Bézier curve (or on the straight line), then y1 − ax1 − b = 0, and Formula (14) clearly holds.
2. If the control point P1 is not on the Bézier curve (or not on the straight line), then y1 − ax1 − b ≠ 0, and Formula (14) can be simplified as
Therefore, when t ∈ [0, 1], in order to make Formula (15) hold, we have ω = 0.
As such, it is proved that when the quadratic rational Bézier curve degenerates into a straight line segment, two conditions are met: (1) the weight factor ω = 0, or (2) the control point P1 is on the line segment with the control point P0, P2 as the end point. In the following, we discuss these two conditions separately.
1. According to Formula (6), when the weight factor ω = 0, we have:
To simplify the calculation process, let us assume that:
Now the following formula holds:
As the control points P0, P2 do not coincide, x0 ≠ x2, y0 ≠ y2,
where x0, x2, y0, y2 are constants. We assume that (that is, A,B,C are all constants). Accordingly, we know that Ay − Bx = C is a line segment .
2. Let the conditional control point P1 be the end point (on the line segment with the control points P0 and P2) ; thus, it can be seen that:
The Formula (25) can be substituted with Formula (6) to have:
Then we set:
Comparing Formula (26) with Formula (27), it is easy to find that
In conclusion, Formula (28) is the parametric formula of the line segment. When the control point P1 is on the line segment with the control point (P0, P2) as the end point, Formula (26) can be written as the parametric formula of the line segment of Formula (28). As such, it is proved that it degenerates into a line segment [23, 24].
4. Necessary and Sufficient Conditions for a Quadratic Rational Bézier Curve to Represent a Section of Arc
Theorem 3. Quadratic rational Bézier curves can be used to represent an arc if and only if |P0P1| = |P2P1| and 0 ≤ ω ≤ 1 .
Proof. The equation of a circle passing through three collinear points Qi(xi, yi), (i = 1, 2, 3), on a rectangular coordinate plane is:
Given three points that are not collinear, we have:
The arc curve starts from point P0 and passes through point A to point P2. Now, let us find another control vertex P1. To do so, P0, A, P2 are substituted into the three-point common-circle equation 29, and we get
From Formula (30) to Formula (31), we can find that x0 = −a, y0 = 0, x2 = a, y2 = 0. Furthermore, by expanding the determinant 31 in the first row, we have
Finally, the above formula can be simplified as follows:
Because yA ≠ 0, it is easy to know
On the other hand, as xA = 0, we can add xA to have
Summarizing the above formula, the coordinates of the center of the circle O are:
The radius of the circle is:
The vertical lines of OP0 and OP2 are made from points P0 and P2, respectively. According to the symmetry, if two vertical lines intersect with the Y axis at point P1, then point P1 is the control vertex of the arc curve. That is,
Accordingly, the coordinates of point P1 are:
From the definition of the Bézier Curve in Formula (1), we have:
To simply Formula (41), we further introduce the Quadratic Bernstein Basis Function (Bi,2(t)), which can be expressed as follows:
As such, Formula (41) can be rewritten by applying Bi,2(t) in the following format:
On the other hand, note that the standard equation of curve arc circle can be estimated as
Consequently, by substituting Formulas (43) into Equation (44), the following results are obtained:
As such, Formula (45) can be further simplified as
Furthermore, according to Formula (38) and Formula (40), we can have
Again, we consider the Quadratic Bernstein Basis Function, and then the above formula (in Formula 49) can be simplified as follows:
Next, according to Formula (40), we know
and t ∈ (0, 1), t2(1 − t)2 ≠ 0. It is thus easy to know
According to the standard form of the quadratic rational Bézier curve (see Formula 6), we can further estimate ω0 = ω2 = 1, ω1 = cosθ, and the value range of θ of the center angle of the semicircle should be 0 ≤ θ ≤ π/2 .
In summary, the rational quadratic Bézier expressions of arc curves passing through points P0, A, P2 are as follows,
Compared with the standard formula of a rational quadratic Bézier, the following results are obtained,
where 0 ≤ θ ≤ π/2, 0 ≤ ω ≤ 1. Consequently, the necessary and sufficient conditions for a rational quadratic Bézier curve to represent a circular arc are expressed as follows:
5. Necessary and Sufficient Conditions for Quadratic Rational Bézier Curves to Represent a Parabola, Elliptic Arc and Hyperbola
Theorem 4. Quadratic rational Bézier curve represents a parabola, elliptic arc, and hyperbola if and only if ω = ±1, −1 < ω < 1, and ω < −1 or ω> 1, respectively .
Proof. According to the second order Bernstein basis function of Formula (42), Bézier curve from Formula (1) is written as follows,
Next, we introduce the Local Oblique Coordinate System P1, S, T, so that S = P0 − P1, T = P2 − P1. Since point P(t) is within δP0P1P2 for arbitrary t ∈ [0, 1], P(t) can be rewritten as
Comparing the coefficients from both Formula (56) and Formula (58), we know that
Let , where k is the shape-invariant factor of a conic, so
Formula (60) is an implicit equation of a quadratic curve in the local oblique coordinate system P1, S, T. The expansion of Formula (60) further indicates that:
In the Cartesian coordinate system, the image of a binary quadratic equation can represent a conic curve, and all conic curves can be derived in the aforementioned way . The equation has the following forms :
where A, B, C, D, E, F are polynomial coefficients. If the following conditions are satisfied,
then Formula (62) represents an ellipse; furthermore, under the same condition, if the conic degenerates (that is, A = C, B = 0), the equation represents a circle. Additionally, if the following conditions are satisfied,
then Formula (62) represents a parabola . Finally, if the following conditions are satisfied,
then Formula (62) represents an hyperbola. The coefficients from Formula (61) and Formula (62) can be obtained as follows: A = k, B = k − 2, C = k, D = −2k, E = −2k, F = k. As such, we can get:
Algorithm 5: For Quadratic Rational Bézier Curves to Represent a Parabola, Elliptic Arc and Hyperbola
We then provide the discussion and judgment of Formula (66). That is, from the condition of Formula (63), if the curve is an ellipse, then in Formula (66) we have B2 − 4AC = 1 − k < 0. Therefore, when k > 1, the curve is an ellipse. From the condition of (64), if the curve is a parabola, then B2 − 4AC = 1 − k = 0 (again see Formula 66). Therefore, when k = 1, the curve is a parabola. From the condition of 65, if the curve is a hyperbola, then B2 − 4AC = 1 − k > 0, so when k < 1, the curve is a hyperbola.
Note that . In summary, under the standard form of the quadratic rational Bézier curve, we have ω0 = ω2 = 1, and ω = ω1. Consequently, we prove that when −1 < ω < 1, the quadratic rational Bézier curve is a ellipse; when ω = ±1, the quadratic rational Bézier curve is a parabola; when ω < −1, or ω > 1, the quadratic rational Bézier curve is a hyperbola.
In this paper, we discuss the necessary and sufficient conditions for utilizing quadratic rational Bézier curves to represent different shapes, such as a point, line segment, parabola, elliptic arc, circular arc, and hyperbola. These results can be further used to facilitate other computer-aided geometric designs.
Data Availability Statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
CY: conceptualization, methodology, software, validation, investigation, visualization, and writing original draft. JY: software, writing - review & editing, and supervision. YL: software, visualization, and writing - original draft. XG: writing - review & editing, validation, and visualization.
This work was supported by the National Natural Science Foundation of China (Grant No. 61873004, 51874003) and the Humanities and Social Sciences Foundation of Anhui Department of Education, China (Grant No. SK2017A0098). We would also like to thank JY from the University of Wollongong for his useful discussion.
Conflict of Interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
7. Samreen S, Sarfraz M, Hussain MZ, Livesu M. Computer aided design using a rational quadratic trigonometric spline with interval shape control. In: 2017 International Conference on Computational Science and Computational Intelligence. Las Vegas, NV: IEEE (2017). p. 246–51.
8. Bashir U, Abbas MA, Ali JA. The G2 and C2 rational quadratic trigonometric Bézier curve with two shape parameters with applications. Appl Math Comput. (2013) 219:10183–97. doi: 10.1016/j.amc.2013.03.110
10. Bastl B, Jttler B, Lvicka M, Schicho J, Sír Z. Spherical quadratic Bézier triangles with chord length parameterization and tripolar coordinates in space. Comput Aided Geometr Des. (2011) 28:127–34. doi: 10.1016/j.cagd.2010.11.001
11. Hussain MZ, Irshad M, Sarfraz M, Zafar N. Interpolation of discrete time signals using cubic functions. In: IEEE International Conference on Information Visualization. Chicago, IL: IEEE (2015). p. 454–9.
16. Sarfraz M, Samreen S, Hussain MZ. Modeling of 2D objects with weighted Quadratic Trigonometric Spline. In: 13th International Conference on Computer Graphics, Imaging and Visualization. Beni Mellal (2016). p. 29–34.
17. Lee T-K, Baek S-H, Choi Y-H, Oh S-Y. Smooth coverage path planning and control of mobile robots based on high resolution grid map representation. Robot Auton Syst. (2011) 59:801–12. doi: 10.1016/j.robot.2011.06.002
21. Xu A, Viriyasuthee C, Rekleitis I. Efficient complete coverage of a known arbitrary environment with applications to aerial operations. Auton Robot. (2014) 36:365–81. doi: 10.1007/s10514-013-9364-x
22. Khan A, Noreen I, Habib Z. Coverage path planning of mobile robots using rational quadratic Bézier spline. In: 2016 International Conference on Frontiers of Information Technology. Islamabad: IEEE (2016). p. 319–23.
Keywords: Bézier curve, quadratic rational, necessary and sufficient conditions, geometry, computer aided geometric design
Citation: Yang C, Yang J, Liu Y and Geng X (2020) Necessary and Sufficient Conditions for Expressing Quadratic Rational Bézier Curves. Front. Phys. 8:175. doi: 10.3389/fphy.2020.00175
Received: 25 March 2020; Accepted: 24 April 2020;
Published: 09 June 2020.
Edited by:Jia-Bao Liu, Anhui Jianzhu University, China
Reviewed by:Qin Zhao, Hubei University, China
Liangchen Li, Luoyang Normal University, China
Jianbing Liu, West Virginia University, United States
Copyright © 2020 Yang, Yang, Liu and Geng. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Chaoyu Yang, firstname.lastname@example.org
†These authors have contributed equally to this work