Graphics Reference
In-Depth Information
3.5
3
2.5
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
t
0.6
0.7
0.8
0.9
1
Fig. 9.10. The cubic Bernstein polynomial through the values 1 , 2 . 5 , − 2 . 5 , 3.
consider an example of blending between values 1 and 3, with V c1 and V c2 set
to 2.5 and
2 . 5 respectively. The blending curve is shown in Figure 9.10.
The next step is to associate the blending polynomials with x -and y -
coordinates:
t )+ x 2 t 3
y = y 1 (1 − t ) 3 + y c 1 3 t (1 − t ) 2 + y c 2 3 t 2 (1 − t )+ y 2 t 3
t ) 3 + x c 1 3 t (1
t ) 2 + x c 2 3 t 2 (1
x = x 1 (1
(9.14)
Evaluating (9.14) with the following points:
( x 1 ,y 1 )=(1 , 1)
( x c 1 ,y c 1 )=(2 , 3)
( x c 2 ,y c 2 )=(3 ,
2) ( x 2 ,y 2 )=(4 , 3)
we obtain the cubic Bezier curve as shown in Figure 9.11, which also shows
the guidelines between the end and control points.
Just to show how consistent Bernstein polynomials are, let's set the val-
ues to
( x 1 ,y 1 )=(1 , 1) ( x c 1 ,y c 1 )=(2 , 1 . 666)
( x c 2 ,y c 2 )=(3 , 2 . 333) ( x 2 ,y 2 )=(4 , 3)
4
3
2
1
0
0
1
2
3
4
5
1
x
Fig. 9.11. A cubic Bezier curve.
Search WWH ::




Custom Search