Graphics Reference
In-Depth Information
and (9.14) as
1
21
P 1
P c
P 2
·
p ( t )=[ t 2 t 1] ·
220
100
(9.25)
where p ( t ) is any point on the curve, and P 1 , P c and P 2 are the start, control
and end-points respectively.
A similar development can be used for a cubic Bezier curve, which has the
following matrix formulation:
·
13
31
P 1
P c 1
P c 2
P 2
3
630
p ( t )=[ t 3 t 2 t 1]
·
(9.26)
3300
1000
There is no doubt that Bezier curves are very useful, and they find their
way into all sorts of applications. Perhaps their one weakness, however, is
that whenever an end or control vertex is repositioned, the entire curve is
modified. So let's examine another type of curve that prevents this from hap-
pening: B-splines. But before we consider their cubic form, let's revisit linear
interpolation between multiple values.
9.5.1 Linear Interpolation
To interpolate linearly between two values V 0 and V 1 , we use the following
interpolant:
V ( t )= V 0 (1
t )+ V 1 t
for 0
t
1
(9.27)
But say we have to interpolate continuously between three values on a lin-
ear basis, i.e. V 0 ,V 1 ,V 2 , with the possibility of extending the technique to
any number of values. One solution is to use a sequence of parameter values
t 1 ,t 2 ,t 3 that are associated with the given values of V , as shown in Figure
9.13. For the sake of symmetry V 0 is associated with the parameter range t 0
to t 2 ,V 1 is associated with the parameter range t 1 to t 3 ,and V 2 is associ-
ated with the parameter range t 2 to t 4 . This sequence of parameters is called
a knot vector . The only assumption we make about the knot vector is that
t 0 ≤ t 1 ≤ t 2 , etc.
Now let's invent a linear blending function B i ( t ) whose subscript i is used
to reference values in the knot vector. We want to use the blending function
to compute the influence of the three values on any interpolated value V(t)
as follows:
V ( t )= B 0 ( t ) V 0 + B 1 ( t ) V 1 + B 2 ( t ) V 2
(9.28)
It's obvious from this arrangement that V 0 will influence V ( t ) only when t
is between t 0 and t 2 . Similarly, V 1 and V 2 will influence V ( t ) only when t is
between t 1 and t 3 ,and t 2 and t 4 respectively.
Search WWH ::




Custom Search