Bresenham’s
Line Drawing Algorithm :
Begin:
Read (Xa , Ya) and (Xb , Yb)
dY = Yb – Ya
dX = Xb – Xa
P = 2dY – dX
X = Xa, Y = Ya
While(X <= Xb)
{
plotpoint(X,Y)
X++
if(P<0)
P=P
+ 2dY
else
{
Y++
P = P+2(dY - dX)
}
}
Thank you......... :*
ReplyDelete