Game Development Reference
In-Depth Information
Figure 13.17
The de Casteljau
algorithm gives us all
the B ezier control
points of the
extracted curve
segment
b 1 completely determines the first derivative (the velocity) at t = 0. Now,
the subcurve that we are extracting is part of the same infinite curve, and
thus its position and derivatives match everywhere, in a geometric sense.
However, the derivative is a rate of change relative to the rate of change
of the parameter. By subdividing, we have made the parameter t move
“faster,” since it goes from 0 to 1 over a smaller spatial interval. Thus,
the derivative of the subcurve is in the same direction, but it is shorter
according to the fraction of the curve that we are extracting, in our case
the value b.
Let's summarize our findings. To extract the left half of a curve, 0 ≤
t ≤ b, we perform de Casteljau subdivision as if we were trying to locate the
endpoint at t = b. The first control point from each round of interpolation
gives us another control point for our subdivided curve. Extracting the
right half of a curve is analogous, so we won't go into detail here.
There is one important special case of Bezier subdivision that we can do
armed only with what we know so far: subdividing a curve “in half” at t =
1/2. This computation makes possible rather elegant recursive algorithms
for adaptive subdivision. Let's use our standard notation b i for the original
Bezier control points. For the two halves, we pick two letters at random
and call the control points for the left and right halves of the curve q i and
r i , respectively. The seven control points are given by
Subdividing a Bezier
curve at t = 1/2
q 0 = b 0 ,
q 1 = b 0 /2 + b 1 /2,
q 2 = b 0 /4 + b 1 /2 + b 2 /4,
q 3 = r 0 = b 0 /8 + 3 b 1 /8 + 3 b 2 /8 + b 3 /8,
r 1 = b 1 /4 + b 2 /2 + b 3 /4,
 
Search WWH ::




Custom Search