3.4 Hermite Interpolation 3.5 Cubic Spline Interpolation

Total Page:16

File Type:pdf, Size:1020Kb

3.4 Hermite Interpolation 3.5 Cubic Spline Interpolation 3.4 Hermite Interpolation 3.5 Cubic Spline Interpolation 1 Illustration. Consider to interpolate tanh( ) using Lagrange polynomial and nodes = 1.5, = 0, = 1.5. 0 − 1 2 Now interpolate tanh( ) using nodes = 1.5, = 0, = 1.5. Moreover, Let 1st 0 1 derivative of interpolating− 2 polynomial agree with derivative of tanh( ) at these nodes. Remark:This is called Hermite interpolating polynomial. 2 Hermite Polynomial Definition. Suppose [ , ]. Let , … , be distinct numbers in [ , ], 1the Hermite polynomial 0 ( ) approximating is∈ that: 1. = , for = 0, … , 2. = , for = 0, … , Remark: ( ) and ( ) agree not only function values but also 1st derivative values at , = 0, … , . 3 Osculating Polynomials Definition 3.8 Let , … , be distinct numbers in , and for = 0, … , , let be a nonnegative integer. 0 Suppose that , , where = max . The osculating polynomial approximating is the polynomial ∈ 0≤≤ ( ) of least degree such that = for each = 0, … , and k= 0, … , . Remark: the degree of ( ) is at most = + . ∑=0 4 Theorem 3.9 If , and , … , , distinct numbers, the Hermite1 polynomial of degree at most + 1 is: ∈ 0 ∈ = , ( ) + 2, ( ) 2+1 Where � � ′ � =0 =0 , = [1 2( ) , ( )] , ( ) 2 , = ′ − − , Moreover, if , , then 2 � − 2+2 … = ∈ + ( ( )) 2 + 2 ! 2 − 0 − 2+2 for some 2+1 , . Remark: 2 1. is a polynomial∈ of degree at most + 1. 2. , ( ) is jth Lagrange basis polynomial of degree . 2+1 … 2 3. 2 2 ( ( )) is the error term. −0 −! 2+2 2+2 5 Remark: 1. When : , = 0; , = 0. 2. When = : ≠ � , = 1 2 , , = 1 = ′ = 0 2 , − −, � 2 � = −( ). 3. ⟹ , 2+=1 , 2 , , + 1 2 , 2 , ′ ′ ′ ′ When : − , = 0; When− =− : , = 0. ′ ′ 4. ⟹ , =≠ , + 2 , ( ) , :2 = 0; = : ′ = 1. �′When , −When , 6 ⟹ ≠ �′ �′ Example 3.4.1 Use Hermite polynomial that agrees with the data in the table to find an approximation of 1.5 ( ) ( ) 0 1.3 0.6200860 0.5220232 1 1.6 0.4554022 0.5698959′ 2 1.9 0.2818186 −0.5811571 − − 7 3rd Degree Hermite Polynomial • Given distinct , and values of and at these numbers. 0 1 ′ 3 = 1 + 2 2 0 1 − − 0 1 0 1 0 + − 2 − 1 ′ 0 − 0 − 1 0 + 1 + 2 − 2 1 0 − − 1 1 0 0 1 + − 2 − 0 − ′ − 1 1 0 − 1 8 Hermite Polynomial by Divided Differences Suppose , … , and , are given at these numbers. Define , … , by 0 = =′ , for = 0, … , 0 2+1 2 2+1 Construct divided difference table, but use , , . , to set the following undefined′ ′ divided difference:′ , ,0 , 1, … , , . Namely, , = , , = , … 0 1 2 3 2 2+1 ′ , = ′ . 0 1 0 2 3 1 The Hermite polynomial is ′ 2 2+1 = + 2+1 , … , … ( ) 9 2+1 0 � 0 − 0 − −1 =1 Example 3.4.2 Use divided difference method to determine the Hermite polynomial that agrees with the data in the table to find an approximation of 1.5 ( ) ( ) 0 1.3 0.6200860 0.5220232 1 1.6 0.4554022 0.5698959′ 2 1.9 0.2818186 −0.5811571 − − 10 Divided Difference Notation for Hermite Interpolation • Divided difference notation for Hermite polynomial interpolating 2 nodes: , . = + + , 0, 1 3 + [ , , ′ , ] ( ) 2 0 0 0 0 0 1 0 − 2 − 0 0 1 1 − 0 − 1 11 Problems with High Order Polynomial Interpolation • 21 equal-spaced numbers to interpolate = . The interpolating polynomial 1 oscillates between2 interpolation points. 1+25 12 3.5 Cubic Splines • Idea: Use piecewise polynomial interpolation, i.e, divide the interval into smaller sub-intervals, and construct different low degree polynomial approximations (with small oscillations) on the sub- intervals. Example. Piecewise-linear interpolation 13 • Challenge: If ( ) are not known, can we still generate interpolating polynomial with continuous derivatives? ′ • Spline: A spline consists of a long strip of wood (a lath) fixed in position at a number of points. The lath will take the shape which minimizes the energy required for bending it between the fixed points, and thus adopt the smoothest possible shape. 14 • In mathematics, a spline is a function that is piecewise-defined by polynomial functions, and which possesses a high degree of smoothness at the places where the polynomial pieces connect. • Example. Irwin-Hall distribution. Nodes are -2, -1, 0, 1, 2. 1 + 2 2 1 4 1 3 = 3 6 + 4 − ≤ 1≤ − 1 4 1 3 2 2 − 1− ≤ 2≤ 4 3 Notice: 1 =− , 1 = , ≤ 1≤ = , 1 = . ′ 3 ′ 3 ′′ 6 ′′ 6 − 4 − 4 − 4 4 15 • Piecewise-polynomial approximation using cubic polynomials between each successive pair of nodes is called cubic spline interpolation. Definition 3.10 Given a function on [ , ] and nodes = < < = , a cubic spline interpolant for satisfies: (a) ( ) is a cubic polynomial ( ) on [ , ] with: 0 ⋯ = + + + +1 = 0,1, … , 1.2 3 − − − (b) = ( ) and = , = 0,1, … , 1. ∀ − = , = 0,1, … , 2. (c) +1 +1 Remark: (c) is derived from (b). ∀ − +1 +1 +1 (d) = ∀, = 0,1, …, − 2. (e) ′ = ′ , = 0,1, … , 2. +1 +1 +1 ∀ − (f) One′′ of the following′′ boundary conditions: +1 +1 +1 (i) = =0 (called∀ free or natural − boundary) (ii) ′′ = (′′ ) and = ( ) (called clamped boundary) 0 16 ′ ′ 0 ′ 0 ′ The spline segment ( ) is on , . The spline segment ( ) is on , . Things to match at +1 interior point : +1 +1 +2 • Their function values: = = +1 +1 +1 +1 • First derivative values: = +1 • Second derivative values:′ =′ +1 +1 +1 ′′ ′′ 17 +1 +1 +1 Example 3.5.1 Construct a natural spline through (1,2), (2,3) and (3.5). 18 Building Cubic Splines • Define: = + + ( ) + ( ) and = , = 0,1, … , ( 1). 2 3 • Also define = ;− = −; = (− )/2. ℎ +1 − ∀ − From Definition 3.10: ′ ′′ 1) = = for =0,1, …, ( 1). 2) = = + + ( ) + ( ) − for = 0,1, … , ( 1). 2 3 +1 +1 +1 : = + +ℎ ( ℎ ) + ℎ( ) − 3) = = + 2 + 3 2 ( ) 3 , also−1 −1ℎ−1 −1 ℎ−1 −1 ℎ−1 ′ for = 0,1, … , ( 1). 2 +1 4) = , also = + 3 ℎ ℎ − ′′ for = 0,1, … , 1 . +1 5) Natural or clamped2 boundary conditions ℎ − 19 Solve , , , by substitution: 1. Solve Eq. 4) for = , and substitute into Eqs. 2) and 3) to +1 get: − 3ℎ 2. = + + 2 2 + ; (3.18) ℎ = + + . (3.19) +1 ℎ 3 +1 3. Solve for in Eq. (3.18) to get: +1 ℎ +1 = 2 + . (3.20) 1 ℎ Reduce the index by 1 to get: ℎ +1 − − 3 +1 = 2 + . 1 ℎ−1 4. Substitute−1 and into−1 Eq. (3.19):−1 ℎ−1 − − 3 + 2 + + = (3.21) −1 3 3 ℎ−1−1 ℎ−1 ℎ ℎ(+1 ) +1 =1,2, … , 1 . −1 for − − − 20 ℎ ℎ−1 − Solving the Resulting Equations = 1,2, … , ( 1) + 2 + + ∀ 3 − 3 ℎ=−1−1 ℎ−1 ℎ ℎ+1 (3.21) Remark: (n-1) equations+1 − for− (n+1) unknowns − −1 { } . Eq. ℎ ℎ−1 (3.21) is solved with boundary conditions. =0 • Once compute , we then compute: = (3.20) +1− ℎ 2++1 ℎ −and 3 = (3.17) for = 0,1,2, … , ( 1) +1− 21 3ℎ − Building Natural Cubic Spline • Natural boundary condition: 1. 0 = = 2 = 0 2. 0 = ′′ = 2 = 0 0 0 0 → 0 Step 1. Solve′′ Eq. (3.21) together with = 0 and → = 0 to obtain { } . 0 { } Step 2. Solve Eq. (3.20) =0to obtain . { }−1 Step 3. Solve Eq. (3.17) to obtain =0 . −1 =0 22 Building Clamped Cubic Spline • Clamped boundary condition: a) = = ( ) b) ′ = = + ( + ) = ( ) 0 0 0 ′ 0 Remark:′ a) and b) gives additional equations: −1 −1 ℎ−1 −1 ′ 2 + = 3 ( ) 3 3 ′ ℎ00 ℎ+012 ℎ0 1=− 0 − 0 + 3 ( ) ′ Stepℎ −11. Solve−1 Eq.ℎ− 1(3.21) − together − with−1 Eqs. (a)and (b) to ℎ−1 obtain { } . Step 2. Solve Eq. (3.20) to obtain { } . =0 Step 3. Solve Eq. (3.17) to obtain { }−1 . =0 −1 =0 23 Example 3.5.4 Let ( , ( )) = (0,1), ( , ( )) = (1, ), ( , ( )) = (2, ), 0 0 ( , ( )) = (3, ). And = , =2 . 1 1 2 2 Determine the clamped3 spline . ′ 3 3 3 3 ′ 0 24 Theorem 3.11 If is defined at the nodes: = < < = , then has a unique natural spline interpolant on the nodes; that is a spline interpolant0 ⋯ that satisfied the natural boundary conditions = 0, = 0. ′′ ′′ Theorem 3.12 If is defined at the nodes: = < < = and differentiable at and , then has a unique clamped spline interpolant on0 the⋯ nodes; that is a spline interpolantthat satisfied the clamped boundary conditions = ( ), = ( ). ′ ′ ′ ′ 25 Error Bound Theorem 3.13 If [ , ], let = max | ( )|. If is the4 unique clamped cubic ∈ spline interpolant4 to with respect to the nodes: ≤≤ = < < = , then with = max 0 ⋯ +1 maxℎ | 0≤≤−1 ( )| − . 4 5ℎ ≤≤ − ≤ 384 26.
Recommended publications
  • Math 541 - Numerical Analysis Interpolation and Polynomial Approximation — Piecewise Polynomial Approximation; Cubic Splines
    Polynomial Interpolation Cubic Splines Cubic Splines... Math 541 - Numerical Analysis Interpolation and Polynomial Approximation — Piecewise Polynomial Approximation; Cubic Splines Joseph M. Mahaffy, [email protected] Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center San Diego State University San Diego, CA 92182-7720 http://jmahaffy.sdsu.edu Spring 2018 Piecewise Poly. Approx.; Cubic Splines — Joseph M. Mahaffy, [email protected] (1/48) Polynomial Interpolation Cubic Splines Cubic Splines... Outline 1 Polynomial Interpolation Checking the Roadmap Undesirable Side-effects New Ideas... 2 Cubic Splines Introduction Building the Spline Segments Associated Linear Systems 3 Cubic Splines... Error Bound Solving the Linear Systems Piecewise Poly. Approx.; Cubic Splines — Joseph M. Mahaffy, [email protected] (2/48) Polynomial Interpolation Checking the Roadmap Cubic Splines Undesirable Side-effects Cubic Splines... New Ideas... An n-degree polynomial passing through n + 1 points Polynomial Interpolation Construct a polynomial passing through the points (x0,f(x0)), (x1,f(x1)), (x2,f(x2)), ... , (xN ,f(xn)). Define Ln,k(x), the Lagrange coefficients: n x − xi x − x0 x − xk−1 x − xk+1 x − xn Ln,k(x)= = ··· · ··· , Y xk − xi xk − x0 xk − xk−1 xk − xk+1 xk − xn i=0, i=6 k which have the properties Ln,k(xk) = 1; Ln,k(xi)=0, for all i 6= k. Piecewise Poly. Approx.; Cubic Splines — Joseph M. Mahaffy, [email protected] (3/48) Polynomial Interpolation Checking the Roadmap Cubic Splines Undesirable Side-effects Cubic Splines... New Ideas... The nth Lagrange Interpolating Polynomial We use Ln,k(x), k =0,...,n as building blocks for the Lagrange interpolating polynomial: n P (x)= f(x )L (x), X k n,k k=0 which has the property P (xi)= f(xi), for all i =0, .
    [Show full text]
  • Lecture 19 Polynomial and Spline Interpolation
    Lecture 19 Polynomial and Spline Interpolation A Chemical Reaction In a chemical reaction the concentration level y of the product at time t was measured every half hour. The following results were found: t 0 .5 1.0 1.5 2.0 y 0 .19 .26 .29 .31 We can input this data into Matlab as t1 = 0:.5:2 y1 = [ 0 .19 .26 .29 .31 ] and plot the data with plot(t1,y1) Matlab automatically connects the data with line segments, so the graph has corners. What if we want a smoother graph? Try plot(t1,y1,'*') which will produce just asterisks at the data points. Next click on Tools, then click on the Basic Fitting option. This should produce a small window with several fitting options. Begin clicking them one at a time, clicking them off before clicking the next. Which ones produce a good-looking fit? You should note that the spline, the shape-preserving interpolant, and the 4th degree polynomial produce very good curves. The others do not. Polynomial Interpolation n Suppose we have n data points f(xi; yi)gi=1. A interpolant is a function f(x) such that yi = f(xi) for i = 1; : : : ; n. The most general polynomial with degree d is d d−1 pd(x) = adx + ad−1x + ::: + a1x + a0 ; which has d + 1 coefficients. A polynomial interpolant with degree d thus must satisfy d d−1 yi = pd(xi) = adxi + ad−1xi + ::: + a1xi + a0 for i = 1; : : : ; n. This system is a linear system in the unknowns a0; : : : ; an and solving linear systems is what computers do best.
    [Show full text]
  • Piecewise Polynomial Interpolation
    Jim Lambers MAT 460/560 Fall Semester 2009-10 Lecture 20 Notes These notes correspond to Section 3.4 in the text. Piecewise Polynomial Interpolation If the number of data points is large, then polynomial interpolation becomes problematic since high-degree interpolation yields oscillatory polynomials, when the data may fit a smooth function. Example Suppose that we wish to approximate the function f(x) = 1=(1 + x2) on the interval [−5; 5] with a tenth-degree interpolating polynomial that agrees with f(x) at 11 equally-spaced points x0; x1; : : : ; x10 in [−5; 5], where xj = −5 + j, for j = 0; 1;:::; 10. Figure 1 shows that the resulting polynomial is not a good approximation of f(x) on this interval, even though it agrees with f(x) at the interpolation points. The following MATLAB session shows how the plot in the figure can be created. >> % create vector of 11 equally spaced points in [-5,5] >> x=linspace(-5,5,11); >> % compute corresponding y-values >> y=1./(1+x.^2); >> % compute 10th-degree interpolating polynomial >> p=polyfit(x,y,10); >> % for plotting, create vector of 100 equally spaced points >> xx=linspace(-5,5); >> % compute corresponding y-values to plot function >> yy=1./(1+xx.^2); >> % plot function >> plot(xx,yy) >> % tell MATLAB that next plot should be superimposed on >> % current one >> hold on >> % plot polynomial, using polyval to compute values >> % and a red dashed curve >> plot(xx,polyval(p,xx),'r--') >> % indicate interpolation points on plot using circles >> plot(x,y,'o') >> % label axes 1 >> xlabel('x') >> ylabel('y') >> % set caption >> title('Runge''s example') Figure 1: The function f(x) = 1=(1 + x2) (solid curve) cannot be interpolated accurately on [−5; 5] using a tenth-degree polynomial (dashed curve) with equally-spaced interpolation points.
    [Show full text]
  • Interpolation Observations Calculations Continuous Data Analytics Functions Analytic Solutions
    Data types in science Discrete data (data tables) Experiment Interpolation Observations Calculations Continuous data Analytics functions Analytic solutions 1 2 From continuous to discrete … From discrete to continuous? ?? soon after hurricane Isabel (September 2003) 3 4 If you think that the data values f in the data table What do we want from discrete sets i are free from errors, of data? then interpolation lets you find an approximate 5 value for the function f(x) at any point x within the Data points interval x1...xn. 4 Quite often we need to know function values at 3 any arbitrary point x y(x) 2 Can we generate values 1 for any x between x1 and xn from a data table? 0 0123456 x 5 6 1 Key point!!! Applications of approximating functions The idea of interpolation is to select a function g(x) such that Data points 1. g(xi)=fi for each data 4 point i 2. this function is a good 3 approximation for any interpolation differentiation integration other x between y(x) 2 original data points 1 0123456 x 7 8 What is a good approximation? Important to remember What can we consider as Interpolation ≡ Approximation a good approximation to There is no exact and unique solution the original data if we do The actual function is NOT known and CANNOT not know the original be determined from the tabular data. function? Data points may be interpolated by an infinite number of functions 9 10 Step 1: selecting a function g(x) Two step procedure We should have a guideline to select a Select a function g(x) reasonable function g(x).
    [Show full text]
  • Parameterization for Curve Interpolation Michael S
    Working title: Topics in Multivariate Approximation and Interpolation 101 K. Jetter et al., Editors °c 2005 Elsevier B.V. All rights reserved Parameterization for curve interpolation Michael S. Floater and Tatiana Surazhsky Centre of Mathematics for Applications, Department of Informatics, University of Oslo, P.O. Box 1035, 0316 Oslo, Norway Abstract A common task in geometric modelling is to interpolate a sequence of points or derivatives, sampled from a curve, with a parametric polynomial or spline curve. To do this we must ¯rst choose parameter values corresponding to the interpolation points. The important issue of how this choice a®ects the accuracy of the approxi- mation is the focus of this paper. The underlying principle is that full approximation order can be achieved if the parameterization is an accurate enough approximation to arc length. The theory is illustrated with numerical examples. Key words: interpolation, curves, arc length, approximation order 1. Introduction One of the most basic tasks in geometric modelling is to ¯t a smooth curve d through a sequence of points p ; : : : pn in , with d 2. The usual approach is 0 ¸ to ¯t a parametric curve. We choose parameter values t0 < < tn and ¯nd a d ¢ ¢ ¢ parametric curve c : [t ; tn] such that 0 ! c(ti) = pi; i = 0; 1; : : : ; n: (1) Popular examples of c are polynomial curves (of degree at most n) for small n, and spline curves for larger n. In this paper we wish to focus on the role of the parameter values t0; : : : ; tn. Empirical evidence has shown that the choice of parameterization has a signi¯cant e®ect on the visual appearance of the interpolant c.
    [Show full text]
  • An Application of Spline and Piecewise Interpolation to Heat Transfer (Cubic Case)
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by International Institute for Science, Technology and Education (IISTE): E-Journals Mathematical Theory and Modeling www.iiste.org ISSN 2224-5804 (Paper) ISSN 2225-0522 (Online) Vol.5, No.6, 2015 An Application of Spline and Piecewise Interpolation to Heat Transfer (Cubic Case) Chikwendu, C. R.1, Oduwole, H. K.*2 and Okoro S. I.3 1,3Department of Mathematics, Nnamdi Azikiwe University, Awka, Anambra State, Nigeria 2Department of Mathematical Sciences, Nasarawa State University, Keffi, Nasarawa State, Nigeria *1E-mail of the corresponding author: [email protected] [email protected]@yahoo.com Abstract An Application of Cubic spline and piecewise interpolation formula was applied to compute heat transfer across the thermocline depth of three lakes in the study area of Auchi in Edo State of Nigeria. Eight temperature values each for depths 1m to 8m were collected from the lakes. Graphs of these temperatures against the depths were plotted. Cubic spline interpolation equation was modelled. MAPLE 15 software was used to simulate the modelled equation using the values of temperatures and depths in order to obtain the unknown coefficients of the variables in the 21 new equations. Three optimal equations were found to represent the thermocline depth for the 푑푇 three lakes. These equations were used to obtain the thermocline gradients ( ) and subsequently to compute 푑푧 the heat flux across the thermocline for the three lakes. Similar methods were used for cubic piecewise interpolation. The analytical and numerical results obtained for the computation of thermocline depth and temperature were presented for the three lakes with relative error analysis.
    [Show full text]
  • Numerical Methods I Polynomial Interpolation
    Numerical Methods I Polynomial Interpolation Aleksandar Donev Courant Institute, NYU1 [email protected] 1Course G63.2010.001 / G22.2420-001, Fall 2010 October 28th, 2010 A. Donev (Courant Institute) Lecture VIII 10/28/2010 1 / 41 Outline 1 Polynomial Interpolation in 1D 2 Piecewise Polynomial Interpolation 3 Higher Dimensions 4 Conclusions A. Donev (Courant Institute) Lecture VIII 10/28/2010 2 / 41 Final Project Guidelines Find a numerical application or theoretical problem that interests you. Examples: Incompressible fluid dynamics. Web search engines (google) and database indexing in general. Surface reconstruction in graphics. Proving that linear programming can be solved in polynomial time. Then learn more about it (read papers, books, etc) and find out what numerical algorithms are important. Examples: Linear solvers for projection methods in fluid dynamics. Eigenvalue solvers for the google matrix. Spline interpolation or approximation of surfaces. The interior-point algorithm for linear programming. Discuss your selection with me via email or in person. A. Donev (Courant Institute) Lecture VIII 10/28/2010 3 / 41 Final Project Deliverables Learn how the numerical algorithm works, and what the difficulties are and how they can be addressed. Examples: Slow convergence of iterative methods for large meshes (preconditioning, multigrid, etc.). Matrix is very large but also very sparse (power-like methods). ??? Simplex algorithm has finite termination but not polynomial. Possibly implement some part of the numerical algorithm yourself and show some (sample) results. In the 15min presentation only explain what the problem is, the mathematical formulation, and what algorithm is used. In the 10-or-so page writeup, explain the details effectively (think of a scientific paper).
    [Show full text]
  • Data Interpolation by Near-Optimal Splines with Free Knots Using Linear Programming
    mathematics Article Data Interpolation by Near-Optimal Splines with Free Knots Using Linear Programming Lakshman S. Thakur 1 and Mikhail A. Bragin 2,* 1 Department of Operations and Information Management, School of Business, University of Connecticut, Storrs, CT 06269, USA; [email protected] 2 Department of Electrical and Computer Engineering, School of Engineering, University of Connecticut, Storrs, CT 06269, USA * Correspondence: [email protected] Abstract: The problem of obtaining an optimal spline with free knots is tantamount to minimizing derivatives of a nonlinear differentiable function over a Banach space on a compact set. While the problem of data interpolation by quadratic splines has been accomplished, interpolation by splines of higher orders is far more challenging. In this paper, to overcome difficulties associated with the complexity of the interpolation problem, the interval over which data points are defined is discretized and continuous derivatives are replaced by their discrete counterparts. The l¥-norm used for maximum rth order curvature (a derivative of order r) is then linearized, and the problem to obtain a near-optimal spline becomes a linear programming (LP) problem, which is solved in polynomial time by using LP methods, e.g., by using the Simplex method implemented in modern software such as CPLEX. It is shown that, as the mesh of the discretization approaches zero, a resulting near-optimal spline approaches an optimal spline. Splines with the desired accuracy can be obtained by choosing an appropriately fine mesh of the discretization. By using cubic splines as an example, numerical Citation: Thakur, L.S.; Bragin, M.A. results demonstrate that the linear programming (LP) formulation, resulting from the discretization Data Interpolation by Near-Optimal of the interpolation problem, can be solved by linear solvers with high computational efficiency and Splines with Free Knots Using Linear the resulting spline provides a good approximation to the sought-for optimal spline.
    [Show full text]
  • 1 Cubic Hermite Spline Interpolation
    cs412: introduction to numerical analysis 10/26/10 Lecture 13: Cubic Hermite Spline Interpolation II Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw, Nathanael Fillmore 1 Cubic Hermite Spline Interpolation Recall in the last lecture we presented a special polynomial interpolation problem. Problem 1.1. Given an interval [L, R] and a function f :[L, R] → R, find the cubic polynomial p ∈ Π3 with p(L) = f(L) p(R) = f(R) p0(L) = f 0(L) p0(R) = f 0(R) Recall that we found a solution to problem 1.1 of the form: 2 2 p(t) =a ˜1(t − L) (t − R) +a ˜2(t − L) +a ˜3(t − L) +a ˜4 (1) Last time we saw that we can bound the error on p for t ∈ [L, R] using: ° ° °f (4)° |E(t)| ≤ ∞,[L,R] · (R − L)4 384 To approximate a function f over an interval [a, b], we can split the interval [a, b] into N subintervals using partition points ~x = (x0, x1, . , xN ), and solve problem 1.1 for every subinterval [xi, xi+1]. More formally, we can define the following cubic Hermite spline interpolation problem. Problem 1.2 (Cubic Hermite Spline Interpolation). Given an interval [a, b], a function f :[a, b] → 0 R, with derivative f :[a, b] → R, and a set of partition points ~x = (x0, x1, . , xN ) with a = x0 < x1 < ··· < xN = b, find a set of polynomials p0, p1, . , pN−1 (a cubic Hermite spline) with pi(xi) = f(xi) pi(xi+1) = f(xi+1) 0 0 pi(xi) = f (xi) 0 0 pi(xi+1) = f (xi+1) for i = 0, 1,...,N − 1.
    [Show full text]
  • Spline Curves Piecewise Polynomials · Splines Bases · Properties Today
    Geometric Modeling Summer Semester 2010 Polynomial Spline Curves Piecewise Polynomials · Splines Bases · Properties Today... Topics: • Mathematical Background • Interpolation & Approximation • Polynomial Spline Curves Piecewise Cubic Interpolation Splines with local control – Hermite Splines – Bezier Splines – Uniform B‐Splines – Non‐Uniform B‐Splines Geometric Modeling SoSem 2010 – Polynomial Spline Curves 2/ 116 Polynomial Spline Curves Piecewise Cubic Interpolation What we have so far... What we have so far: • Given a basis, we can interpolate and approximate points Curves, surfaces, higher dimensional objects Functions (heightfields) and parametric objects Differential properties can be prescribed as well Problem: • We need a suitable basis • Polynomial bases don’t work for large degree (say ≥ 10) Monomials – numerical nightmare Orthogonal polynomials: Runge’s phenomenon still limits applicability Geometric Modeling SoSem 2010 – Polynomial Spline Curves 4/ 116 Piecewise Polynomials Key Idea: • Polynomials of high degree don’t work • Therefore: Use piecewise polynomials of low degree • What is a good degree to use? Geometric Modeling SoSem 2010 – Polynomial Spline Curves 5/ 116 Choosing the Degree... Candidates: • d = 0 (piecewise constant): not smooth • d = 1 (piecewise linear): not smooth enough • d = 2 (piecewise quadratic): constant 2nd derivative, still too inflexible • d = 3 (piecewise cubic): degree of choice for computer graphics applications Geometric Modeling SoSem 2010 – Polynomial Spline Curves 6/ 116 Cubic Splines
    [Show full text]
  • An Introduction to Interpolation and Splines
    An introduction to interpolation and splines Kenneth H. Carpenter, EECE KSU November 22, 1999 revised November 20, 2001, April 24, 2002, April 14, 2004 1 Introduction Suppose one wishes to draw a curve in three dimensions. Then with most graphics systems one must approximate the curve as a series of straight line segments and give function calls to the graphics library for each vertex (at the beginning of the curve and at each joint between straight line segments). In most cases it would be excessive to store all these vertices in a graphics program. Instead, one wishes to store the information to draw the curve by giving a set of control points which appear the same to the user as vertices. Then a curve drawing function uses these control points to draw the curve as a set of short, straight line segments. There are several possibilities for using control points. If the curve passes through all the control points then it is said to interpolate the points. The mathematical function used to interpolate must be appropriate for what is being drawn. The most commonly used interpolation methods in computer graphics involve piecewise continuous cubics. For the sake of smoothness in the interpolated curve, one not only wants the curve to be continu- ous but to have continuous derivatives. In order to represent curves in three dimensions a parametric form is used. Then derivatives are taken with respect to the parameter. Continuity of some order of derivative with respect to the parameter is not necessarily the same as continuity of derivatives like dy/dx in the variables themselves.
    [Show full text]
  • Dynamic Non-Uniform Rational B=Splines
    Dynamic Non-Uniform Rational B=Splines Hong Qin Department of Computer Science University of Tornnto Toronto, Ontario, Canada A thesis submitted in conformity with the requirements for the Degree of Doctor of Philosophy, Graduate Department of Computer Science, in the University of Toronto © Copyright Hong Qin 1995 T'\ 0 - LJ-NUT")l L\.,Il T") u : Dynamic Non-Uniform Rational B-Splines Ph.D. 1995 Hong Qin Graduate Department of Computer Science University of Toronto Abstract Non-uniform rational B-splines (NURBS) have become a de facto standard in commer- cial modeling systems because of their power to represent both free-form shapes and some common analytic shapes. To date, however, NURBS have been viewed as purely geomet­ ric primitives, which require the designer to interactively adjust many degrees of freedom (DOFs )-control points and associated weights-to achieve desired shapes. Despite mod- em interactive devices, this conventional shape modification process can be clumsy and laborious when it comes to designing complex, real-world objects. This thesis paves the way for NURBS to achieve their full potential, by putting the laws of physics on their side. The thesis proposes, develops, and applies dynamic NURBS (D-NURBS), a physics-based generalization of the NURBS representation. D-NURBS unify the features of the industry-standard g~ometry with the many demonstrated conveniences of interaction through physical dynamics. D-NURBS are physics-based models that incorporate mass distributions, internal defor- mation energies, forces, and other physical quantities into the NURBS geometric substrate. Their dynamic behavior results from the numerical integration of a set of nonlinear differ­ ential equations that automatically evolve the geometric DOFs in response to the applied forces and constraints to produce physically meaningful, hence highly intuitive shape vari- ation.
    [Show full text]