Graphics Programs Reference
In-Depth Information
−
that the spline is a
piecewise cubic
curve, puttogether from the
n
1 cubics
f
n
−
1
,
n
(
x
), all of which have different coefficients.
If we denote the secondderivative of the spline atknot
i
by
k
i
,continuity of second
derivatives requires that
f
1
,
2
(
x
)
,
f
2
,
3
(
x
)
,...,
f
i
f
i
i
(
x
i
)
=
1
(
x
i
)
=
k
i
(a)
−
1
,
,
i
+
Atthisstage, each
k
is unknown,exceptfor
k
1
=
k
n
=
0
(3.9)
The starting pointfor computing the coefficients of
f
i
,
i
+
1
(
x
) is the expression for
f
i
which weknow to belinear. Using Lagrange'stwo-point interpolation, we
can write
1
(
x
)
,
,
+
i
f
i
1
(
x
)
=
k
i
i
(
x
)
+
k
i
+
1
i
+
1
(
x
)
,
i
+
where
x
−
x
i
+
1
x
i
x
i
+
1
−
x
−
i
(
x
)
=
1
(
x
)
=
i
+
x
i
−
x
i
+
1
x
i
Therefore,
k
i
(
x
−
x
i
+
1
)
−
k
i
+
1
(
x
−
x
i
)
f
i
1
(
x
)
=
(b)
,
i
+
x
i
−
x
i
+
1
Integrating twice with respect to
x
, weobtain
x
i
+
1
)
3
x
i
)
3
k
i
(
x
−
−
k
i
+
1
(
x
−
f
i
,
i
+
1
(
x
)
=
+
A
(
x
−
x
i
+
1
)
−
B
(
x
−
x
i
)
(c)
6(
x
i
−
x
i
+
1
)
where
A
and
B
areconstants of integration. The last twoterms in Eq. (c) wouldusually
be writtenas
Cx
Bx
i
, weend up with
the terms in Eq. (c), which are moreconvenienttouse in the computationsthat
follow.
Imposing the condition
f
i
,
i
+
1
(
x
i
)
+
D
.
By letting
C
=
A
−
B
and
D
=−
Ax
i
+
1
+
=
y
i
, we get fromEq. (c)
x
i
+
1
)
3
k
i
(
x
i
−
x
i
+
1
)
+
A
(
x
i
−
=
x
i
+
1
)
y
i
6(
x
i
−
Therefore,
y
i
x
i
−
k
i
6
(
x
i
−
A
=
x
i
+
1
−
x
i
+
1
)
(d)
Similarly,
f
i
,
i
+
1
(
x
i
+
1
)
=
y
i
+
1
yields
y
i
+
1
k
i
+
1
6
B
=
x
i
+
1
−
(
x
i
−
x
i
+
1
)
(e)
x
i
−
Search WWH ::
Custom Search