Line Drawing Algorithm
Line Drawing Algorithm
Y = mx + b
In this formula, m is the slope line and b is the line’s intercept of y. Two endpoints
for the line segment are supplied in coordinates (x1, y1) and (x2, y2).
Properties of a Line Drawing Algorithm
These Algorithm has the following characteristics.
When a point changes its location, the Digital Differential Analyzer method alerts us
about the overflow.
A round-off mistake may cause the measured pixel location to deviate from the true
long-line segment path.
In this method, next pixel selected is that one who has the least distance from true
line.
Assume a pixel P1'(x1',y1'),then select subsequent pixels as we work our may to the
night, one pixel position at a time in the horizontal direction toward P 2'(x2',y2').
The line is best approximated by those pixels that fall the least distance from the path
between P1',P2'.