Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The standard bressenham algorithm expects the start and end point of the line segment to be perfectly centered inside the grid. The modified version lets you put the start and end points anywhere.

For example, the standard algorithm would always generate lines that are symmetrical:

    ####
        ####
But the modified version lets you position the endpoints different, so that you'd get:

     ###
        #####
or

     ##
       ######
etc


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: