computer graphics

Page 19

Bresenham’s Line-Drawing Algorithm

n n

So, F(x,y) = -2W(y – Ay) + 2H(x – Ax) Algorithm, If: n n

n n

F(x, y) < 0, (x, y) above line F(x, y) > 0, (x, y) below line

Hint: F(x, y) = 0 is on line Increase y keeping x constant, F(x, y) becomes more negative


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.