Bresenham's algorithm next pixel? In line drawing, bresenham's algorithm was explicitly derived for lines with slopes between 0 and 1 in the first octant from point P1 to point P2, where the x value of P1 is less than that for P2.

In the incremental version of this algorithm, once a pixel is drawn, we need to choose the next pixel to draw. 

What are the choices? How do we go about choosing which pixel to draw next? (assuming a line width of 1 pixel)
Well, for the first octant you can either step EAST or NORTH-EAST. Depending on the distance to the actual line you choose the appropriate. In many integer implementations, this is done with regard to the sign of D.