[ Contact ] [ Links ] [ Previous : 15 / 20 : Another look at Bresenham ] [ Up ] [ Next : 17 / 20 : Another look at Bresenham (3) ]

Another look at Bresenham (2)

decision : we'll study the sign of a integer parameter whose value is proportional to the difference between the separations of the two pixel positions from the actual line path.

recursive process

  • step 0

  • from k to k+1 : choice (xk + 1, yk) or (xk + 1, yk + 1)

y = m (xk + 1) + b

d1 = y - yk = m (xk + 1) + b - yk

d2 = (yk + 1) - y = yk + 1 - m (xk + 1) -b

what we want to know : which of d1 and d2 is smaller, what we'll study : the sign of d1 - d2

d1 - d2 = 2 m (xk + 1) - 2 yk + 2b -1

 

 


See the "Links" link above to find out the sources of the proposed informations
Pascal Vuylsteker / eScience / Computer Science / ANU
Last modified: 20/4/2004
TOC - Print
Send your comments at :
<Hugh.Fisher@anu.edu.au>