Spline Functions – An Elegant View of Interpolation Bruce Cohen David Sklar

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Polynomial Approximation PSCI 702 October 05, 2005.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
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.
Jehee Lee Seoul National University
MATH 685/ CSI 700/ OR 682 Lecture Notes
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Trajectory Generation
Basis Expansion and Regularization Presenter: Hongliang Fei Brian Quanz Brian Quanz Date: July 03, 2008.
Chapter 18 Interpolation The Islamic University of Gaza
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.
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
Computational Methods in Physics PHYS 3437
EARS1160 – Numerical Methods notes by G. Houseman
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Splines II – Interpolating Curves
1Notes  Assignment 0 is due today!  To get better feel for splines, play with formulas in MATLAB!
Curve-Fitting Interpolation
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,
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Subdivision Primer CS426, 2000 Robert Osada [DeRose 2000]
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Lecture 9 Interpolation and Splines. Lingo Interpolation – filling in gaps in data Find a function f(x) that 1) goes through all your data points 2) does.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Wavelets Examples 王隆仁. 2 Contents o Introduction o Haar Wavelets o General Order B-Spline Wavelets o Linear B-Spline Wavelets o Quadratic B-Spline Wavelets.
Chapter 6 Numerical Interpolation
Curve Modeling Bézier Curves
V. Space Curves Types of curves Explicit Implicit Parametric.
An introduction to the finite element method using MATLAB
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Bellwork: Graph each line: 1. 3x – y = 6 2. Y = -1/2 x + 3 Y = -2
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
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,
Keyframing and Splines Jehee Lee Seoul National University.
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
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.
1 EEE 431 Computational Methods in Electrodynamics Lecture 18 By Dr. Rasime Uyguroglu
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
L5 – Curves in GIS NGEN06 & TEK230: Algorithms in Geographical Information Systems by: Sadegh Jamali (source: Lecture notes in GIS, Lars Harrie) 1 L5-
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Application: Multiresolution Curves Jyun-Ming Chen Spring 2001.
 3.3 Hermite Interpolation Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Find the osculating polynomial P(x) such that.
MA2213 Lecture 2 Interpolation.
5 INTEGRALS.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Algebra Review. Systems of Equations Review: Substitution Linear Combination 2 Methods to Solve:
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
CHAPTER TWO: LINEAR EQUATIONS AND FUNCTIONS ALGEBRA TWO Section Piecewise Functions.
Wavelets Chapter 7 Serkan ERGUN. 1.Introduction Wavelets are mathematical tools for hierarchically decomposing functions. Regardless of whether the function.
Interpolation - Introduction
Curve-Fitting Spline Interpolation
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Daniil Rodin for CAGD course, 2016
Chapter 15 Curve Fitting : Splines
Splines and Piecewise Interpolation
Splines There are cases where polynomial interpolation is bad
SKTN 2393 Numerical Methods for Nuclear Engineers
5-5 Vocabulary 8.) x-intercept 9.) Standard form of a linear equation.
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Spline Functions – An Elegant View of Interpolation Bruce Cohen David Sklar

Start with xv intensity controls

Some Goals To present a concrete introduction to a widely used class of methods for creating continuous functions that interpolate discrete data To apply straightforward geometric and algebraic operations with functions and their graphs that may revolutionize your views of interpolation and approximation To present a concrete example of a general method for extending a 1-dimensional scheme into higher dimensions To stimulate some curricular or student project ideas To see how elementary themes can lead to some beautiful pictures and a lingering vision

Game Plan Connecting the dots – continuous piecewise linear interpolation using the data to compute a linear equation for each subinterval using a linear combination of “Spline basis functions” Connecting the dashes – smooth, piecewise cubic, interpolation using slope and function data to compute a cubic equation for each subinterval using a linear combination of “Cubic spline basis functions” Interpolation using 2-D splines Bilinear spline basis functions Bicubic spline basis functions Overview – “elementary mathematics from an advanced standpoint” linear algebra, finite dimensional function spaces, inner products, small support, almost orthogonal bases, tensor products, finite element methods, wavelets, … As time allows:

Write a formula for a piecewise linear function that interpolates five given data points Connecting the Dots

Write a formula for a piecewise linear function that interpolates n given data points

Interpolation using a Linear Spline Basis The “linear spline function” approach involves carefully choosing a set of “basis functions” such that the interpolating function can be written as a simple linear combination:

A closer look at a linear combination of basis functions

The linear spline basis functions can be constructed as sums of translations and horizontal scalings of two “elementary basis functions”

A summary description of the linear spline basis 1. Elementary basis functions – basically constructed on the unit interval 2. A set of nodes Spline basis functions – sums of (usually) two translated and scaled elementary basis functions interior: endpoints:

Points from sin(x) Points

Points from sin(x) Linear Interpolation

Points from sin(x) Linear Interpolation & “retail”

Points from

Points from g(x) Linear Interpolation

Points from g(x) Linear Interpolation & “retail”

Find a smooth piecewise cubic function that has specified function values and slopes at n given data points where denotes the slope or first derivative at the data point Why cubic ?

Find a cubic function that has specified function values and slopes at 2 given data points We have 4 equations in the four unknown coefficients. So we can solve for a, b, c, and d. Letso Using the data we have

Geometer’s sketch pad demonstration

The cubic spline basis functions can be constructed as sums of translations and scalings of four “elementary basis functions”

Construction of the cubic elementary basis functions There are several reasonable ways to find the cubic function with the desired properties. A straightforward way is to write a general cubic, compute its derivative, substitute the desired conditions and solve the resulting system of four linear equations for the coefficients. A somewhat more interesting way is to note that the most general cubic with a zero value and a zero derivative at 0 is so Now and Hence and We can see by symmetry that

Construction of the cubic elementary basis functions In this case we note that the most general cubic with a zero value and a zero derivative at 0 and a zero value at 1 is so Now Again using symmetry we see that hence

The Cubic Spline Elementary Basis Functions

Construction of the cubic spline basis functions as translations and scalings of four “elementary basis functions” used to match function values

A horizontal scaling by a factor of ½ changes the slopes by a factor of 2. or A vertical scaling by a factor of ½ returns the slopes to their corresponding values. Scaling the derivative basis functions In general the function has the same slope at as has at

used to match slope values Construction of the cubic spline “derivative” basis functions from the “derivative” elementary basis functions

A summary description of the Cubic Spline Basis 1.Elementary basis functions – basically constructed on the unit interval four for the cubics 2. A set of nodes --

3. Spline basis functions – sums of (usually) two translated and scaled elementary basis functions interior: endpoints:

A closer look at a linear combination of cubic basis functions

Points from sin(x) Linear Interpolation & slopes

Points from sin(x) Cubic Interpolation

Points from sin(x) Interpolations and “Retail”

Points from

Points from g(x) Linear Interpolation

Points from g(x) Linear Interpolation & slopes

Points from g(x) Cubic Interpolation

Points from g(x) Interpolations and “Retail”

Geometer’s sketch pad demonstration

Some nice properties of cubic splines Localization – changing the data at a point only changes the interpolant on the two adjacent subintervals Simple construction - starts with really only two elementary basis functions; the rest follows from symmetry, scaling, translation and linear combinations Easy “synthesis” - since the interpolating function is a finite linear combination with the data as the coefficients it is easy to construct Easy “analysis” - if we are given a cubic splines function we can find the coefficients by evaluating function and its derivative at the nodes Smoothness – good but not great. We have continuous first derivatives, but generally discontinuous second derivatives. Easy implementation - it is straight forward to program a computer to set up and evaluate cubic splines efficiently.

Find a two-dimensional analog of linear interpolation for specified function values at mn given data points

A closer view of four data points

There a are four “bilinear” 2-D elementary basis functions. They are constructed from the 1-D elementary basis functions We define the bilinear 2-D elementary basis functions as follows:

The two 1-D elementary basis functions The four bilinear 2-D elementary basis functions

We can construct the 2-D bilinear spline basis functions directly from the 1-D linear spline basis functions We define the th 2-D bilinear spline basis function as follows: As in the 1-D case we want our basis functions to be zero at all but one of the data points.

We can construct the 2-D bicubic spline basis functions directly from the 1-D bicubic spline basis functions At each data point we define four 2-D bicubic spline basis functions as follows:

The 2-D bicubic spline basis functions

What have we done? Connecting the dots – continuous piecewise linear interpolation using the data to compute a linear equation for each subinterval using a linear combination of “Spline basis functions” Connecting the dashes – smooth, piecewise cubic, interpolation using slope and function data to compute a cubic equation for each subinterval using a linear combination of “Cubic spline basis functions” Interpolation using 2-D splines Bilinear spline basis functions Bicubic spline basis functions Overview – “elementary mathematics from an advanced standpoint” linear algebra, finite dimensional function spaces, inner products, small support, almost orthogonal bases, tensor products, finite element methods, wavelets, …

The end