Graphics Reference
In-Depth Information
for quadrant II.
X
Y = y 1
= x 1
hor,
X
Y = y 1 ,
= x 1
h
for quadrant III and,
X = x 1 + h
Y = y 1 or,
X = x 1
Y = y 1
h,
for quadrant IV, corresponding to the two possible senses.
Having determined the point ( X ,Y ), the next task is to construct the
line passing through ( X ,Y ) and parallel to P 1 P 2 so that it meets the line
P 2 P 3 at some point P 4 . The midpoint of this line, together with the pairs of
points ( X ,Y ), ( X 1 ,Y 1 ), and (( X 2 ,Y 2 ) ,P 4 ) then constitutes the Bezier
characteristic triangles for the arc.
1.6.3 Recursive Computation Algorithm
The recursive algorithm for computation of values for the second-order Bezier
approximation curve uses the forward difference scheme. Let
y = at 2 + bt + c
be a polynomial representation of (1.17), where the constant parameters
a, b, c are determined by the vertices of the Bezier characteristic triangle.
Suppose a number of points (values of y) on the arc are to be evaluated for
equispaced value of the independent variable t . The usual Newton's method
of evaluating the polynomial results in multiplications and does not make use
of the previously computed values to compute new values.
Assume that the parameter t ranges from 0 to 1. Let the incremental value
be q . Then the corresponding y values will be c , aq 2 + bq + c ,4 aq 2 +2 bq + c ,
9 aq 2 +3 bq + c,
. The difference Table 1.1 for recursive computation of points
for Bezier curve then takes the following form. Observe that
···
Table 1.1. Difference table for recursive computation of points.
t
2 y (2nd difference)
y
y (1st difference)
aq 2 + bq
2 aq 2
0
c
aq 2 + bq + c
3 aq 2 + bq
2 aq 2
q
2q 4 aq 2 +2 bq + c
5 aq 2 + bq
2 aq 2
3q 9 aq 2 +3 bq + c
7 aq 2 + bq
4q 16 aq 2 +4 bq + c
Search WWH ::




Custom Search