Graphics Reference
In-Depth Information
represented in matrix form by
⎡
⎤
⎡
⎤
−
13
−
31
P
i
P
i
+1
P
i
+2
P
i
+3
⎣
⎦
·
⎣
⎦
1
6
·
3
−
630
Q
1
(
t
)=[
t
3
t
2
t
1]
·
(9.45)
−
3030
1410
Let's now illustrate how (9.45) works. We first identify the control points
P
i
,
P
i
+2
, etc. Let these be (0, 1), (1, 3), (2, 0), (4, 1), (4, 3), (2, 2) and
(2, 3). They can be seen in Figure 9.16 connected together by straight lines.
If we take the first four control points: (0, 1), (1, 3), (2, 0), (4, 1), and subject
the
x
-and
y
-coordinates to the matrix in (9.45) over the range 0
P
i
+1
,
1,
we obtain the first B-spline curve segment shown in Figure 9.16. If we move
along one control point and take the next group of control points (1, 3), (2, 0),
(4, 1), (4, 3), we obtain the second B-spline curve segment. This is repeated
a further two times.
Figure 9.16 shows the four curve segments using two gray scales, and it is
obvious that even though there are four discrete segments, they join together
perfectly. This is no accident. The slopes at the end-points of the basis curves
are designed to match the slopes of their neighbours and ultimately to keep
the geometric curve continuous.
≤
t
≤
9.6.2 Continuity
Constructing curves from several segments can only succeed if the slopes of
the abutting curves match. As we are dealing with curves whose slopes are
changing everywhere, it is necessary to ensure that even the rate of change of
slopes is matched at the join. This aspect of curve design is called
geometric
continuity
and is determined by the continuity properties of the basis function.
Let's explore such features.
The
first level
of curve continuity,
C
0
, ensures that the physical end of
one basis curve corresponds with the following, e.g.
S
i
(1) =
S
i
+1
(0). We know
that this occurs by the graphs shown in Figure 9.15. The
second level
of curve
continuity,
C
1
, ensures that the slope at the end of one basis curve matches
3.5
3
2.5
2
1.5
1
0.5
0
0
1
2
3
4
5
x
Fig. 9.16.
Four curve segments forming a B-spline curve.