World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:13, No:8, 2019 Fast and Efficient Algorithms for Evaluating Uniform and Nonuniform Lagrange and Newton Curves Taweechai Nuntawisuttiwong, Natasha Dejdumrong Abstract—Newton-Lagrange Interpolations are widely used in quadratic computation time, which is slower than the others. numerical analysis. However, it requires a quadratic computational However, there are some curves in CAGD, Wang-Ball, DP time for their constructions. In computer aided geometric design and Dejdumrong curves with linear complexity. In order to (CAGD), there are some polynomial curves: Wang-Ball, DP and Dejdumrong curves, which have linear time complexity algorithms. reduce their computational time, Bezier´ curve is converted Thus, the computational time for Newton-Lagrange Interpolations into any of Wang-Ball, DP and Dejdumrong curves. Hence, can be reduced by applying the algorithms of Wang-Ball, DP and the computational time for Newton-Lagrange interpolations Dejdumrong curves. In order to use Wang-Ball, DP and Dejdumrong can be reduced by converting them into Wang-Ball, DP and algorithms, first, it is necessary to convert Newton-Lagrange Dejdumrong algorithms. Thus, it is necessary to investigate polynomials into Wang-Ball, DP or Dejdumrong polynomials. In this work, the algorithms for converting from both uniform and the conversion from Newton-Lagrange interpolation into non-uniform Newton-Lagrange polynomials into Wang-Ball, DP and the curves with linear complexity, Wang-Ball, DP and Dejdumrong polynomials are investigated. Thus, the computational Dejdumrong curves. An application of this work is to modify time for representing Newton-Lagrange polynomials can be reduced sketched image in CAD application with the computational into linear complexity. In addition, the other utilizations of using time reduction for plotting Newton-Lagrange curves. CAGD curves to modify the Newton-Lagrange curves can be taken. Keywords—Newton interpolation, Lagrange interpolation, linear II. NEWTON &LAGRANGE POLYNOMIALS complexity. Although Newton and Lagrange polynomials are different representations, their simple forms are the same polynomials. I. INTRODUCTION Newton applies Divided Difference method to represent its HERE are many interpolation methods used in numerical polynomial while Lagrange uses simpler formula. At the T analysis. The popular one is Newton’s divided-difference beginning, it is important to introduce both methods. Newton interpolating polynomial. The Newton’s method was given by and Lagrange polynomials can be shown as follows: Isaac Newton written in Lemma 5 of Book III of his Principia Mathematica of 1687 [1] but it was known to him before from the letter he wrote to Oldenburg [2]. The simple forms A. Newton Polynomial of Newton interpolating polynomials, Lagrange interpolations, Let N (t) be the Newton polynomial of control points, n n were published by Joseph-Louis Lagrange under his name. {bi}i=0, and the weight, {ti}i=0, then However, the same formula had been produced by Waring n i sixteen years earlier. N (t)= f[ti,ti−1, .., t0] (t − tj),t[t0,tn] (1) Newton-Lagrange interpolations can be beneficial to i=0 j=0 estimate intermediate data between precise data points or to predict the future data. In addition, Newton-Lagrange where f[t ,t , .., t ] − f[t ,t , .., t ] interpolations can be used to vectorize a raster-image into a f[t ,t , .., t ]= i i−1 k+1 i−1 i−2 k , 2 i i−1 k vector image. However, a quadratic computational time, O(n ), ti − tk must be taken to construct a Newton-Lagrange interpolation. (2) In computer aided geometric design (CAGD), there are and Open Science Index, Computer and Information Engineering Vol:13, No:8, 2019 waset.org/Publication/10010689 f[t ]= . many polynomial curves, e.g. Bezier´ [3], Said-Ball [4], i bi (3) Wang-Ball [5], DP [6], NB1 [7], [8] and Dejdumrong [9] curves. The difference between Newton-Lagrange and CAGD B. Lagrange Polynomial curves is the utilization of CAGD curves that is for CAD/CAM Let L(t) be the Lagrange polynomial of control points, modeling. In CAGD curves, Bezier´ curves are widely used n n {vi}i=0, and the weight, {ti}i=0, then in CAD software because they are better in shape preserving n n and possess simple forms. Unfortunately, Bezier´ curve has a t − tj L(t)= vi ,t[t0,tn]. (4) ti − tj T. Nuntawisuttiwong and N. Dejdumrong are with the Department i=0 j=0,j=i of Computer Engineering, King Mongkut’s University of Technology Thonburi, Bangkok, Thailand (e-mail: [email protected], In CAGD curves, there exists the power basis form [email protected]). for representing curves. In this work, the power basis International Scholarly and Scientific Research & Innovation 13(8) 2019 448 ISNI:0000000091950263 World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:13, No:8, 2019 representations for Newton and Lagrange polynomial are O(n). Thus, the computational time can also be reduced by investigated. Thus, Newton and Lagrange polynomial can be using the conversion from Newton-Lagrange polynomials into computed by the following definition. Wang-Ball, DP or Dejdumrong curves. Definition 1. Newton-Lagrange Power Basis: Let N (t) and L(t) be Newton and Lagrange polynomial with their control n III. CONVERSION FROM UNIFORM NEWTON-LAGRANGE points, {bi}i=0. Newton and Lagrange polynomial can be POLYNOMIALS INTO CAGD CURVE represented by using power basis as follows: n n i A. Conversion from Uniform Newton-Lagrange Curve into N (t)=L(t)= bi · fi,j · t , (5) Wang-Ball Curve i=0 j=0 n Wang-Ball control points, {pi}i=0, can be obtained from where fi,j is Newton-Lagrange power basis defined by n Newton control points, {bi}i=0, and Lagrange control points, n n Fi,n−j(0) {vi}i=0, as follows: fi,j = n (6) t − t i=0,i=j j i −1 p0 p1 ··· pn = b0 b1 ··· bn · A and ⎧ (12) ⎨ 1 , for j =0, and n Fi,n−j(u)= ⎩ n−j+1 n ··· = ··· · −1 k=u,k=i Fi,j−1(k +1)tk , for j>0. p0 p1 pn v0 v1 vn A (13) (7) where Definition 2. Newton-Lagrange Monomial Matrices: Newton ⎡ ⎤ a0,0 a0,1 ... a0,n and Lagrange polynomials can be represented by using ⎢ ⎥ ⎢ a1,0 a1,1 ... a1,n ⎥ monomial matrix forms as follows: A = ⎢ ⎥ (14) ⎡ ⎤ ⎣ . .. ⎦ 1 . ⎢ ⎥ an,0 an,1 ... an,n ⎢ t ⎥ N (t)=L(t)= b0 b1 ··· bn · M · ⎢ . ⎥ (8) ⎣ . ⎦ and tn ⎧ (2t )i(1 − t )i+2 , for 0 ≤ i ≤ n − 1 ⎪ j j 2 where M is Newton-Lagrange monomial matrix defined as ⎪ ⎪ follows: ⎡ ⎤ ⎪ (2t )i(1 − t )n−i , for i = n ⎨⎪ j j 2 f0,0 f0,1 ... f0,n ⎢ ⎥ n (t)= f1,0 f1,1 ... f1,n ai,j n−i i n ⎢ ⎥ ⎪ (2(1 − tj )) (tj ) , for i = 2 M = ⎢ . ⎥ . (9) ⎪ ⎣ . .. ⎦ ⎪ . ⎪ n n ⎪ a (1 − tj) , for +1≤ i ≤ n fn,0 fn,1 ... fn,n ⎩ n−i,j 2 The matrix inverse of Newton-Lagrange monomial matrix (15) can be expressed as follows: ⎡ ⎤−1 f0,0 f0,1 ... f0,n ⎢ ⎥ B. Conversion from Uniform Newton-Lagrange Curve into ⎢ f1,0 f1,1 ... f1,n ⎥ M−1 = ⎢ ⎥ DP Curve ⎣ . .. ⎦ . n DP control points, {qi}i=0, can be obtained from Newton fn,0 fn,1 ... fn,n n n {bi} {vi} (10) control points, i=0, and Lagrange control points, i=0, ⎡ ⎤ as follows: g0,0 g0,1 ... g0,n ⎢ ⎥ ⎢ g1,0 g1,1 ... g1,n ⎥ −1 = ⎢ ⎥ , q0 q1 ··· qn = b0 b1 ··· bn ·C (16) Open Science Index, Computer and Information Engineering Vol:13, No:8, 2019 waset.org/Publication/10010689 . ⎣ . .. ⎦ gn,0 gn,1 ... gn,n and where ⎧ −1 ⎨ 1 , for i =0, q0 q1 ··· qn = v0 v1 ··· vn ·C (17) gi,j = (11) ⎩ i tj , for i>0. where ⎡ ⎤ c0,0 c0,1 ... c0,n Newton and Lagrange polynomial are very useful for ⎢ ⎥ c1,0 c1,1 ... c1,n polynomial interpolation. However, they take a lot of ⎢ ⎥ C = ⎢ . ⎥ (18) computational time, O(n2). In CAGD curves, Wang-Ball, DP ⎣ . .. ⎦ and Dejdumrong curves consume linear computational time, cn,0 cn,1 ... cn,n International Scholarly and Scientific Research & Innovation 13(8) 2019 449 ISNI:0000000091950263 World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:13, No:8, 2019 and IV. CONVERSION FROM NONUNIFORM ⎧ n−i n NEWTON-LAGRANGE INTO CAGD CURVES ⎪ (−1) (1 − tj) , for i =0 ⎪ ⎪ A. Conversion from Nonuniform Newton-Lagrange curve ⎪ (−1)n−i(1 − t )n−it , for 0 <i≤ ⎪ j j into Nonuniform Wang-Ball curve ⎪ n − 1 ⎪ 2 n ⎪ Wang-Ball control points, {pi}i=0, can be transformed from ⎪ n ⎪ (−1)n−i(n − 2i)(1 − t )i+1t + Newton control points, {bi}i=0, and Lagrange control points, ⎪ j j n ⎪ n n n +1 {vi}i=0, as follows: ⎪ 1 − 2 n ⎪ ( ) 2 2 (1 − t + , for i = ⎪ 2 j 2 ⎪ n n +1 ··· = ··· ·A−1 ⎨ (−1) 2 (1 − tj) 2 ) p0 p1 pn b0 b1 bn (24) n (t)= ci,j ⎪ ⎪ (n − 2i)( tj −b )( tj −a )n−i+1+ and ⎪ b−a b−a ⎪ n n n ⎪ 1 − tj −a +1 n −1 ⎪ ( ) 2 2 (1 − ( ) 2 + , for i = ··· = ··· ·A ⎪ 2 b−a 2 p0 p1 pn v0 v1 vn (25) ⎪ n n +1 ⎪ (−1) 2 (1 − tj) 2 ) ⎪ where ⎡ ⎤ ⎪ ⎪ i n a0,0 a0,1 ... a0,n ⎪ (−1)(1 − tj)tj , for +1 ⎢ ⎥ ⎪ 2 ⎢ a1,0 a1,1 ... a1,n ⎥ ⎪ ≤ i<n A = ⎢ ⎥ ⎪ ⎣ . ⎦ (26) ⎪ . .. ⎩ n−i i (−1) tj , for i = n an,0 an,1 ... an,n (19) and ⎧ ⎪ (−2)iβi+2 for i =0 C.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-