Patent ID: 6583788
Filing Date: 2003-06-24
Classification: G06T,G09G

Abstract:
A method for rendering a line segment extending in the positive-x direction and positive-y direction with an absolute value of its slope between 0 and 1 on a computer display given a starting point and an ending point, the starting point having the form (xs, ys) and the ending point having the form (xe, ye), xs, ys, xe, ye each having an integer portion and a fractional portion, the computer display having a current location initially set to a pixel containing the starting point, the method including:determining &Dgr;x by computing &Dgr;x=|xeâˆ’xs|; determining &Dgr;y by computing &Dgr;y=|yeâˆ’ys|; finding dt(0)=(yf*&Dgr;x)âˆ’(xf*&Dgr;y), where xf is the fractional portion of xs and yf is the fractional portion of ys; for each column n containing a portion of said line segment: plotting said current location if dt(n)<=0.5*&Dgr;x and plotting a pixel above said current location if dt(n)>0.5*&Dgr;x; moving said current location to the right one pixel if dt(n)<=0.5*&Dgr;x and moving said current location to the right and up one pixel if dt(n)>0.5*&Dgr;x; correcting dt(n) by computing dt(n)=dt(n)âˆ’&Dgr;x if dt(n)>0.5*&Dgr;x; and computing dt(n+1)=dt(n)+&Dgr;y.