Game Development Reference
In-Depth Information
and with just a little effort we can also express it in Bezier form as
C 1 continuity condition
for cubic Bezier splines
k i f i = a i k i .
With a quick application of algebra, we see that geometrically this means
that the knot is at the midpoint of the line between f i and a i :
k i
f i = a i
k i ,
2 k i = f i + a i ,
k i = ( f i + a i )/2.
Most curve design tools will automatically enforce this rule for you. For
example, when you move a control point in Photoshop, it automatically
moves the opposing control point like a seesaw, and if you pull the control
point away from the anchor point (the knot), the opposing control point
will mirror your movements to maintain the C 1 continuity relationship. (If
you want to force a corner in the curve, you can hold a modifier key to tell
Photoshop not to do this).
Now let's look at C 2 continuity. It's is easier to visualize in Bezier form
than Hermite. We just need to apply what we learned in Section 13.4.3 to
make the ending acceleration of one segment (the left side of the equations
below) match the starting acceleration of the next segment (on the right
side):
6 a i−1 − 12 f i + 6 k i = 6 k i − 12 a i + 6 f i+1 ,
a i−1 − 2 f i + k i = k i − 2 a i + f i+1
2 f i
C 2 continuity condition
for cubic Bezier splines
a i−1 , = 2 a i
f i+1 ,
f i + ( f i
a i−1 ) = a i + ( a i
f i+1 ).
The geometric interpretation of this is as follows: Take the two Bezier
control polygon segments that are not direct neighbors of the knot, but one
segment away, and “double” them. If they meet at a common point, the
curve is C 2 continuous. To visualize this, compare the two Bezier curves in
Figure 13.22. Both have C 1 continuity, since the knot k i is on the midpoint
of the line between f i and a i for both curves. However, the top curve is C 2
continuous because the extensions of the neighboring control polygon lines
meet at the common point; the curve on the bottom is not C 2 continuous.
13.8.2 Geometric Continuity
Geometric continuity is a broader criterion of continuity. Different authors
use different definitions for geometric continuity, but a very general one is
that a curve has G n continuity if there exists some way to parameterize
the curve such that the curve has C n continuity. Let's look at an example.
Search WWH ::




Custom Search