5,473
Views
21
CrossRef citations to date
0
Altmetric
Research Articles

Defining a curve as a Bezier curve

&
Pages 522-528 | Received 10 Dec 2018, Accepted 22 Mar 2019, Published online: 15 Apr 2019

Abstract

A Bezier curve is significant with its control points. When control points are given, the Bezier curve can be written using De Casteljau's algorithm. An important property of Bezier curve is that every coordinate function is a polynomial. Suppose that a curve α(t) is a curve which coordinate functions are polynomial. Can we find points that make the curve α(t) as Bezier curve? This article presents a method for finding points which present α(t) as a Bezier curve.

AMS SUBJECT CLASSIFICATIONS:

1. Introduction

The curve theory is used in differential geometry, kinematics, robotics and engineering. Bezier curves are important subset of the curves. Bezier curves have been used in computer-aided geometric design (CAGD) and in many areas [Citation1–5]. For every Bezier curve, the control points are uniquely defined [Citation6]. In CAGD, the most popular areas of research are used shape control parameters to construct Bezier curves [Citation7]. It is possible to establish the linear relationship of the control points of a Bezier curve and surface [Citation8, Citation9]. It is well known from the relevant literature, a Bezier curve is established by the control points. When the control points are given, using the Bernstein polynomial and De Castaljeu algorithm we can write the Bezier curve.

The coordinates of a Bezier curve are polynomial functions including the coefficients of Bernstein polynomial and the component of the control points. However, when a Bezier curve is given, we can not say the control points what are? In the relevant literature, there are some articles about finding the control points of third order with minimum error [Citation10].

Our aim is to find the control points exactly, not approximately. Suppose that α(t) is a curve, α1(t), α2(t), α3(t) are coordinate functions. α1(t), α2(t), α3(t) are polynomial with degree m1, m2 and m3, respectively. In this case, we can find max{m1,m2,m3}+1 points which are control points of the curve α(t) as a Bezier curve. The original contribution of our study is to find the control points when a curve is given. We need only the coefficients of polynomial coordinate functions. These coefficients give us the coordinates of control points using the inverse of creator matrix. Creator matrix has an inverse. We show this case in Section 3. The advantages of the proposed method are different from the existing methods. The control points are given for finding the Bezier curve in the existing methods but the control points are found in our method. If we have creator matrix, we can find the control points every time.

Firstly, we give basic knowledge about a Bezier curve. And then, we introduce a method to find the control points of a given curve in Section 3, which is the original part of this article.

2. Preliminaries

Binomial expansion with n-degree for a and b is given by (a+b)n=i=0nniaibni. For a=t and b=1−t, we can write this polynomial, which is called Bernstein polynomial, as B(t)=i=0nniti(1t)ni,0t1 or Bn(t)=i=0nBin(t), where Bin(t)=niti(1t)ni. This polynomial was introduced by Bernstein [Citation11]. A Bernstein polynomial can be written in matrix form [Citation12].

Bernstein polynomials have the linearly independent property, so Bernstein polynomials set {Bin} forms a basis for all polynomials. Using the de Casteljau algorithm and Bernstein polynomial, a Bezier curve can be written as (1) BZ(t)=i=0nniti(1t)niPi,0t1,(1) where Pi are elements of Rk, kn, and called Bezier points [Citation13].

If Pi=(Pix,Piy,Piz)R3, 0in, then we have BZ(t)=i=0nBin(t)(Pix,Piy,Piz) and, in terms of coordinate functions, (2) BZ(t)=i=0nBin(t)Pix,i=0nBin(t)Piy,i=0nBin(t)Piz.(2) BZ(t) is continuous on [a,b] and differentiable on (a,b).

Using the matrix form, we can write a Bezier curve with (n+1)control points as BZ(t)=[Bin].P, where P=[Pi](n+1)×1 and Pi=(Pix,Piy,Piz) are the control points of the Bezier curve BZ(t) in R3.

3. Calculating the points for a curve α(t) which makes as Bezier curve

3.1. Creator matrix

In this section, we give a matrix formulation to calculate the unknown control points of a given curve.

In generally, a Bezier curve is not written in the power basis {ti}. However, for calculating the control points of a Bezier curve, BZ(t) must be written in the power basis {ti}. In Equation (1), the multipliers of each component niti(1t)niPi belongs to N, Tt, T(1t) and P, where N=n0 n1 n2  nk  nn1 nn,Tt=(t0 t1 t2  tk  tn1 tn),T(1t)=((1t)n  (1t)nk  (1t)n(n1) (1t)n(n0)),P=(P0 P1 P2  Pk  Pn1 Pn).

Hence, we can write BZ(t)=i=0nNi.(Tt)i.(T(1t))ni.Pi. The serial expansion of every (1t)(ni) placed in T(1t) is as (1t)ni=j=0ninij(1)jtj. In this case, BZ(t) can be written in the power basis {ti}. Now we have to calculate the coefficients of ti. The coefficients of ti can be obtained from the following statements, respectively; tnn0nn(1)nP0+n1n1n1(1)n1P1++nnnnnn(1)nnPn,tn1n0nn1(1)n1P0++nn1×n(n1)n(n1)1(1)n(n1)1Pn1,tn2n0nn2(1)n2P0++nn2×n(n2)n(n2)2(1)n(n2)2Pn2,tn3n0nn3(1)n3P0++nn3×n(n3)n(n3)3(1)n(n3)3Pn3,t3n0n3(1)3P0+n1n12(1)2P1++n3n30(1)0P3,t2n0n2(1)2P0+n1n11(1)1P1+n2n20(1)0P2,t1n0n1(1)1P0+n1n10(1)0P1,t0n0n0(1)0P0.

Using the coefficients of tn,,t1,t0, the curve (3) BZ(t)=i=0nniti(1t)niPi,Pi=(Pix,Piy,Piz)(3) can be written as (4) BZ(t)=i=0ntij=0ninjnjij(1)ijPj.(4) Equation (4) is the main equation for this article. In Equation (4), the Bezier curve BZ(t) is written in matrix form as follows (5) BZ(t)=T.A.P,(5) where, (6) T=ti,i=0,,n,A=aij,aij=njnjij(1)ij,P=Pi,i=0,,n.(6)

Now we give a new definition.

Definition 3.1

The matrix A=[aij]=[njnjij(1)ij] is called the creator matrix for Bezier curves.

3.2. Finding the control points

The creator matrix and the given Bezier curve in the form BZ(t)=T.A.P are very important. Since in this case, the matrix A is invertible and this allows us to find the control points of unknown control points of a Bezier curve. Also, using Equation (5), it is very easy to calculate the derivative and integration of a Bezier curve. Now we give a proposition, theorem and examples using the creator matrix.

Proposition 3.2

The creator matrix A is an invertible matrix.

Proof.

A is a lower-triangle square matrix and detA=i=0naii. For i, aii=niniii(1)ii=ni0. That is, detA0.

Theorem 3.3

Every curve which coordinate functions are polynomial can be written as a Bezier curve.

Proof.

When a curve is given with the coordinate functions to be polynomial, there are the control points uniquely and exactly which they make the curve as Bezier curve. Suppose that any polynomial curve C(t) is given by C:IRn, n=2 or n=3, I=[0,1], (7) C(t)=i=0nCixti,i=0nCiyti,i=0nCizti.(7) Then, C(t) can be written in matrix form as (8) C(t)=t0t1t2tnC0xC0yC0zC1xC1yC1zC2xC2yC2zCnxCnyCnz.(8) From Equations (5) and (8), we have AP0xP0yP0zP1xP1yP1zP2xP2yP2zPnxPnyPnz=C0xC0yC0zC1xC1yC1zC2xC2yC2zCnxCnyCnz and (9) AP0xP1xP2xPnx=C0xC1xC2xCnx,AP0yP1yP2yPny=C0yC1yC2yCny,AP0zP1zP2zPnz=C0zC1zC2zCnz.(9) So, we find the solutions of Equation (9) as (10) P0xP1xP2xPnx=A1C0xC1xC2xCnx,P0yP1yP2yPny=A1C0yC1yC2yCny,P0zP1zP2zPnz=A1C0zC1zC2zCnz.(10)

This solution is unique. This method gives us the control points exactly, not approximately.

Example

Suppose that a Bezier curve is given as C(t):IR2,C(t)=(C1(t),C2(t)), where, C1(t)=180t9+810t81800t7+2520t62268t5+1260t4360t3+40t11,C2(t)=52t10+260t9270t8480t7+1260t61008t5+420t4240t3+90t2+10t (Figure ).

Figure 1. The curve C(t).

Figure 1. The curve C(t).

Now we calculate the control points of the curve C(t). For this we write the programme in Matlab.

Coefficients matrix of this curve is C=1104010090360240126042022681008252012601800480810270180260052 From P=A1C, we have P=110713325170817253371110. The control points are p0=(11,0), p1=(7,1), p2=(3,3),p3=(2,5), p4=(1,7), p5=(0,8),p6=(1,7), p7=(2,5), p8=(3,3), p9=(7,1),p10=(11,0). The control points of C(t) is drawn as in Figure . At the end we can plot Bezier curve, the control points and the control polygon of curve C(t) (Figure ).

Figure 2. The control points of C(t).

Figure 2. The control points of C(t).

Example

Let curve β(t) be given as follows. β(t)=3665t10+16300t924750t8+9000t7+15750t621420t5+11550t43000t3+225t2+20,5t(1380t9+7260t816965t7+22920t619110t5+9576t42520t3+120t2+135t40),5t2(211t8+2356t78550t6+15720t516800t4+10836t33990t2+600t)+45).

The figure of this curve is as in Figure .

Figure 3. Bezier curve, the control points and the control polygon of C(t).

Figure 3. Bezier curve, the control points and the control polygon of C(t).

Figure 4. The curve β(t).

Figure 4. The curve β(t).

The coefficients matrix of β(t) is C=20000200022567522530006003000115501260019950214204788054180157509555084000900011460078600247508482542750163003630011780366569001055. The creator matrix is A=1000010100004590450012036036012002108401260840210252126025202520126021012603150420031501208402520420042004536012602520315010903608401260110451202100000000000000000000000000000002520000012602100000252084012000025201260360450012608403609010025221012045101. The inverse of the creator matrix is A1=10000010.1000010.20.022200010.30.06670.00830010.40.13330.03330.0048010.50.22220.08330.02380.00410.60.33330.16670.07140.023810.70.46670.29170.16670.083310.80.62220.46670.33330.222210.90.80.70.60.51111110000000000000000000000000000000.004800000.03330.00830000.13330.06670.0222000.40.30.20.1011111. So we have the control points from P=A1C. The control points are p0=(20,0,0), p1=(20,20,0), p2=(25,25,5),p3=(10,10,30),p4=(5,30,35), p5=(10,10,40), p6=(15,10,40),p7=(10,10,25),p8=(0,5,20), p9=(0,15,8), p10=(10,20,30).

The control points of β(t) are shown as in Figure .The control polygon of the Bezier curve is drawn as in Figure . Finally, we can draw the Bezier curve as in Figure .

Figure 5. The control points of β(t).

Figure 5. The control points of β(t).

Figure 6. The control polygon of the Bezier curve.

Figure 6. The control polygon of the Bezier curve.

Figure 7. The Bezier curve according to the control points.

Figure 7. The Bezier curve according to the control points.

Example

Let the curve γ(t) be given in R4 as γ(t)=(6+3t2t2+8t3+114,t+7t3+15t4,5+20t+11t2+20t32t4,5t+17t2+20t3+18t4). The coefficients matrix of γ(t) is C=605034205201117872020111521812151823. The creator matrix A and the inverse of the creator matrix B are as follows. A=1000005500001020100000103030100052030205015101051 and B=10000010.2000010.40.100010.60.30.10010.80.60.40.20111111. Thus we have the control points of γ(t) as a Bezier curve is found as p0=(6,0,5,0), p1=(6.6,0.8,1,1), p2=(7.4,1.6,4.1,3.7),p3=(9.2,1.7,12.3,10.1),p4=(15,2.6,25.2,25.8), p5=(42,33,62,83).

3.3. Derivative and integration on the Bezier curves

It is notable that if Bezier curve can be written as in Equation (5), this new argument can raise many advantages. For example, in case a representation as in Equation (5) it can be easily calculated the derivative, integration,…,etc of the Bezier curve. This is a clear advantage of writting a Bezier curve in matrix form. Here, we success this fact for Bezier curves. In addition, in the relevant literature the derivative and integration of various Bezier curves are calculated by classical ways. This case brings many difficulties. However, in this paper we calculate the derivative of the Bezier curves by means of the matrix form. This case can bring many advantages for the researchers. That is, in that case, we can calculate the derivative and integration of the Bezier curves easily. These are the contributions of this paper to the literature and its novelty and originality. This method, which defines the Bezier curve as the polynomial in the power basis {ti}, is very useful in practice and computer science. Suppose that the Bezier curve with ncontrol points is given as in Equation (5), BZ(t)=T.A.P. In this case, the derivative of BZ(t) is d(BZ(t))dt=dTdt.A.P

and dTdt=[0,1,2t,3t2,,ktk1,,ntn1]. We can calculate the successive derivative dk(BZ(t))dkt, 1kn.

Furthermore, we can calculate easily the integration of a Bezier curve using the form in Equation (5). So, the integration of BZ(t) is BZ(t)dt=TdtA.P.

4. Conclusion

In computer-aided geometric design (CAGD), one of the main problem is to calculate the control points of a Bezier curve with unknown control points. In this article, a matrix is defined and called a creator matrix. The product of creator matrix of the control points gives us the Bezier curve. Conversely, since the creator matrix is invertible, inverse of the creator matrix can be used to find the control points of the Bezier curve.

Disclosure statement

No potential conflict of interest was reported by the authors.

References

  • Bezier P. The mathematical basis of the UNISURF CAD system. London: Butterworths; 1986.
  • Bezier P. Mathematical and practical possibilities of UNISURF. Comput Aided Geom Design. 1974;127–152. doi: 10.1016/B978-0-12-079050-0.50012-6
  • Boehm W, Muller A. On de Castejau's algorithm. Comput Aided Geom Design. 1999;16:587–605. doi: 10.1016/S0167-8396(99)00023-0
  • Farin G. Curves and surfaces for computer aided geometric design. Boston: Academic Press; 1993.
  • Farin G. Curves and surfaces for CAGD. Boston: Academic Press; 2002.
  • Berry TG, Patterson RR. The uniqueness of Bezier control points. Comput Aided Geom Design. 1997;14:877–879. doi: 10.1016/S0167-8396(97)00016-2
  • Qin X, Hu G, Zhang N, et al. A novel extension to the polynomial basis functions describing Bezier curves and surfaces of degree n with multiple shape parameters. Appl Math Comput. 2013;223:1–16.
  • Deng J, Kao T. Linear relationship of the control points of Bezier curve for degree reduction: a tridiagonal matrix approach. J Chin Inst Ind Eng. 2008;31(5):873–878. doi: 10.1080/02533839.2008.9671441
  • Hu G, Wu J, Qin X. A novel extension of the Bézier model and its applications to surface modeling. Adv Eng Softw. 2018;125:27–54. doi: 10.1016/j.advengsoft.2018.09.002
  • Bhuiyan MA, Hama H. An accurate method for finding the control points of Bezier curves. Mem Fac Eng Osaka City Univ. 1997;38:175–181.
  • Bernstein S. Demonstration du theoreme de Weierstrass fondee sur le calcul des probabilities. Harkov Soobs Matem ob-va. 1912;13:1–2.
  • Bela S, Szilvasi-Nagy M. Merging B-spline curves or surfaces using matrix representation. J Comput Graph Tech. 2017;6(3):1–24.
  • Bezier BP, Sioussiou S. Semi-automatic system for defining free-form curves and surfaces. Comput-Aided Des. 1983;5(2):65–72. doi: 10.1016/0010-4485(83)90170-7