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

It's been a long time but IIRC Bresenhams needs one divide? I spent hours try to get rid of it...


You have to do a shift or two but no divides. That's the beauty of Bresenham's: You can draw the line without ever explicitly computing the slope.

In effect, Bresenham ends up performing a division by repeated subtraction. And at every subtraction step, it outputs a pixel.




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

Search: