0% found this document useful (0 votes)
23 views19 pages

L8 Interpolation Inverse Spline Methods

The document covers computer-oriented numerical methods focusing on interpolation techniques, including inverse interpolation and spline interpolation. It explains the Lagrange interpolating polynomial, methods for determining values of x from given y values, and the concept of spline curves in computer graphics. Additionally, it discusses various spline methods such as Hermite, Catmull-Rom, and Cardinal splines, highlighting their applications and advantages over higher-order polynomials.

Uploaded by

khushbu kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views19 pages

L8 Interpolation Inverse Spline Methods

The document covers computer-oriented numerical methods focusing on interpolation techniques, including inverse interpolation and spline interpolation. It explains the Lagrange interpolating polynomial, methods for determining values of x from given y values, and the concept of spline curves in computer graphics. Additionally, it discusses various spline methods such as Hermite, Catmull-Rom, and Cardinal splines, highlighting their applications and advantages over higher-order polynomials.

Uploaded by

khushbu kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CA 552: UNIT-II

Computer oriented numerical methods

Interpolation:
• Inverse Interpolation Method
• Spline Interpolation
Inverse Interpolation
• So far, given a set of values of x and y, we have
been finding the values of y corresponding to
a certain value of x.
• On the other hand, the process of estimating
the value of x for a value of y (which is not in
the table) is called inverse interpolation.

NOTE: When the values of x are unequally spaced Lagrange Method is


used and when the values of x are equally spaced, the iterative/newton
method should be used.
Lagrange Interpolating Polynomials

The Lagrange interpolating polynomial is given by:

n
f n ( x )  Li ( x ) f ( xi )
i 0
n x  xj
Li ( x ) 
j 0 xi  x j
j i
x  x1 x  x0
f1 ( x)  f ( x0 )  f ( x1 )
x0  x1 x1  x0

f 2 ( x) 
x  x1 x  x2 
f ( x0 ) 
x  x0 x  x2 
f ( x1 )
x0  x1 x0  x 2  x1  x0 x1  x 2 

x  x0 x  x1 
f ( x2 )
x2  x0 x2  x1 
Inverse Interpolation
Given (x0, f(x0)), (x1, f(x1)), (x2, f(x2)), …, (xn, f(xn))
and a function value f(xk), how do you determine (xk) ?

1. Using one of the interpolation methods (Newton or Lagrange), obtain


the function f(x) :
2 n
f ( x) a  a x  a x    a x
0 1 2 n

2. Plug in the value of f(xk) in the above equation and find one of the real
roots of the resultant equation using a root finding method:
2 n
a0  a1 x  a2 x    an x  f ( xk ) 0
Inverse interpolation
Lagrange Inverse Interpolation Method
• This procedure is similar to Lagrange Interpolation
formula, the only difference being that x is assumed
to be expressible as a polynomial in y.
• Lagrange formula is merely a relation between two
variables either of which may be taken as the
independent variable.

• Therefore, on inter-changing x and y in the Lagrange


formula, we obtain:
Lagrange Inverse Interpolation Method

x=
+

Which is used for inverse interpolation.


Example
Find the value of x corresponding to y=12, using Lagrange
formula:

x 1.2 2.1 2.8 4.1 4.9 6.2


y 4.2 6.8 9.8 13.4 15.5 19.6

Answer: 3.55
SPLINE
In computer graphics, a spline is a curve that connects two or more
specific points, or that is defined by two or more points. The term
can also refer to the mathematical equation that defines such a
curve.

Consider the set of points in the illustration below. It is easy to


envision a curve (red) that approximately connects the four points
(blue). In the old days of mechanical drafting, a flexible metal or
wooden strip (called a spline and the term from which the present
term derives) was used to construct approximate graphs such as this.
SPLINE
A spline curve is a mathematical representation for which it is
easy to build an interface that will allow a user to design and
control the shape of complex curves and surfaces.

The general, approach is that the user enters a sequence of


points, and a curve is constructed whose shape closely
follows this sequence. The points are called control points.

A curve that actually passes through each control point is


called an interpolating curve; a curve that passes near to the
control points but not necessarily through them is called an
approximating curve.
Spline Curve
Spline Interpolation

• There are cases where polynomials can lead to erroneous results


because of round off error and overshoot.

• Alternative approach is to apply lower-order polynomials to subsets of


data points. Such connecting polynomials are called spline functions
and the method is called spline interpolation.

EXAMPLE:
spline fits for a set of 4 points:
(a) linear
(b) quadratic
(c) cubic splines

• linear spline  
is superior to higher-order interpolating polynomials (parts a, b, and c)
Spline Interpolation
Quadratic Spline example
Quadratic Splines - Equations
Given (n+1) points, there are 3(n) coefficients to find and hence, need to
determine 3n equations to solve:

Each polynomial must pass through the endpoints of the interval that they
are associated with. And these conditions result in 2n equations:

ai xi2  bi xi  ci  f ( xi ) i 1,2, , n
ai xi2 1  bi xi  1  ci  f ( xi  1 ) i 1,2, , n
Methods of spline

• Hermite Cubic Splines


Methods of spline

• Catmul-Rom Splines
Methods of spline

• Cardinal Splines

You might also like