Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

Similar documents
Lecture 20: Lagrange Interpolation and Neville s Algorithm. for I will pass through thee, saith the LORD. Amos 5:17

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

M2R IVR, October 12th Mathematical tools 1 - Session 2

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Applied Numerical Analysis Quiz #2

Cubic Splines; Bézier Curves

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

Numerical Methods I: Interpolation (cont ed)

Interpolation and polynomial approximation Interpolation

Novel polynomial Bernstein bases and Bézier curves based on a general notion of polynomial blossoming

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Applied Numerical Analysis Homework #3

CSE 167: Lecture 11: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

UNIT-II INTERPOLATION & APPROXIMATION

Introduction to Curves. Modelling. 3D Models. Points. Lines. Polygons Defined by a sequence of lines Defined by a list of ordered points

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Neville s Method. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Neville s Method

Interpolating Accuracy without underlying f (x)

Sample Exam 1 KEY NAME: 1. CS 557 Sample Exam 1 KEY. These are some sample problems taken from exams in previous years. roughly ten questions.

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Interpolation and Deformations A short cookbook

Introduction Linear system Nonlinear equation Interpolation

Empirical Models Interpolation Polynomial Models

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

Chapter 1 Numerical approximation of data : interpolation, least squares method

3.1 Interpolation and the Lagrange Polynomial

Chapter 2 Interpolation

Curves. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Taku Komura

MA 323 Geometric Modelling Course Notes: Day 12 de Casteljau s Algorithm and Subdivision

Curves, Surfaces and Segments, Patches

The Essentials of CAGD

1.1. The analytical denition. Denition. The Bernstein polynomials of degree n are dened analytically:

Spline Methods Draft. Tom Lyche and Knut Mørken

A first order divided difference

MAT300/500 Programming Project Spring 2019

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

1 Motivation for Newton interpolation

290 J.M. Carnicer, J.M. Pe~na basis (u 1 ; : : : ; u n ) consisting of minimally supported elements, yet also has a basis (v 1 ; : : : ; v n ) which f

Interpolation Theory

Nonlinear Means in Geometric Modeling

3. Numerical integration

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture 10 Polynomial interpolation

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Example 1 Which of these functions are polynomials in x? In the case(s) where f is a polynomial,

Katholieke Universiteit Leuven Department of Computer Science

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000:

Chapter 3 Interpolation and Polynomial Approximation

Curve Fitting and Interpolation

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

Scientific Computing

Visualizing Bezier s curves: some applications of Dynamic System Geogebra

SMOOTH APPROXIMATION OF DATA WITH APPLICATIONS TO INTERPOLATING AND SMOOTHING. Karel Segeth Institute of Mathematics, Academy of Sciences, Prague

Lecture 23: Hermite and Bezier Curves

On-Line Geometric Modeling Notes

Polynomial Interpolation with n + 1 nodes

Bézier Curves and Splines

CONTROL POLYGONS FOR CUBIC CURVES

Engineering 7: Introduction to computer programming for scientists and engineers

Chapter 4: Interpolation and Approximation. October 28, 2005

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

There is a unique function s(x) that has the required properties. It turns out to also satisfy

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

Lecture 20: Bezier Curves & Splines

Function approximation

SPLINE INTERPOLATION

Numerische Mathematik

Applied Math 205. Full office hour schedule:

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation and Cubature at Geronimus Nodes Generated by Different Geronimus Polynomials

Scientific Computing: An Introductory Survey

Approximation of Circular Arcs by Parametric Polynomials

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

Lectures 9-10: Polynomial and piecewise polynomial interpolation

1 Review of Interpolation using Cubic Splines

Numerical Methods. Equations and Partial Fractions. Jaesung Lee

Interpolation and Approximation

ERROR IN LINEAR INTERPOLATION

Numerical Methods of Approximation

An O(h 2n ) Hermite approximation for conic sections

Key Words: cardinal B-spline, coefficients, moments, rectangular rule, interpolating quadratic spline, hat function, cubic B-spline.

2 The De Casteljau algorithm revisited

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

We consider the problem of finding a polynomial that interpolates a given set of values:

University of British Columbia Math 307, Final

Bernstein polynomials of degree N are defined by

Algebra 1. Standard 1: Operations With Real Numbers Students simplify and compare expressions. They use rational exponents and simplify square roots.

1 Piecewise Cubic Interpolation

MA2501 Numerical Methods Spring 2015

1 Solutions to selected problems

Fixed Points and Contractive Transformations. Ron Goldman Department of Computer Science Rice University

Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves

Finite Elements. Colin Cotter. January 18, Colin Cotter FEM

1 Lecture 8: Interpolating polynomials.

Hierarchical Matrices. Jon Cockayne April 18, 2017

Simple Examples on Rectangular Domains

Interpolation APPLIED PROBLEMS. Reading Between the Lines FLY ROCKET FLY, FLY ROCKET FLY WHAT IS INTERPOLATION? Figure Interpolation of discrete data.

Transcription:

Lagrange Interpolation and Neville s Algorithm Ron Goldman Department of Computer Science Rice University

Tension between Mathematics and Engineering 1. How do Mathematicians actually represent curves and surfaces? Algebra -- Formulas and Algorithms 2. How do Scientists and Engineers want to represent curves and surfaces? Geometry -- Interpolation and Approximation

Straight Lines Q P Equation =?

Linear Interpolation Straight Line P(t) = P + t(q P) P(t) = (1 t)p + tq Observations P(0) = P P(1) = Q P(t) Q = P(1) P = P(0)

Linear Interpolation P(t) Q = P(1) P = P(0) P(t) Q = P(t 1 ) P = P(t 0 )

Linear Interpolation Revisited Straight Line P 01 (t) = ( 1 f (t))p 0 + f (t)p 1 f (t 0 ) = 0 and f (t 1 ) = 1 y axis (t 1,1) y = t t 0 t 1 t 0 (t 0, 0) t axis

Linear Interpolation Revisited Linear Interpolation f (t) = (t t 0 ) (t 1 t 0 ) f (t 0 ) = 0 and f (t 1 ) = 1. Straight Line P 01 (t) = t 1 t t 1 t 0 P 0 + t t 0 t 1 t 0 P 1 P(t 0 ) = P P(t 1 ) = Q P 01 (t) Q = P(t 1 ) P = P(t 0 )

Linear Interpolation P 01 (t) t 1 t t 1 t 0 t t 0 t 1 t 0 P 01 (t) t 1 t t t 0 P 0 P 0 Normalized P 1 Unnormalized P 1 P 01 (t) = t 1 t t 1 t 0 P 0 + t t 0 t 1 t 0 P 1 P 01 (t 0 ) = P 0 P 01 (t 1 ) = P 1

Quadratic Interpolation P 0 P 1 P 01 (t) P 12 (t) P 012 (t) P 2 Problem Find a smooth curve P 012 (t) such that: P 012 (t 0 ) = P 0 P 012 (t 1 ) = P 1 P 012 (t 2 ) = P 2

Quadratic Interpolation Linear Interpolation P 01 (t) = t 1 t t 1 t 0 P 0 + t t 0 t 1 t 0 P 1 P 12 (t) = t 2 t t 2 t 1 P 1 + t t 1 t 2 t 1 P 2 Quadratic Interpolation P 012 (t) = t 2 t t 2 t 0 P 01 (t) + t t 0 t 2 t 0 P 12 (t)

Verification of Quadratic Interpolation P 012 (t) = t 2 t t 2 t 0 P 01 (t) + t t 0 t 2 t 0 P 12 (t) i. P 012 (t 0 ) = P 01 (t 0 ) = P 0 ii. P 012 (t 2 ) = P 12 (t 2 ) = P 2 iii. P 012 (t 1 ) = t 2 t 1 t 2 t 0 P 01 (t 1 ) + t 1 t 0 t 2 t 0 P 12 (t 1 ) = t 2 t 1 t 2 t 0 P 1 + t 1 t 0 t 2 t 0 P 1 = P 1 P 0 = P 012 (t 0 ) P 1 = P 012 (t 1 ) P 012 (t) P 2 = P 012 (t 2 )

Neville s Algorithm for Quadratic Interpolation P 012 (t) t 2 t t t 0 P 01 (t) P 12 (t) t 1 t t t 0 t2 t t t 1 P 0 P 1 P 2 P 012 (t k ) = P k

Cubic Interpolation P 3 P 1 P 0 P 2 Problem Find a smooth function P 0123 (t) such that: P 0123 (t 0 ) = P 0 P 0123 (t 1 ) = P 1 P 0123 (t 2 ) = P 2 P 0123 (t 3 ) = P 3

Neville s Algorithm for Two Quadratic Curves P 012 (t) P 123 (t) t 2 t t t 0 t 3 t t t 1 P 01 (t) P 12 (t) P 12 (t) P 23 (t) t 1 t t t 0 t 2 t t t 1 t 2 t t t 1 t 3 t t t 2 P 0 P 1 P P 2 1 P 2 P 3 P 012 (t) P 123 (t) t 2 t t t 0 t 3 t t t 1 P 01 (t) P 12 (t) P 23 (t) t 1 t t t 0 t 2 t t t 1 t 3 t t t 2 P 0 P 1 P 2 P 3

Neville s Algorithm for Cubic Curves P 0123 (t) t 3 t t t 0 P 012 (t) P 123 (t) t 2 t t t 0 t 3 t t t 1 P 01 (t) P 12 (t) P 23 (t) t 1 t t t 0 t 2 t t t 1 t 3 t t t 2 P 0 P 1 P2 P 3 P 0123 (t k ) = P k

Verification of Cubic Interpolation P 0123 (t) = t 3 t t 3 t 0 P 012 (t) + t t 0 t 3 t 0 P 123 (t) i. P 0123 (t 0 ) = P 012 (t 0 ) = P 0 ii. P 0123 (t 3 ) = P 123 (t 3 ) = P 3 iii. P 0123 (t 1 ) = t 3 t 1 t 3 t 0 P 012 (t 1 ) + t 1 t 0 t 3 t 0 P 123 (t 1 ) = t 3 t 1 t 3 t 0 P 1 + t 1 t 0 t 3 t 0 P 1 = P 1 iv. P 0123 (t 2 ) = P 2 (same as proof for t 1 )

Neville s Algorithm for Lagrange Interpolation Theorem: Given points P 0,..., P n and parameters t 0,..., t n, there exists a polynomial curve P 0Ln (t) of degree n that interpolates the given points at the specified parameter values. That is, P 0Ln (t k ) = P k k = 0,..., n. Proof: By induction on n. Define P 0Ln (t) = t n t t n t 0 P 0Ln 1 (t) + t t 0 t n t 0 P 1Ln (t). Applying the same arguments we used in the quadratic and cubic cases, you can easily verify that P 0Ln (t k ) = P k k = 0,..., n. Since P 0Ln 1 (t) and P 1Ln (t) are polynomials of degree n 1, it follows that P 0Ln (t) is a polynomial of degree n.

Neville s Algorithm -- Recursive Calls P 0123 (t) P 012 (t) P 123 (t) P 01 (t) P 12 (t) P 12 (t) P 23 (t) P 0 P 1 P 1 P 2 P 1 P 2 P 2 P 3

Neville s Algorithm -- Dynamic Programming P 0123 (t) t 3 t t t 0 P 012 (t) P 123 (t) t 2 t t t 0 t 3 t t t 1 P 01 (t) P 12 (t) P 23 (t) t 1 t t t 0 t 2 t t t 1 t 3 t t t 2 P 0 P 1 P2 P 3 P 0123 (t k ) = P k

Polynomial Algebra Theorem: A non-zero polynomial of degree less than or equal to n can have at most n roots. Proof: Recall that if P(t) is a polynomial, then r is a root of P(t) t r is a factor of P(t). Now a polynomial of degree at most n can have at most n linear factors. Therefore a polynomial of degree less than or equal to n can have at most n roots. Corollary: The only polynomial of degree less than or equal to n with more than n roots is the zero polynomial.

Uniqueness of Lagrange Interpolation Theorem: Given points P 0,..., P n and parameters t 0,..., t n, there exists only one polynomial curve P 0Ln (t) of degree n that interpolates the given points at the specified parameter values. That is, the curve generated by Neville s algorithm is unique Proof: Suppose that there are two polynomials of degree n such that Define P 0Ln (t k ) = P k k = 0,..., n Q 0Ln (t k ) = P k k = 0,...,n. R 0Ln (t) = Q 0Ln (t) P 0Ln (t). Then R 0Ln (t) is a polynomial of degree at most n. But R 0Ln (t k ) = Q 0Ln (t k ) P 0Ln (t k ) = 0 k = 0,...,n, so R 0Ln (t) has n +1 roots. Therefore R 0Ln (t) must be the zero polynomial, so P 0Ln (t) = Q 0Ln (t).

Uniqueness of Lagrange Interpolation (continued) Corollary: The Lagrange interpolant reproduces polynomials. That is, if the points P 0,..., P n lie at the parameters t 0,..., t n on a polynomial P(t) of degree less than or equal to n, then P 0Ln (t) = P(t). Observations Uniqueness applies only for fixed nodes. Changing the nodes t 0,..., t n, changes the Lagrange interpolant, even if the interpolation points P 0,..., P n are exactly the same.

Tensor Product Surface Interpolation Setup s = s 0 t = t 3 s = s 3 t = t 0 (a) Domain -- Rectangular Grid P 03 P 13 P 23 P 33 P 02 P 12 P 22 P 32 P 01 P 11 P 21 P 31 P 00 P 10 P 20 P 30 (b) Range -- Rectangular Array of Points Problem Find a smooth surface P(s,t) such that: P(s i,t j ) = P ij

Surface Interpolation P 03 P 13 P 23 P 33 P 02 P 12 P P(s,t) P 22 32 P 0 (t) P 1 (t ) P 2 (t) P 3 (t ) P 01 P 11 P 21 P 31 P 00 P10 P 20 P 30

Surface Interpolation

Neville s Algorithm for Tensor Product Surfaces P(s,t) s 2 s s s 0 s 1 s P 01 ( s) s s 0 s 2 s P 12 ( s) s s 1 t 2 t P 0 (t) P 1 (t ) t t 0 t 2 t t t 0 t 2 t P 2 (t) t t0 P 01 (t) P 12 (t) P 01 (t) P 12 (t) P 01 (t) P 12 (t) t 2 t t t 1 t 1 t t t 0 t t t t t 1 1 t t 1 t t t 0 t 2 t 0 t2 t t t 1 P 00 P P 01 02 P 10 P 11 P12 P 20 P21 P 22

Lofted Surface U 0 (t) U 1 (t) U 2 (t) U 3 (t) L U (s,t)

Neville s Algorithm for Lofted Surfaces L U (s,t) = U 0123 (s,t) s 3 s s s 0 U 012 (s,t) U 123 (s,t) s 2 s s s 0 s 3 s s s 1 U 01 (s,t) U 12 (s,t) U 23 (s,t) s 1 s s s 0 s 2 s s s 1 s 3 s s s 2 U 0 (t) U 1 (t) U 2 (t) U 3 (t)

Ruled Surface U 0 (t) U 1 (t) R(s,t) = s 1 s s 1 s 0 U 0 (t) + s s 0 s 1 s 0 U 1 (t)

Summary Key Ideas Linear Interpolation Dynamic Programming -- Neville s Algorithm Extensions to Surfaces Tensor Product Lofted Ruled

Themes Linearity Mathematics is Easy Represent Complicated Curves and Surfaces by (Successive) Linear Interpolations Polynomial Curves and Surfaces Lagrange Interpolation -- Neville s Algorithm Bezier Approximation -- de Casteljau s Algorithm B-Splines -- de Boor s Algorithm Blossoming