INTERPOLATION For both irregulary spaced and evenly spaced data.

Slides:



Advertisements
Similar presentations
#8: Curves and Curved Surfaces CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006.
Advertisements

Some "Special" Functions f(x) = |x|, the absolute value function. The domain is the set of all real numbers. The graph is symmetric with respect to the.
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #14 Interpolation.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Chapter 18 Interpolation The Islamic University of Gaza
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Rational Bezier Curves
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Scientific Computing Linear and Quadratic Splines.
V. Space Curves Types of curves Explicit Implicit Parametric.
1 Interpolation. 2 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a.
Taylor Polynomials A graphical introduction. Best first order (linear) approximation at x=0. OZ calls this straight line function P 1 (x). Note: f (0)=P.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
COM335 TOPIC 5 DRAWING CURVES. COM335 Two types of curve : Regular curves Which have a simple equation. For example the circle x 2 + y 2 = r 2 The equation.
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
Slope Fields. Quiz 1) Find the average value of the velocity function on the given interval: [ 3, 6 ] 2) Find the derivative of 3) 4) 5)
Approximation on Finite Elements Bruce A. Finlayson Rehnberg Professor of Chemical Engineering.
41 - 4/24/2000AME 150L1 Solving Engineering Problems, Integrating Equations.
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
Spline Interpolation A Primer on the Basics by Don Allen.
Basis of Mathematical Modeling LECTURE 3 Numerical Analysis with MATLAB Dr. N.K. Sakhnenko, PhD, Professor Associate.
By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
CS552: Computer Graphics Lecture 18: Representing Cubic Splines.
MTH 253 Calculus (Other Topics) Chapter 11 – Infinite Sequences and Series Section 11.8 –Taylor and Maclaurin Series Copyright © 2009 by Ron Wallace, all.
Interpolation - Introduction
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
EEE 244-7: Curve Fitting.
Chapter 10-2: Curves.
Curve-Fitting Spline Interpolation
Interpolation.
Minor Scales.
3.1 Higher Degree Polynomial Functions and Graphs
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 15 Curve Fitting : Splines
Reading Between the Lines
Various Symbols for the Derivative
Chapter 23.
Taylor Polynomial Approximations
Polynomials.
Spline Interpolation Class XVII.
Numerical Analysis Lecture 23.
Polynomials.
11.1 – Polynomial Approximations of Functions
Numerical Integration:
Summation Formulas Constant Series.
MATH 174: Numerical Analysis I
Splines There are cases where polynomial interpolation is bad
Polynomials.
SKTN 2393 Numerical Methods for Nuclear Engineers
MATH 1310 Section 4.1.
Numerical Integration
Do Now: Aim: How do we work with polynomials?
Presentation transcript:

INTERPOLATION For both irregulary spaced and evenly spaced data.

Linear Interpolation x = a x = b y x x

Linear Interpolation

Spline & Linear Interpolation

The function should be continuous at the joints. Spline interpolation – we approximate the interpolation function y(x) over the interval [a, b] by dividing the interval into subregions. The function should be continuous at the joints. Define spline function y(x) of degree N with values @ joints: b a data need to be in ascending (or descending order); if not, it should be rearranged Spline function y(x) has two properties: a) In each interval ui-1  x  ui (i = 1,…, m), the function y(x) is a polynomial of degree < N. b) At each interior joint, y(x) and its first N-1 derivatives are continuous.

The most common spline function is the cubic spline N = 3 Example. Consider a data series with elements (xi, yi), i =1, …, N The first two derivatives y’(x) and y’’(x) of the interpolation function can be defined for all xi The third derivative y’’’(x) is a constant for all x At the segment junctions: Continuity of the spline function Continuity of the slope Continuity of the curvature

Since y’’’(x) is a constant, y’’(x) must be linear, so that Integrating twice, getting integration constants from a) continuity of the function and b) of the slope:

Cubic Spline Fifth degree polynomial Sixth degree polynomial Eighth degree polynomial = cubic spline for this example

clear all close all x=[3 4.5 7 9]; y=[2.5 1 2.5 .5]; plot(x,y,'o','MarkerFaceColor','red','MarkerSize',10) axis([2 10 0 3]) ; set(gca,'FontSize',18) x1=[3:.25:9]; y1=interp1(x,y,x1); hold on plot(x1,y1,'b','LineWidth',3) y2=interp1(x,y,x1,'spline'); plot(x1,y2,'r','LineWidth',4) %Shape-preserving piecewise cubic interpolation. %The interpolated value at a query point is based on a shape-preserving %piecewise cubic interpolation of the values at neighboring grid points. y3=interp1(x,y,x1,'pchip'); plot(x1,y3,'k','LineWidth',2)