Journal of Information & Computational Science 4: 2 (2007) 871–878 Available at http://www.joics.com Shape Control of Cubic H-Bézier Curve by Moving Control Point ? Hongyan Zhao a,b , a Department b State Guojin Wang a,b,∗ of Mathematics, Zhejiang University, Hangzhou 310027, China Key Laboratory of CAD & CG, Zhejiang University, Hangzhou 310027, China Received 4 June 2006; revised 23 December 2006 Abstract This paper considers the shape control of the cubic H-Bézier curve, which can represent hyperbolas and catenaries accurately. We fix all the control points while let one vary. The locus of the moving control point that yields a cusp on the cubic H-Bézier curve is a planar curve; The tangent surface of the planar curve is the locus of the positions of the moving control point that yield inflection points. The positions of the moving control point that yield a loop lie on a plane. We provide the comparison on the singularity of cubic Bézier, cubic rational Bézier, C-Bézier and H-Bézier curves. The approach and results may have significant application in shape classification and control of parametric curves. Keywords: Singularity; Cubic H-Bézier curves; Moving control point 1 Introduction In geometric modeling, it is necessary not only to detect the amount and positions of singularities of a parametric curve, but also to design a curve with users-specified singularities, such as cusps, zero curvature points, and self-intersection points. There are lots of literature on this topic. The relevant methods can be classified into two kinds: the characteristic function method ([8, 9]) and moving control point method ([5, 7]). Su and Liu [8] presented a specific geometric solution for the Bézier representation. Wang ([9]) produced algorithms based on algebraic properties of the coefficients of the parametric polynomial and included some geometric tests using the Bspline control polygon. Stone and DeRose ([7]) mapped three control points of cubic parametric curves to specific locations on the plane, and characterized the image curve by the position of the fourth point. Meek and Walton ([5]) studied the moving control point method in the case of planar B-spline curves. Manocha and Canny ([4]) considered polynomial and rational polynomial parametric curves of high degree. Li and Cripp ([2]) and Monterde ([6]) discussed the shape control for rational curves and rational Bézier curves respectively. ? ∗ Supported by 973 Program of China (No. 2004CB719400), NNSF of China (No. 60673031, No. 60333010). Corresponding author. Email address: wanggj@zju.edu.cn (Guojin Wang). c 2007 Binary Information Press 1548–7741/ Copyright ° June 2007 872 H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 However, the previous work usually focused on polynomial or rational polynomial parametric curves. Transcendental curves ([10]), such as hyperbolas and catenaries, which have wide-ranging application could not be characterized by them. The curves are usually generated using blending spline basis, such as hyperbolic Bézier functions and hyperbolic B-spline functions. The determination and properties of their singularities have to be studied in a different way therefore. Taking cubic H-Bézier curves as an example, we apply the newest moving control point technique ([1]) to characterize their singularities. We hold three control points fixed, and take the fourth control point as a moving one. As the fourth point varies, the curve may take on a loop, a cusp, and one to two inflection points, depending on the position of the moving point. The locus of the moving control point that yields a cusp on the curve is a planar curve called the discriminant curve. The tangent surface of the discriminant curve is the locus of the moving control point which yields a zero curvature point. And the locus yielding a self-intersection point is a surface defined on a triangle region with the discriminant curve as a boundary. In this way, the singularities of H-Bézier curves are completely characterized by the positions of the moving control point. The method provides a geometric characterization of curves with singularities. It transfers the control point directly, and can be efficiently implemented. Therefore the method is especially suitable for engineering applications. In the end of this paper, we provide the comparison on the singularity of cubic Bézier, rational Bézier, C-Bézier and H-Bézier curves. 2 Preliminary The cubic H-Bézier curve is usually represented with a parametric curve as Qα (t) = Z0 (t)d0 + Z1 (t)d1 + Z2 (t)d2 + Z3 (t)d3 . (1) Here Z0 −c sinh t + s cosh t + t − α Z1 1 (M + c) sinh t − (K + s) cosh t − (M + 1)t + s + K Z2 = s − α −(M + 1) sinh t + K cosh t + (M + 1)t − K Z3 sinh t − t , 0 ≤ t ≤ α, (c + 1)(s − α) s(s − α) ,M = . For i = 0, 1, 2, 3, αc + α − 2s αc + α − 2s Zi = Zi (t) are cubic H-Bézier basis functions, and di are control points. n P Consider a parametric curve segment Q(t) = Zj (t)dj , t ∈ [a, b]. Let di be the moving control where α > 0, s = sinh α, c = cosh α, K = j=0 point and hold the remaining three control points {d0 , d1 , d2 , d3 }\{di } fixed. The H-Bézier curve represented by Eq. (1) is rewritten as Q(t) = Zi di + ri (t), ri (t) = 3 X j=0,j6=i Suppose ci (t) = − r0i (t) , Zi0 (t) Zj (t)dj . H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 873 where r0i (t) represents the derivative of ri (t). ci (t) is called the discriminant curve of d i ([1]). When d i moves along ci (t), it yields a cusp on Q(t). When d i moves on the tangent surface of ci (t), it yields one or two inflection points on Q(t). We define the discriminant surface Ii (t, δ) as Ii (t, δ) = − ri (t + δ) − ri (t) , Zi (t + δ) − Zi (t) t ∈ [a, b], δ ∈ (a, b − t]. When d i moves on the discriminant surface Ii (t, δ), we derive Q(t) with a self-intersection point on it. The discriminant surface is defined on a triangular region, whose three boundary curves are respectively Ii (a, δ), δ ∈ (0, b − a]; Ii (t, b − t), t ∈ [a, b); lim Ii (t, δ) = ci (t), t ∈ [a, b]. δ→0 3 Singularities of Cubic H-Bézier curves Theorem 1 For a cubic parametric curve represented by combination of control points and basis functions which satisfy the weighting property, that is, the sum of the basis functions should be 1, the discriminant surface is a planar region spanned by three control points. Proof Suppose the curve P(t) with representation of P(t) = 3 X Fj (t)dj , t ∈ [a, b] j=0 meets the weighting property requirement, where Fj (t) and dj (i = 0, 1, · · · , n) are respectively the basis functions and control points. The discriminant surface of di is Ii (t, δ) = − 3 X Fj (t + δ) − Fj (t) dj , F i (t + δ) − Fi (t) j=0,j6=i Since 3 X Fj (t + δ) = j=0 there is − 3 X 3 X t ∈ [0, α], δ ∈ (0, α − t]. Fj (t) = 1, j=0 (Fj (t + δ) − Fj (t)) = Fi (t + δ) − Fi (t). j=0,j6=i When Fi (t + δ) − Fi (t) 6= 0, we derive 3 X Fj (t + δ) − Fj (t) = 1. − F i (t + δ) − Fi (t) j=0,j6=i It indicates that for any t ∈ [a, b], δ ∈ (a, b − t], Ii (t, δ) is always on the plane determined by {d0 , d1 , d2 , d3 }\{di }, that is, the discriminant surface is a planar region. 874 H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 Corollary 1 The discriminant curve, its tangent surface and the discriminant surface of the cubic H-Bézier curve is on the same plane determined by the three control points {d0 , d1 , d2 , d3 }\{di }. In the following, we will specify the discriminant curve and surface of each control point respectively. 1) Choose d0 as the moving control point, the corresponding discriminant curve (shown at the left-up in Fig. 1) is (M + c) cosh t − (K + s) sinh t − (M + 1) d1 c cosh t − sinh t − 1 (M + 1) cosh t − K sinh t − (M + 1) cosh t − 1 − d2 + d 3. c cosh t − s sinh t − 1 c cosh t − s sinh t − 1 It is a planar curve and K c 0 (0) = d1 , c 00 (0) = (d1 − d2 ). c−1 Applying the parameter transformation u = tanh 2t , we will derive one of the quadratic rational representations of the curve: c0 (t) = c 0 (t(u)) = 2(M + 1)u2 − 2Ku (2M + c + 1)u2 − 2(K + s)u + c − 1 d − d2 1 (1 + c)u2 − 2su + c − 1 (1 + c)u2 − 2su + c − 1 2u2 + d 3. (1 + c)u2 − 2su + c − 1 Obviously, c 0 (t) has one point at infinity (at t = α, u = tanh α 2 ). It is a parabola when d 1 , d 2 , d 3 are not collinear. So the discriminant curve of d0 is a parabola starting from d 1 −−→ with tangent direction d2 d1 . 2) Choosing d1 as the moving control point, the corresponding discriminant curve (shown at the right-up in Fig. 1) is c1 (t) = c cosh t − s sinh t − 1 d0 (M + c) cosh t − (K + s) sinh t − (M + 1) (M + 1) cosh t − K sinh t − (M + 1) + d2 (M + c) cosh t − (K + s) sinh t − (M + 1) cosh t − 1 − d 3. (M + c) cosh t − (K + s) sinh t − (M + 1) It lies in the plane spanned by d 0 , d 2 , d 3 , and c 1 (0) = d0 , c 01 (t) = K (d0 − d2 ). c−1 Applying the parameter transformation u = tanh 2t , its quadratic rational representation is derived: (1 + c)u2 − 2su + c − 1 2(M + 1)u2 − 2Ku c 1 (t(u)) = d + d2 0 (2M + c + 1)u2 − 2(K + s)u + c − 1 (2M + c + 1)u2 − 2(K + s)u + c − 1 2u2 − d 3. (2M + c + 1)u2 − 2(K + s)u + c − 1 H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 d2 875 d2 d1 d1 d0 d3 d0 d3 c1(t) c0(t) d2 d2 d1 d3 d0 d3 d0 c2(t) d1 c3(t) Fig. 1: Four discriminant curves with their tangent surfaces of the cubic H-Bézier curve (α = 1.3). α(αs − 2c + 2) The curve has two points at infinity (at t = arc sinh , u = 2M +s c + 1 and (c − 1)2 − (s − α)2 t = α, u = tanh α 2 ). It is a hyperbola when d 0 , d 2 , d 3 are not collinear. So the discriminant −−→ curve of d 1 (t) is a hyperbola starting from the control point d 0 with tangent direction d2 d0 . 3) Choosing d2 as the moving control points, the discriminant curve (shown at the left-down in Fig. 1) is c cosh t − s sinh t − 1 d0 (M + 1) cosh t − K sinh t − (M + 1) (M + c) cosh t − (K + s) sinh t − (M + 1) + d1 (M + 1) cosh t − K sinh t − (M + 1) cosh t − 1 + d 3. (M + 1) cosh t − K sinh t − (M + 1) c 2 (t) = − It lies in the plane spanned by d 0 , d 1 , d 3 , and c 2 (α) = d3 , c 02 (α) = K (d3 − d1 ). 1−c Applying the transformation u = tanh 2t , we shall derive its quadratic rational representation as (2M + c + 1)u2 − 2(K + s)u + c − 1 (1 + c)u2 − 2su + c − 1 d + d1 c 2 (t(u)) = 0 2(M + 1)u2 − 2Ku 2(M + 1)u2 − 2Ku 2u2 − d 3. 2(M + 1)u2 − 2Ku H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 877 the tangent curves of the discriminant curve ci (t), R3 is the discriminant surface I i (t, δ), and R4 is the remaining part of the plane. The four regions characterize the singularity of the cubic H-Bézier curve completely. For instance, the relation between the positions of the control point d 0 and the singularity of the curve is listed in the below, which also provides a practical and efficient rule for shape control of H-Bézier curves. • d 0 on the discriminant curve c 0 (t) yields a cusp on the H-Bézier curve. • d 0 in region R1 , that is, on the tangent curve of one point on c 0 (t), yields a inflection point on the H-Bézier curve. • d 0 in region R2 , that is, on the tangent curves of two different points on c 0 (t), yields two inflection points on the H-Bézier curve. • d 0 in region R3 , that is, the discriminant surface I 0 (t, δ), yields a self-intersection point (a loop) on the H-Bézier curve. • d 0 in region R4 yields no singularity on the H-Bézier curve. 4 Comparison Like cubic Bézier and C-Bézier curves, the discriminant curves c0 (t) and c3 (t) of H-Bézier curves are also parabolas, and that c1 (t) and c2 (t) are hyperbolas. The discriminant curves of cubic rational Bézier curves are quartic rational curves. For all of these curves, the discriminant curves ci (t) always lie on the plane spanned by {d0 , d1 , d2 , d3 }\{di }. We list the types of the discriminant curves of the four kinds of cubic curves in Table 1 below. Table 1: Types of discriminant curves. Discriminant curve Cubic Bézier Cubic rational Bézier Cubic C-Bézier c0 parabola planar quartic rational parabola c1 hyperbola planar quartic rational hyperbola c2 hyperbola planar quartic rational hyperbola c3 parabola planar quartic rational parabola Cubic H-Bézier parabola hyperbola hyperbola parabola The discriminant surface of the four curves are also in the plane spanned by three control points {d0 , d1 , d2 , d3 }\{di }. 5 Conclusion In this paper, we provide the characterization and determination of the singularities for cubic H-Bézier curves. We employ a method different from the previous ones. The method bases on the observation that varying loci of control points yield different singularities. We figure out rules for characterizing regions of the moving control point which yield singularities. For cubic parametric curves, the discriminant curve and surface of the same control point are always on a 878 H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 871–878 same plane. We provide the comparison of cubic Bézier, rational Bézier, C-Bézier and H-Bézier curves. The approach and the results can be widely applied in areas of singularities detecting, shape controlling by moving control points and so on. References [1] Imre Juhász, On the singularity of a class of parametric curves, Computer Aided Geometric Design 23 (2006) 146-156. [2] Y. M. Li and R. J. Cripps, Identification of inflection points and cusps on rational curves, Computer Aided Geometric Design 14 (1997) 491-497. [3] Y. G. Lü, G. Z. Wang and X. N. Yang, Uniform hyperbolic polynomial B-spline curves, Computer Aided Geometric Design 19 (2002) 379-393. [4] D. Manocha and J. F. Canny, Detecting cusps and inflection points in curves, Computer Aided Geometric Design 9 (1992) 1-24. [5] D. S. Meek and D. J. Walton, Shape determination of planar uniform cubic B-spline segment, Computer Aided Design 22 (1990) 434-441. [6] J. Monterde, Singularities of rational Bézier curves, Computer Aided Geometric Design 18 (2001) 805-816. [7] M. C. Stone and T. D. DeRose, A geometric characterization of parametric cubic curves, ACM Trans. Graph. 8 (1989) 147-163. [8] B. Q. Su and D. Y. Liu, Computational Geometry: Curve and Surface Modeling, Academic Press, Inc., Boston, 1989. [9] C. Y. Wang, Shape classification of the parametric cubic curve and parametric B-spline cubic curve, Computer Aided Design 13 (1981) 199-206. [10] Q. M. Yang and G. Z. Wang, Inflection points and singularities on C-curves, Computer Aided Geometric Design 21 (2004) 207-213.