6. Bitmap Stroke and GLUT API Timer Complete
Improved Algorithm of Straight Line Rasterization
Void
line (int x0, int y0, int x1, int y1)
{M =
flout
(y1-y0) / (x1-x0)
;
int x = x0;
int y = y0;
point (x, y);
if (x = 0
& & m> = 0 & & m
do
{x = x +1;
y = y1 + m (x -x1);
point (x, y);
} while (x! = x1);
0 comments:
Post a Comment