LECTURE NOTES - SPLINE INTERPOLATION. 1. Introduction. Problems can arise when a single high-degree polynomial is fit to a large number

Size: px
Start display at page:

Download "LECTURE NOTES - SPLINE INTERPOLATION. 1. Introduction. Problems can arise when a single high-degree polynomial is fit to a large number"

Transcription

1 LECTURE NOTES - SPLINE INTERPOLATION DR MAZHAR IQBAL 1 Introduction Problems can arise when a single high-degree polynomial is fit to a large number of points High-degree polynomials would obviously pass through all the data points themselves, but they can oscillate wildly between data points due to round-off errors and overshoot In such cases, lower-degree polynomials can be fit to subsets of the data points If the lower-degree polynomials are independent of each other, a piecewise approximation is obtained An alternate approach is to fit a lowerdegree polynomial to connect each pair of data points and to require the set of lower-degree polynomials to be consistent with each other in some sense This type of polynomial is called a spline function, or simply a spline Splines can be of any degree Linear splines are simply straight line segments connecting each pair of data points Linear splines are independent of each other from interval to interval Linear splines yield first-order approximating polynomials The slopes (ie, first derivatives) and curvature (ie, second derivatives) are discontinuous at every data point Quadratic splines yield second-order approximating polynomials The slopes of the quadratic splines can be forced to be continuous at each data point, but the curvatures (ie, the second derivatives) are still discontinuous A cubic spline yields a third-degree polynomial connecting each pair of data points The slopes and curvatures of the cubic splines can be forced to be continuous at each data point In fact, these requirements are necessary to obtain the additional conditions required to fit a cubic polynomial to two data points Higher-degree splines can be defined in a similar manner However, cubic splines have proven to be a good compromise between accuracy and complexity Consequently, the concept 1

2 DR MAZHAR IQBAL of cubic splines is developed in this section The name spline comes from the thin flexible rod, called a spline, used by draftsmen to draw smooth curves through a series of discrete points The spline is placed over the points and either weighted or pinned at each point Due to the flexure properties of a flexible rod (typically of rectangular cross section), the slope and curvature of the rod are continuous at each point A smooth curve is then traced along the rod, yielding a spline curve Construction Definition For a given set of data points (x k, y k ), k = 0 : N, the cubic spline s(x) consists of N cubic polynomial s k (x), s assigned to each subinterval satisfying certain constraints We define cubic spline as a function S(x) = S j (x) on interval [x j, x j+1 ] for n = 0, 1,, n 1 defined as (1) S j (x) = a j + b j (x x j ) + c j (x x j ) + d j (x x j ) 3 and the requirements () (3) (4) (5) () S j (x j ) = y j, j = 0, 1,, n 1, S n 1 (x n ) = y n S j (x j+1 ) = S j+1 (x j+1 ) S j(x j+1 ) = S j+1(x j+1 ) j (x j+1 ) = j+1(x j+1 ) Construction From condition we get S j (x j ) = a j y j = a j for i = 0, 1, n 1 The equation 1 for the node j + 1 can be written as (7) S j+1 (x) = a j+1 + b j+1 (x x j+1 ) + c j+1 (x x j+1 ) + d j+1 (x x j+1 ) 3

3 LECTURE NOTES - SPLINE INTERPOLATION 3 If we evaluate this on node x j+1 we get (8) S j+1 (x j+1 ) = a j+1 and (9) S j (x j+1 ) = a j + b j (x j+1 x j ) + c j (x j+1 x j ) + d j (x j+1 x j ) 3 if we write h j = x j+1 x j the above equation can be written as (10) S j (x j+1 ) = a j + b j h j + c j h j + d j h 3 j By invoking the condition 4 we get (11) a j+1 = a j + b j h j + c j h j + d j h 3 j or (1) y j+1 = y j + b j h j + c j h j + d j h 3 j Taking derivatives of the equation 1 we get (13) (14) S j(x) = b j + c j (x x j ) + 3d j (x x j ) j (x) = c j + d j (x x j ) similarly (15) j+1(x) = c j+1 + d j+1 (x x j+1 ) Evaluating the above equations at x j and x j+1 we get j (x j ) = c j & j+1(x j+1 ) = c j+1 Now invoking we get c j + d j h j = c j+1

4 4 DR MAZHAR IQBAL Let d j = S j+1 (x j+1) j (x j) h j j (x j ) = m j for j = 0, 1,, n 1 and n 1(x n ) = m n Therefore, (1) d j = m j+1 m j h j and (17) c j = m j Replacing the values of c and d in equation 11 we get y j+1 = y j + b j h j + m j h j + m j+1 m j h j h 3 j b j h j = (y j+1 y j ) m jh j m j+1h j + m jh j (18) b j = (y j+1 y j ) h j m jh j 3 m j+1h j or b j = f[x j, x j+1 ] c j h j d j h j Now we are left with m j s as unknowns We now invoke condition 5 on s j 1 and s j splines S j(x) = b j + c j (x x j ) + 3d j (x x j )

5 LECTURE NOTES - SPLINE INTERPOLATION 5 S j 1(x) = b j 1 + c j 1 (x x j 1 ) + 3d j 1 (x x j 1 ) By condition 5 at the common node x j we get b j = b j 1 + c j 1 h j 1 + 3d j 1 h j 1 Replacing the values of b j s, c j & d j, from equations 18,17 and 1, we get the relationship between different m j s as y j+1 y j m j + m j+1 h j h j = y j y j 1 h j 1 m j 1 + m j h j 1 +m j 1 h j 1 +3 m j mj 1 h j 1 f[x j, x j+1 ] f[x j 1, x j ] = m j + m j+1 h j m j 1 + m j h j 1 +m j 1 h j 1 +3 m j mj 1 h j 1 m j h j +m j+1 h j m j 1 h j 1 m j h j 1 +m j 1 h j 1 +3m j h j 1 3m j 1 h j 1 = [f[x j, x j+1 ] f[x j 1, x j ]] (19) m j 1 h j 1 + (h j 1 + h j )m j + m j+1 h j = [f[x j, x j+1 ] f[x j 1, x j ]] j = 1,,, n 1 Now we will employ the two missing conditions Depending upon the conditions we will have different splines These are discussed in the succeeding paragraphs 1 Natural Spline If the second derivatives at the end points are set equal to zero then the resulting splines are called Natural Splines It is the curve obtained by forcing a flexible elastic rod through the data points but letting the slope at the

6 DR MAZHAR IQBAL ends be free to equilibrate to the position that minimizes the oscillatory behavior of the curve It is useful for fitting a curve to experimental data that are significant to several significant digits The two boundary conditions that we apply are m 0 = 0 & m n = 0 From equation 19 we have For j = 1 m 0 h 0 + (h 0 + h 1 )m 1 + h 1 m = [f[x 1, x ] f[x 0, x 1 ]] For j = n m j 1 h j 1 + (h j 1 + h j )m j + m j+1 h j = [f[x j, x j+1 ] f[x j 1, x j ]] For j = n 1 m n h n + (h n + h n 1 )m n 1 + h n 1 m n = [f[x n 1, x n ] f[x n, x n 1 ]] On applying m 0 = 0 & m n = 0 in the above equations resulting system of equations will be (h 0 + h 1 ) h 1 0 h 1 (h 1 + h ) h 0 h n (h n + h n 1 ) m 1 m m n 1 = (f[x 1 x ] f[x 0 x 1 ]) (f[x n 1 x n ] f[x n x n 1 ])

7 LECTURE NOTES - SPLINE INTERPOLATION 7 Clamped Spline The clamped spline involves the slope at the ends This spline can be visualized as the curve obtained when a flexible elastic rod is forced to pass through the data points, and the rod is clamped at each end with a fixed slope This spline is useful to a draftsman for drawing a smooth curve through several points In this type of cubic spline the slopes at the end points are specified As per the formulation of the linear system to calculate m j s We are required to find the values of m 0 & m n These are zero in the natural spline case but here wee will have to calculate these using the given information of the first derivative We know that (0) b j = f[x j x j+1 ] c j h j d j h j also S j(x) = b j + c j (x x j ) + 3d j (x x j ) (1) S j(x j ) = b j Particularly () S 0(x 0 ) = b 0 from 0 we get b 0 = f[x 0 x 1 ] c 0 h 0 d 0 h 0 = f[x 0 x 1 ] m 0 h 0 m 1 m 0 = f[x 0 x 1 ] m 0 3 h 0 m 1 h 0 h 0

8 8 DR MAZHAR IQBAL m 0 = 3 h 0 [f[x 0 x 1 ] b 0 ] m 1 = 3 h 0 [f[x 0 x 1 ] S 0(x 0 )] m 1 Here S (x 0 ) ie 1 st derivative at the node x 0 is same as the S 0(x 0 ) Because, S 0 (x 0 ) is the spline with center at x 0 In order to calculate m n we must use S (x n ) = given As we have n 1 splines Therefore, S n 1 (x) will be the last spline defined in the last interval [x n 1, x n ] defined as S n 1 (x) = a n 1 + b n 1 (x x n 1 ) + c n 1 (x x n 1 ) + d n 1 (x x n 1 ) 3 S n 1(x) = b n 1 + c n 1 (x x n 1 ) + 3d n 1 (x x n 1 ) (3) S n 1(x n ) = b n 1 + c n 1 h n 1 + 3d n 1 h n 1 Replacing the value of b n 1 in equation 3 we get S n 1(x n ) = f[x n 1 x n ] c n 1 h n 1 d n 1 h n 1 + c n 1 h n 1 + 3d n 1 h n 1 = f[x n 1 x n ] + c n 1 h n 1 + d n 1 h n 1 Now replacing the values of C n 1 & d n 1 we get S n 1(x n ) = f[x n 1 x n ] + m n 1 h n 1 + m n m n 1 h n 1 h n 1 = f[x n 1 x n ] + m n 1 h n 1 + m n 3 h n 1 m n = 3 [ ] S h n 1(x n ) f[x n 1xn ] m n 1 n 1

9 LECTURE NOTES - SPLINE INTERPOLATION 9 From equation 19 we have For j = 1 m 0 h 0 + (h 0 + h 1 )m 1 + h 1 m = [f[x 1, x ] f[x 0, x 1 ]] replacing the value of m 0 we get (h 0 + h 1 )m 1 + h 1 m = [f[x 1, x ] f[x 0, x 1 ]] 3[f[x 0 x 1 ] S 0(x 0 )] + m 1 h 0 ( 3 h 0 + h 1 )m 1 + h 1 m = [f[x 1, x ] f[x 0, x 1 ]] 3[f[x 0 x 1 ] S 0(x 0 )] For j = n 1 m n h n + (h n + h n 1 )m n 1 + h n 1 m n = [f[x n 1, x n ] f[x n, x n 1 ]] Replacing the values of m n we get m n h n +(h n +h n 1 )m n 1 = [f[x n 1, x n ] f[x n, x n 1 ]] 3[S (x n ) f[x n 1, x n ]+ m n 1 h n 1 m n h n +(h n + 3 h n 1)m n 1 = [f[x n 1, x n ] f[x n, x n 1 ]] 3[S (x n ) f[x n 1, x n ] The resulting system of equations will be ( 3 h 0 + h 1 ) h 1 0 h 1 (h 1 + h ) h 0 h n (h n + 3 h n 1) m 1 m m n 1 =

10 10 DR MAZHAR IQBAL [f[x 1, x ] f[x 0, x 1 ]] 3[f[x 0 x 1 ] S 0(x 0 )] [f[x, x 3 ] f[x 1, x ]] [f[x n 1, x n ] f[x n, x n 1 ]] 3[S (x n ) f[x n 1, x n ] 3 Endpoint Curvature Adjusted Spline Imposing the values of the second derivatives at the endpoints permits the practitioner to adjust the curvature at the endpoints The construction of linear system for this spline is left as an exercise References [1] Joe D Hoffman, Numerical Methods for Engineers and Scientists,nd ed,001, [] Wan Y Yang, Applied Numerical Methods Using Matlab,Wiely 005 [3] Jhon H Mathews and Kurtis D Fink, Numerical Methods Using Matlab, Pearson,004 [4] Curtis F Gerald and Patrick O Wheatley, Applied Numerical Analysis, Pearson,004 [5] Steven C Cahpra and Raymond P Canale, Numerical Methods for Engineers, 5th Ed, Macraw-Hill,00 [] Burden and Faires, Numerical Analysis, 8th Ed

ME 261: Numerical Analysis Lecture-12: Numerical Interpolation

ME 261: Numerical Analysis Lecture-12: Numerical Interpolation 1 ME 261: Numerical Analysis Lecture-12: Numerical Interpolation Md. Tanver Hossain Department of Mechanical Engineering, BUET http://tantusher.buet.ac.bd 2 Inverse Interpolation Problem : Given a table

More information

Handout 4 - Interpolation Examples

Handout 4 - Interpolation Examples Handout 4 - Interpolation Examples Middle East Technical University Example 1: Obtaining the n th Degree Newton s Interpolating Polynomial Passing through (n+1) Data Points Obtain the 4 th degree Newton

More information

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010 Lecture 8, Ceng375 Numerical Computations at December 9, 2010 Computer Engineering Department Çankaya University 8.1 Contents 1 2 3 8.2 : These provide a more efficient way to construct an interpolating

More information

Interpolation - 2D mapping Tutorial 1: triangulation

Interpolation - 2D mapping Tutorial 1: triangulation Tutorial 1: triangulation Measurements (Zk) at irregular points (xk, yk) Ex: CTD stations, mooring, etc... The known Data How to compute some values on the regular spaced grid points (+)? The unknown data

More information

Lecture 9. Curve fitting. Interpolation. Lecture in Numerical Methods from 28. April 2015 UVT. Lecture 9. Numerical. Interpolation his o

Lecture 9. Curve fitting. Interpolation. Lecture in Numerical Methods from 28. April 2015 UVT. Lecture 9. Numerical. Interpolation his o Curve fitting. Lecture in Methods from 28. April 2015 to ity Interpolation FIGURE A S Splines Piecewise relat UVT Agenda of today s lecture 1 Interpolation Idea 2 3 4 5 6 Splines Piecewise Interpolation

More information

8 Piecewise Polynomial Interpolation

8 Piecewise Polynomial Interpolation Applied Math Notes by R. J. LeVeque 8 Piecewise Polynomial Interpolation 8. Pitfalls of high order interpolation Suppose we know the value of a function at several points on an interval and we wish to

More information

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 13: Slide 2 Splines The word spline comes from the ship building trade

More information

February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 )

February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 ) f f f f f (/2).9.8.7.6.5.4.3.2. S Knots.7.6.5.4.3.2. 5 5.2.8.6.4.2 S Knots.2 5 5.9.8.7.6.5.4.3.2..9.8.7.6.5.4.3.2. S Knots 5 5 S Knots 5 5 5 5.35.3.25.2.5..5 5 5.6.5.4.3.2. 5 5 4 x 3 3.5 3 2.5 2.5.5 5

More information

Interpolation & Polynomial Approximation. Cubic Spline Interpolation II

Interpolation & Polynomial Approximation. Cubic Spline Interpolation II Interpolation & Polynomial Approximation Cubic Spline Interpolation II Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University

More information

APPM/MATH Problem Set 4 Solutions

APPM/MATH Problem Set 4 Solutions APPM/MATH 465 Problem Set 4 Solutions This assignment is due by 4pm on Wednesday, October 16th. You may either turn it in to me in class on Monday or in the box outside my office door (ECOT 35). Minimal

More information

Linear Interpolating Splines

Linear Interpolating Splines Jim Lambers MAT 772 Fall Semester 2010-11 Lecture 17 Notes Tese notes correspond to Sections 112, 11, and 114 in te text Linear Interpolating Splines We ave seen tat ig-degree polynomial interpolation

More information

Four equations are necessary to evaluate these coefficients. Eqn

Four equations are necessary to evaluate these coefficients. Eqn 1.2 Splines 11 A spline function is a piecewise defined function with certain smoothness conditions [Cheney]. A wide variety of functions is potentially possible; polynomial functions are almost exclusively

More information

Section 18-1: Graphical Representation of Linear Equations and Functions

Section 18-1: Graphical Representation of Linear Equations and Functions Section 18-1: Graphical Representation of Linear Equations and Functions Prepare a table of solutions and locate the solutions on a coordinate system: f(x) = 2x 5 Learning Outcome 2 Write x + 3 = 5 as

More information

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331 Remark Reconsidering the motivating example, we observe that the derivatives are typically not given by the problem specification. However, they can be estimated in a pre-processing step. A good estimate

More information

lecture 10: B-Splines

lecture 10: B-Splines 9 lecture : -Splines -Splines: a basis for splines Throughout our discussion of standard polynomial interpolation, we viewed P n as a linear space of dimension n +, and then expressed the unique interpolating

More information

Curves. Computer Graphics CSE 167 Lecture 11

Curves. Computer Graphics CSE 167 Lecture 11 Curves Computer Graphics CSE 167 Lecture 11 CSE 167: Computer graphics Polynomial Curves Polynomial functions Bézier Curves Drawing Bézier curves Piecewise Bézier curves Based on slides courtesy of Jurgen

More information

THE STUDY OF NEW APPROACHES IN CUBIC SPLINE INTERPOLATION FOR AUTO MOBILE DATA

THE STUDY OF NEW APPROACHES IN CUBIC SPLINE INTERPOLATION FOR AUTO MOBILE DATA Journal of Science and Arts Year 17, No. 3(4), pp. 41-46, 217 ORIGINAL PAPER THE STUDY OF NEW APPROACHES IN CUBIC SPLINE INTERPOLATION FOR AUTO MOBILE DATA NAJMUDDIN AHMAD 1, KHAN FARAH DEEBA 1 Manuscript

More information

Homework #6 Brief Solutions 2012

Homework #6 Brief Solutions 2012 Homework #6 Brief Solutions %page 95 problem 4 data=[-,;-,;,;4,] data = - - 4 xk=data(:,);yk=data(:,);s=csfit(xk,yk,-,) %Using the program to find the coefficients S =.456 -.456 -.. -.5.9 -.5484. -.58.87.

More information

Engineering Analysis ENG 3420 Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00

Engineering Analysis ENG 3420 Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00 Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00 1 Lecture 24 Attention: The last homework HW5 and the last project are due on Tuesday November

More information

Section 5.5 Piecewise Interpolation

Section 5.5 Piecewise Interpolation Section 5.5 Piecewise Interpolation Key terms Runge phenomena polynomial wiggle problem Piecewise polynomial interpolation We have considered polynomial interpolation to sets of distinct data like {( )

More information

Rational Bezier Surface

Rational Bezier Surface Rational Bezier Surface The perspective projection of a 4-dimensional polynomial Bezier surface, S w n ( u, v) B i n i 0 m j 0, u ( ) B j m, v ( ) P w ij ME525x NURBS Curve and Surface Modeling Page 97

More information

Piecewise Polynomial Interpolation, cont d

Piecewise Polynomial Interpolation, cont d Jim Lambers MAT 460/560 Fall Semester 2009-0 Lecture 2 Notes Tese notes correspond to Section 4 in te text Piecewise Polynomial Interpolation, cont d Constructing Cubic Splines, cont d Having determined

More information

Monotonic Cubic Spline Interpolation

Monotonic Cubic Spline Interpolation Monotonic Cubic Spline Interpolation George Wolberg Itzik Alfy Department of Computer Science City College of New York / CUNY New York, NY wolberg@cs-mailengrccnycunyedu Abstract This paper describes the

More information

8 Project # 2: Bézier curves

8 Project # 2: Bézier curves 8 Project # 2: Bézier curves Let s say that we are given two points, for example the points (1, 1) and (5, 4) shown in Figure 1. The objective of linear interpolation is to define a linear function that

More information

Numerical Methods in Physics Lecture 2 Interpolation

Numerical Methods in Physics Lecture 2 Interpolation Numerical Methods in Physics Pat Scott Department of Physics, Imperial College November 8, 2016 Slides available from http://astro.ic.ac.uk/pscott/ course-webpage-numerical-methods-201617 Outline The problem

More information

CS 450 Numerical Analysis. Chapter 7: Interpolation

CS 450 Numerical Analysis. Chapter 7: Interpolation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Project 3 due tomorrow Midterm 2 next

More information

A Modified Spline Interpolation Method for Function Reconstruction from Its Zero-Crossings

A Modified Spline Interpolation Method for Function Reconstruction from Its Zero-Crossings Scientific Papers, University of Latvia, 2010. Vol. 756 Computer Science and Information Technologies 207 220 P. A Modified Spline Interpolation Method for Function Reconstruction from Its Zero-Crossings

More information

Unit 1 Day 4 Notes Piecewise Functions

Unit 1 Day 4 Notes Piecewise Functions AFM Unit 1 Day 4 Notes Piecewise Functions Name Date We have seen many graphs that are expressed as single equations and are continuous over a domain of the Real numbers. We have also seen the "discrete"

More information

EC-433 Digital Image Processing

EC-433 Digital Image Processing EC-433 Digital Image Processing Lecture 4 Digital Image Fundamentals Dr. Arslan Shaukat Acknowledgement: Lecture slides material from Dr. Rehan Hafiz, Gonzalez and Woods Interpolation Required in image

More information

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2...

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2... TANA9 Lecture 7 Interpolation Suppose we have a table x x x... x n+ Interpolation Introduction. Polynomials. Error estimates. Runge s phenomena. Application - Equation solving. Spline functions and interpolation.

More information

Interpolation by Spline Functions

Interpolation by Spline Functions Interpolation by Spline Functions Com S 477/577 Sep 0 007 High-degree polynomials tend to have large oscillations which are not the characteristics of the original data. To yield smooth interpolating curves

More information

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not.

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not. AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 2: Spline Approximations Dianne P O Leary c 2001, 2002, 2007 Piecewise polynomial interpolation Piecewise polynomial interpolation Read: Chapter 3 Skip:

More information

ME 261: Numerical Analysis. ME 261: Numerical Analysis

ME 261: Numerical Analysis. ME 261: Numerical Analysis ME 261: Numerical Analysis 3. credit hours Prereq.: ME 163/ME 171 Course content Approximations and error types Roots of polynomials and transcendental equations Determinants and matrices Solution of linear

More information

An introduction to interpolation and splines

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

More information

Lecture 2.2 Cubic Splines

Lecture 2.2 Cubic Splines Lecture. Cubic Splines Cubic Spline The equation for a single parametric cubic spline segment is given by 4 i t Bit t t t i (..) where t and t are the parameter values at the beginning and end of the segment.

More information

ES 240: Scientific and Engineering Computation. a function f(x) that can be written as a finite series of power functions like

ES 240: Scientific and Engineering Computation. a function f(x) that can be written as a finite series of power functions like Polynomial Deinition a unction () that can be written as a inite series o power unctions like n is a polynomial o order n n ( ) = A polynomial is represented by coeicient vector rom highest power. p=[3-5

More information

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li. Fall 2014 CSCI 420: Computer Graphics 4.2 Splines Hao Li http://cs420.hao-li.com 1 Roller coaster Next programming assignment involves creating a 3D roller coaster animation We must model the 3D curve

More information

Lecture IV Bézier Curves

Lecture IV Bézier Curves Lecture IV Bézier Curves Why Curves? Why Curves? Why Curves? Why Curves? Why Curves? Linear (flat) Curved Easier More pieces Looks ugly Complicated Fewer pieces Looks smooth What is a curve? Intuitively:

More information

Lecture 9: Introduction to Spline Curves

Lecture 9: Introduction to Spline Curves Lecture 9: Introduction to Spline Curves Splines are used in graphics to represent smooth curves and surfaces. They use a small set of control points (knots) and a function that generates a curve through

More information

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 CSE 167: Introduction to Computer Graphics Lecture #13: Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 4 due Monday Nov 27 at 2pm Next Tuesday:

More information

Consider functions such that then satisfies these properties: So is represented by the cubic polynomials on on and on.

Consider functions such that then satisfies these properties: So is represented by the cubic polynomials on on and on. 1 of 9 3/1/2006 2:28 PM ne previo Next: Trigonometric Interpolation Up: Spline Interpolation Previous: Piecewise Linear Case Cubic Splines A piece-wise technique which is very popular. Recall the philosophy

More information

A Cumulative Averaging Method for Piecewise Polynomial Approximation to Discrete Data

A Cumulative Averaging Method for Piecewise Polynomial Approximation to Discrete Data Applied Mathematical Sciences, Vol. 1, 16, no. 7, 331-343 HIKARI Ltd, www.m-hiari.com http://dx.doi.org/1.1988/ams.16.5177 A Cumulative Averaging Method for Piecewise Polynomial Approximation to Discrete

More information

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes CSCI 420 Computer Graphics Lecture 8 Splines Jernej Barbic University of Southern California Hermite Splines Bezier Splines Catmull-Rom Splines Other Cubic Splines [Angel Ch 12.4-12.12] Roller coaster

More information

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include Parametric Curves and Surfaces In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include Describing curves in space that objects move

More information

Computational Physics PHYS 420

Computational Physics PHYS 420 Computational Physics PHYS 420 Dr Richard H. Cyburt Assistant Professor of Physics My office: 402c in the Science Building My phone: (304) 384-6006 My email: rcyburt@concord.edu My webpage: www.concord.edu/rcyburt

More information

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313 Derivative Bernstein polynomials: 120202: ESM4A - Numerical Methods 313 Derivative Bézier curve (over [0,1]): with differences. being the first forward 120202: ESM4A - Numerical Methods 314 Derivative

More information

Curves and Surfaces Computer Graphics I Lecture 9

Curves and Surfaces Computer Graphics I Lecture 9 15-462 Computer Graphics I Lecture 9 Curves and Surfaces Parametric Representations Cubic Polynomial Forms Hermite Curves Bezier Curves and Surfaces [Angel 10.1-10.6] February 19, 2002 Frank Pfenning Carnegie

More information

99 International Journal of Engineering, Science and Mathematics

99 International Journal of Engineering, Science and Mathematics Journal Homepage: Applications of cubic splines in the numerical solution of polynomials Najmuddin Ahmad 1 and Khan Farah Deeba 2 Department of Mathematics Integral University Lucknow Abstract: In this

More information

Important Properties of B-spline Basis Functions

Important Properties of B-spline Basis Functions Important Properties of B-spline Basis Functions P2.1 N i,p (u) = 0 if u is outside the interval [u i, u i+p+1 ) (local support property). For example, note that N 1,3 is a combination of N 1,0, N 2,0,

More information

Image Zooming using Cubic Spline Interpolation Method

Image Zooming using Cubic Spline Interpolation Method Image Zooming using Cubic Spline Interpolation Method Poonam Sharma and Mr. Anshuman Kalla Department of ECE, Jaipur National University, Jaipur, Rajasthan, India Abstract: In Linear polynomial phenomenon;

More information

Splines and Piecewise Interpolation. Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Splines and Piecewise Interpolation. Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan Splines and Piecewise Interpolation Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.tw Splines n 1 intervals and n data points 2 Splines (cont.) Go through

More information

2D Spline Curves. CS 4620 Lecture 18

2D Spline Curves. CS 4620 Lecture 18 2D Spline Curves CS 4620 Lecture 18 2014 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes that is, without discontinuities So far we can make things with corners (lines,

More information

Natural Quartic Spline

Natural Quartic Spline Natural Quartic Spline Rafael E Banchs INTRODUCTION This report describes the natural quartic spline algorithm developed for the enhanced solution of the Time Harmonic Field Electric Logging problem As

More information

2D Spline Curves. CS 4620 Lecture 13

2D Spline Curves. CS 4620 Lecture 13 2D Spline Curves CS 4620 Lecture 13 2008 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes [Boeing] that is, without discontinuities So far we can make things with corners

More information

Friday, 11 January 13. Interpolation

Friday, 11 January 13. Interpolation Interpolation Interpolation Interpolation is not a branch of mathematic but a collection of techniques useful for solving computer graphics problems Basically an interpolant is a way of changing one number

More information

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur Email: jrkumar@iitk.ac.in Curve representation 1. Wireframe models There are three types

More information

Math Numerical Analysis

Math Numerical Analysis ... Math 541 - Numerical Analysis Interpolation and Polynomial Approximation Piecewise Polynomial Approximation; Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical

More information

Math 226A Homework 4 Due Monday, December 11th

Math 226A Homework 4 Due Monday, December 11th Math 226A Homework 4 Due Monday, December 11th 1. (a) Show that the polynomial 2 n (T n+1 (x) T n 1 (x)), is the unique monic polynomial of degree n + 1 with roots at the Chebyshev points x k = cos ( )

More information

Appendices - Parametric Keyframe Interpolation Incorporating Kinetic Adjustment and Phrasing Control

Appendices - Parametric Keyframe Interpolation Incorporating Kinetic Adjustment and Phrasing Control University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science 7-1985 Appendices - Parametric Keyframe Interpolation Incorporating Kinetic Adjustment and

More information

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 Lecture 25: Bezier Subdivision And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 1. Divide and Conquer If we are going to build useful

More information

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving The Bisection Method and Newton s Method. If f( x ) a function, then a number r for which f( r) 0 is called a zero or a root of the function f( x ), or a solution to the equation f( x) 0. You are already

More information

Cubic spline interpolation

Cubic spline interpolation Cubic spline interpolation In the following, we want to derive the collocation matrix for cubic spline interpolation. Let us assume that we have equidistant knots. To fulfill the Schoenberg-Whitney condition

More information

Solve Non-Linear Parabolic Partial Differential Equation by Spline Collocation Method

Solve Non-Linear Parabolic Partial Differential Equation by Spline Collocation Method Solve Non-Linear Parabolic Partial Differential Equation by Spline Collocation Method P.B. Choksi 1 and A.K. Pathak 2 1 Research Scholar, Rai University,Ahemdabad. Email:pinalchoksey@gmail.com 2 H.O.D.

More information

Curves and Surfaces Computer Graphics I Lecture 10

Curves and Surfaces Computer Graphics I Lecture 10 15-462 Computer Graphics I Lecture 10 Curves and Surfaces Parametric Representations Cubic Polynomial Forms Hermite Curves Bezier Curves and Surfaces [Angel 10.1-10.6] September 30, 2003 Doug James Carnegie

More information

Connected Minimal Acceleration Trigonometric Curves

Connected Minimal Acceleration Trigonometric Curves Connected Minimal Acceleration Trigonometric Curves Tony Barrera Barrera Kristiansen AB Anders Hast Creative Media Lab, University of Gävle Ewert Bengtsson Centre for Image Analysis Uppsala University

More information

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET 1. The ollowing n data points, ( x ), ( x ),.. ( x, ) 1, y 1, y n y n quadratic spline interpolation the x-data needs to be (A) equally

More information

Master Thesis. Comparison and Evaluation of Didactic Methods in Numerical Analysis for the Teaching of Cubic Spline Interpolation

Master Thesis. Comparison and Evaluation of Didactic Methods in Numerical Analysis for the Teaching of Cubic Spline Interpolation Master Thesis Comparison and Evaluation of Didactic Methods in Numerical Analysis for the Teaching of Cubic Spline Interpolation Abtihal Jaber Chitheer supervised by Prof. Dr. Carmen Arévalo May 17, 2017

More information

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework assignment 5 due tomorrow, Nov

More information

Surface Approximation and Interpolation via Matrix SVD

Surface Approximation and Interpolation via Matrix SVD Surface Approximation and Interpolation via Matrix SVD Andrew E. Long and Clifford A. Long Andy Long (longa@nku.edu) is at Northern Kentucky University. He received his Ph.D. in applied mathematics at

More information

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines EECS 556 Image Processing W 09 Interpolation Interpolation techniques B splines What is image processing? Image processing is the application of 2D signal processing methods to images Image representation

More information

In some applications it may be important that the extrema of the interpolating function are within the extrema of the given data.

In some applications it may be important that the extrema of the interpolating function are within the extrema of the given data. Shape-preserving piecewise poly. interpolation In some applications it may be important that the extrema of the interpolating function are within the extrema of the given data. For example: If you the

More information

Rational Bezier Curves

Rational Bezier Curves Rational Bezier Curves Use of homogeneous coordinates Rational spline curve: define a curve in one higher dimension space, project it down on the homogenizing variable Mathematical formulation: n P(u)

More information

Geometric Modeling of Curves

Geometric Modeling of Curves Curves Locus of a point moving with one degree of freedom Locus of a one-dimensional parameter family of point Mathematically defined using: Explicit equations Implicit equations Parametric equations (Hermite,

More information

A Practical Review of Uniform B-Splines

A Practical Review of Uniform B-Splines A Practical Review of Uniform B-Splines Kristin Branson A B-spline is a convenient form for representing complicated, smooth curves. A uniform B-spline of order k is a piecewise order k Bezier curve, and

More information

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i. Bézier Splines CS 475 / CS 675 Computer Graphics Lecture 14 : Modelling Curves 3 n P t = B i J n,i t with 0 t 1 J n, i t = i=0 n i t i 1 t n i No local control. Degree restricted by the control polygon.

More information

February 23 Math 2335 sec 51 Spring 2016

February 23 Math 2335 sec 51 Spring 2016 February 23 Math 2335 sec 51 Spring 2016 Section 4.1: Polynomial Interpolation Interpolation is the process of finding a curve or evaluating a function whose curve passes through a known set of points.

More information

5.1 Introduction to the Graphs of Polynomials

5.1 Introduction to the Graphs of Polynomials Math 3201 5.1 Introduction to the Graphs of Polynomials In Math 1201/2201, we examined three types of polynomial functions: Constant Function - horizontal line such as y = 2 Linear Function - sloped line,

More information

Contents. I The Basic Framework for Stationary Problems 1

Contents. I The Basic Framework for Stationary Problems 1 page v Preface xiii I The Basic Framework for Stationary Problems 1 1 Some model PDEs 3 1.1 Laplace s equation; elliptic BVPs... 3 1.1.1 Physical experiments modeled by Laplace s equation... 5 1.2 Other

More information

1. How many white tiles will be in Design 5 of the pattern? Explain your reasoning.

1. How many white tiles will be in Design 5 of the pattern? Explain your reasoning. Algebra 2 Semester 1 Review Answer the question for each pattern. 1. How many white tiles will be in Design 5 of the pattern Explain your reasoning. 2. What is another way to represent the expression 3.

More information

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves David L. Finn Over the next few days, we will be looking at extensions of Bezier

More information

Central issues in modelling

Central issues in modelling Central issues in modelling Construct families of curves, surfaces and volumes that can represent common objects usefully; are easy to interact with; interaction includes: manual modelling; fitting to

More information

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines CS 475 / CS 675 - Computer Graphics Modelling Curves 3 - Bézier Splines n P t = i=0 No local control. B i J n,i t with 0 t 1 J n,i t = n i t i 1 t n i Degree restricted by the control polygon. http://www.cs.mtu.edu/~shene/courses/cs3621/notes/spline/bezier/bezier-move-ct-pt.html

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS480: Computer Graphics Curves and Surfaces Sung-Eui Yoon ( 윤성의 ) Course URL: http://jupiter.kaist.ac.kr/~sungeui/cg Today s Topics Surface representations Smooth curves Subdivision 2 Smooth Curves and

More information

Numerical Methods 5633

Numerical Methods 5633 Numerical Methods 5633 Lecture 3 Marina Krstic Marinkovic mmarina@maths.tcd.ie School of Mathematics Trinity College Dublin Marina Krstic Marinkovic 1 / 15 5633-Numerical Methods Organisational Assignment

More information

Cubic Splines By Dave Slomer

Cubic Splines By Dave Slomer Cubic Splines By Dave Slomer [Note: Before starting any example or exercise below, press g on the home screen to Clear a-z.] Curve fitting, the process of finding a function that passes through (or near)

More information

Splines. Patrick Breheny. November 20. Introduction Regression splines (parametric) Smoothing splines (nonparametric)

Splines. Patrick Breheny. November 20. Introduction Regression splines (parametric) Smoothing splines (nonparametric) Splines Patrick Breheny November 20 Patrick Breheny STA 621: Nonparametric Statistics 1/46 Introduction Introduction Problems with polynomial bases We are discussing ways to estimate the regression function

More information

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting Assignment (Be sure to observe the rules about handing in homework). Solve: with (a) ( pts) naive Gauss elimination, (b) ( pts) Gauss with partial pivoting *You need to show all of the steps manually.

More information

Interpolation and Splines

Interpolation and Splines Interpolation and Splines Anna Gryboś October 23, 27 1 Problem setting Many of physical phenomenona are described by the functions that we don t know exactly. Often we can calculate or measure the values

More information

TO DUY ANH SHIP CALCULATION

TO DUY ANH SHIP CALCULATION TO DUY ANH SHIP CALCULATION Ship Calculattion (1)-Space Cuvers 3D-curves play an important role in the engineering, design and manufature in Shipbuilding. Prior of the development of mathematical and computer

More information

Mar. 20 Math 2335 sec 001 Spring 2014

Mar. 20 Math 2335 sec 001 Spring 2014 Mar. 20 Math 2335 sec 001 Spring 2014 Chebyshev Polynomials Definition: For an integer n 0 define the function ( ) T n (x) = cos n cos 1 (x), 1 x 1. It can be shown that T n is a polynomial of degree n.

More information

Regularity Analysis of Non Uniform Data

Regularity Analysis of Non Uniform Data Regularity Analysis of Non Uniform Data Christine Potier and Christine Vercken Abstract. A particular class of wavelet, derivatives of B-splines, leads to fast and ecient algorithms for contours detection

More information

An Introduction to B-Spline Curves

An Introduction to B-Spline Curves An Introduction to B-Spline Curves Thomas W. Sederberg March 14, 2005 1 B-Spline Curves Most shapes are simply too complicated to define using a single Bézier curve. A spline curve is a sequence of curve

More information

Introduction to Computer Graphics

Introduction to Computer Graphics Introduction to Computer Graphics 2016 Spring National Cheng Kung University Instructors: Min-Chun Hu 胡敏君 Shih-Chin Weng 翁士欽 ( 西基電腦動畫 ) Data Representation Curves and Surfaces Limitations of Polygons Inherently

More information

Computer Graphics Curves and Surfaces. Matthias Teschner

Computer Graphics Curves and Surfaces. Matthias Teschner Computer Graphics Curves and Surfaces Matthias Teschner Outline Introduction Polynomial curves Bézier curves Matrix notation Curve subdivision Differential curve properties Piecewise polynomial curves

More information

Cubic Spline Questions

Cubic Spline Questions Cubic Spline Questions. Find natural cubic splines which interpolate the following dataset of, points:.0,.,.,.0, 7.0,.,.0,0.; estimate the value for. Solution: Step : Use the n- cubic spline equations

More information

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

COMPUTER AIDED ENGINEERING DESIGN (BFF2612) COMPUTER AIDED ENGINEERING DESIGN (BFF2612) BASIC MATHEMATICAL CONCEPTS IN CAED by Dr. Mohd Nizar Mhd Razali Faculty of Manufacturing Engineering mnizar@ump.edu.my COORDINATE SYSTEM y+ y+ z+ z+ x+ RIGHT

More information

Video 11.1 Vijay Kumar. Property of University of Pennsylvania, Vijay Kumar

Video 11.1 Vijay Kumar. Property of University of Pennsylvania, Vijay Kumar Video 11.1 Vijay Kumar 1 Smooth three dimensional trajectories START INT. POSITION INT. POSITION GOAL Applications Trajectory generation in robotics Planning trajectories for quad rotors 2 Motion Planning

More information

Know it. Control points. B Spline surfaces. Implicit surfaces

Know it. Control points. B Spline surfaces. Implicit surfaces Know it 15 B Spline Cur 14 13 12 11 Parametric curves Catmull clark subdivision Parametric surfaces Interpolating curves 10 9 8 7 6 5 4 3 2 Control points B Spline surfaces Implicit surfaces Bezier surfaces

More information

The Free-form Surface Modelling System

The Free-form Surface Modelling System 1. Introduction The Free-form Surface Modelling System Smooth curves and surfaces must be generated in many computer graphics applications. Many real-world objects are inherently smooth (fig.1), and much

More information