Graphics Reference
In-Depth Information
1
2
Interpolation steps
1. 1/3 of the way between
paired points
2. 1/3 of the way between
points of step 1
3. 1/3 of the way between
points of step 2
2
1
3
1
FIGURE B.46
De Casteljau construction of a point on a cubic Bezier curve.
Tension controls the sharpness of the bend of the curve at P i . It does this bymeans of a scale factor that
changes the length of both the incoming and outgoing tangents at the control point ( Eq. B.85 ). In the
default case, t ¼
0 and the tangent vector is the average of the two adjacent chords or, equivalently, half
of the chord between the two adjacent points, as in the Catmull-Rom spline. As the tension parameter, t ,
goes to one, the tangents become shorter until they reach zero. Shorter tangents at the control point mean
that the curve is pulled closer to a straight line in the neighborhood of the control point (see Figure B.47 ).
1
2 P 1 P i
T i ¼ T i ¼
ð
1
t
Þ
ð
ð
Þ þ P i P i 1
ð
Þ
Þ
(B.85)
The continuity parameter, c , gives the user control over the continuity of the curve at the control
point where the two curve segments join. The incoming (left) and outgoing (right) tangents at a control
point are defined symmetrically with respect to the chords on either side of the control point. Assuming
default tension, c blends the adjacent chords to form the two tangents, as shown in Equation B.86 .
1
c
2
1
þ c
2
T i ¼
ð
P i P i 1
Þ þ
ð
P 1 P i
Þ
(B.86)
1
þ c
2
1
c
2
T i ¼
ð
P i P i 1
Þ þ
ð
P 1 P i
Þ
0, which produces equal left and right tangent vectors, result-
ing in continuity at the joint. As c approaches -1, the left tangent approaches equality with the chord to
the left of the control point and the right tangent approaches equality with the chord to the right of the
control point. As c approaches
The default value for continuity is c ¼
1, the definitions of the tangents reverse themselves, and the left tan-
gent approaches the right chord and the right tangent approaches the left chord (see Figure B.48 ) .
Bias, b , defines a common tangent vector, which is a blend between the chord left of the control
point and the chord right of the control point ( Eq. B.87 ) . At the default value ( b ¼
þ
0), the tangent is an
even blend of these two, resulting in a Catmull-Rom type of internal tangent vector. Values of b
approaching
1 bias the tangent toward the chord to the left of the control point, while values of b
þ
approaching
1 bias the tangent toward the chord to the right (see Figure B.49 ) .
1
þ b
2
1
b
2
T i ¼ T i ¼
ð
P i P i 1
Þ þ
ð
P 1 P i
Þ
(B.87)
 
Search WWH ::




Custom Search