Thursday, June 13, 2019

Line Drawing Algorithm


Line Drawing Algorithm

Line Drawing Algorithm


     Y = mx+b                           (1)


is represent as a line equation where m is the slow and b the y intersects at the line.

tan θ = y/x

m = 〖y_2-y〗_1/(x_2-x_1 )                (2)

so, 


m = 〖y_2-y〗_1/(x_2-x_1 )




from the equation 1 and 2

b = y1-x1m      (3)

if the interval correspondent to y axis is called

del y and del x then

del y = m del x     (4)

m = (del y)/(del x)    (5)

There are two type of the line algorithm: -

No comments:

Post a Comment