**Unformatted text preview: **Interactive Computer Graphics:
Lecture 11
"
Introduction to Spline Curves
! Splines Splines" Graphics Lecture 11: Slide 2!
2 / 38 Splines"
Splines • The word spline comes from the ship building trade
where planks were originally shaped by bending them
The word spline comes fromthe ground.!
round pegs ﬁxed in the ship building trade where planks
were originally shaped by bending them round pegs ﬁxed in the
ground. • Originally it was the pegs that were referred to as
splines.!
! Originally it was the pegs that
were referred to as splines. Now
it is the smooth curve that is
called a spline.
Graphics Lecture 11: Slide 3! Interpolating Splines Interpolating Splines" Modern splines aresplines are smooth curves a small set of a small
• Modern smooth curves deﬁned from deﬁned from
points often called knots.
set of points often called knots. ! • In one main class of splines, the curve must pass In one main class of splines, the curve must pass through each
through each point of the set.!
point of the set. • These are called interpolating splines!
These are called
!
interpolating splines Graphics Lecture 11: Slide 4! 4 / 38 Approximating Splines Approximating Splines"have to pass through all the
In other cases the curves do not
points. • In other cases the curves do not pass through the points.!
Points can act as control pointspoints which the user can move
• The points act as control which the user can move to adjust
the tshape of the curve interactively
o adjust the shape of the curve interactively! Graphics Lecture 11: Slide 5!
5 / 38 Non-Parametric Spline"
• The simplest splines are just equations in x and y (for two
dimensions)!
• The most common is the polynomial spline:!
y = a2x2 + a1x + a0
• Given three points we can calculate a2, a1 and a0 Graphics Lecture 11: Slide 6! A Non-Parametric (Parabolic) Spline"
Non Parametric Splines • Example ofdegree 2 (parabolic) non-parametric spline:
Example of a a degree 2 (parabolic) non-parametric spline:! • There is no control using non parametric splines. Only
There is no control using non parametric splines. Only one curve
one curve ﬁts parabola) ﬁts the data. !
(a the data.
(a parabola)
Graphics Lecture 11: Slide 7!
7 / 38 Parametric Splines Parametric Splines"
If write our spline in a in a vector form we
If• we we write our spline vector form we get: get:!
P = a2 µ2 + a1 µ + a0 • which a parameter µ by µ!
which has has a parameter convention, as µ ranges from 0 to 1
the point P traces out a curve⇤ .
• By convention, as µ ranges from 0 to 1 the point P traces
out a curve.! ⇤ Note that P, a0 , a1 and a2 are all vectors and that µ is a scalar
8 / 38 Graphics Lecture 11: Slide 8! Calculating simple parametric splines
Calculating simple parametric splines Calculating simple parametric splines"
We can now solve for the vector constants a0 , a1 andaa2 nd a as
We can now solve for the vector constants...

View
Full Document

- Spring '14
- µ, cubic spline patch, Interpolating Splines