









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Splines
L. Olson
Department of Computer Science
University of Illinois at Urbana-Champaign
November 1, 2006
finish up quadrature
start splines
40K tetrahedrons.
40K tetrahedrons.
need to integrate a function f (x) over each tet Ωi:
Ωi
f (x) dx
needs quadrature
map the integration to a reference tetrahedron
perform Gauss Quadrature using (n + 1 )(n + 2 )(n + 3 )/ 6 quadrature
points (where n is the 1-D number of points).
f (x) is often a product of degree m Lagrange interpolating polynomials
...needs large n
results in # of tetrahedrons × n
3 / 6 function evaluations
A function f (x) is considered a piecewise polynomial on [a, b] if there exists a
(finite) partition P of [a, b] such that f (x) is a polynomial on each [ti, ti+ 1 ] ∈ P.
f (x) =
x
3 x ∈ [ 0 , 1 ]
x x ∈ ( 1 , 2 )
3 x ∈ [ 2 , 3 ]
we would like the piecewise polynomial to do two things
1 interpolate (or be close to) some set of data points
2 look nice (smooth)
one option is called a spline
A function S(x) is a spline of degree 1 if:
1 The domain of S(x) is an interval [a, b]
2 S(x) is continuous on [a, b]
3 There is a partition a = t 0 < t 1 < · · · < tn = b such that S(x) is linear on
each subinterval [ti, ti+ 1 ].
S(x) =
x x ∈ [− 1 , 0 ]
1 x ∈ ( 0 , 1 )
2 x − 2 x ∈ [ 1 , 2 ]
Given data t 0
,... , t n
and y 0
,... , y n
, how do we form a spline? We need two
things to hold in the interval [a, b] = [t 0 , tn]:
1 S(ti) = yi for i = 0 ,... , n
2 Si(x) = aix + bi for i = 0 ,... , n
Write Si(x) in point-slope form
Si(x) = yi + mi(x − ti)
= yi +
y i+ 1
− y i
ti+ 1 − ti
(x − ti)
Done.
Interesting:
input n + 1 data points t 0
,... , t n
,y 0
,... , y n
in each interval we have S i
(x) = a i
x + b i
2 unknowns per interval [t i
, t i+ 1
or 2 n total unknowns
the n + 1 pieces of input contraints S(t i
) = y i
gives 2 constraints per
interval
or 2 n total constraints
A function S(x) is a spline of degree 2 if:
1 The domain of S(x) is an interval [a, b]
2 S(x) is continuous on [a, b]
3 S
′ (x) is continuous on [a, b]
4 There is a partition a = t 0
< t 1
< · · · < t n
= b such that S(x) is quadratic
on each subinterval [t i
, t i+ 1
3 unknowns in each interval
3 n total unknowns
2 n constraints for matching up the input data (2 per interval)
n − 1 interior points require continuity of the derivative:
′
i
(x i+ 1
′
i+ 1
(x i+ 1
but this is just n − 1 constraints
total of 3 n − 1 constraints
extra consraint: S
′ (x 0
) =given, for example.
degree 3 splines: cubic splines
most common
full algorithm
the B-splines/Bezier Curves