TVP4020
Programmers Reference Manual
Graphics Programming
51
the Rasterizer’s edge DDAs. However, accumulation of rasterization
errors can occur which may result in imprecise rendering.
The ContinueNewDom command can be used to draw complex 2D
shapes as a series of trapezoids. Since this command only affects the
Rasterizer DDA and not that of any other units, it is not suitable for 3D
operations.
5.3.2
Lines
Single pixel wide aliased lines are drawn using a DDA algorithm, so all
P
ERMEDIA
needs by way of input data is StartX, StartY, dX, dY and
length. The algorithm calculates:
while (length--)
{
X = X + dx
Y = Y + dy
plot ((int)X, (int)Y)
}
Consider rendering a two segment
polyline from (X
1
, Y
1
) to (X
2
, Y
2
) to
(X
3
, Y
3
)
Both segments are X major so:
abs (X
n+1
- X
n
) > abs (Y
n+1
- Y
n
)
The pseudocode to render this line
is shown below.
(X1, Y1)
(X2, Y2)
(X3, Y3)
Figure 5.5
Polyline
Содержание TVP4020 PERMEDIA 2
Страница 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Страница 47: ...Memory I O and Organization TVP4020 Programmers Reference Manual 38 Texture address TextureBaseAddress T W S ...
Страница 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Страница 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Страница 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Страница 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Страница 323: ...Index TVP4020 Programmers Reference Manual 314 ...