   About line drawing
  Hi,I am wondering something about line drawing algorithms. I searched through the net for it and found that there are currently two algorithms used:  DDA and Bresenham algorithms. For Bresenham algorithm is it possible to maintain a decision variable between 0-1 ?   
  Sure, it wouldn't really mess up the math too much; you'd just stick a bunch of +0.5s and -0.5s in the appropriate places. Of course, nobody really uses Bresenham in its floating-point form; they use it converted to rational number arithmetic, which is DDA. What are you trying to accomplish?   ;  Hmm Im trying something different. But I dont understand where these -0.5 and 0.5 come from. Are these the coordinates of midpoint?   ;  They're the offset of the ideal pixel location from the actual pixel location. If the offset was 0.7, then you would have picked the wrong actual pixel location, as there would be another actual pixel at offset -0.3.   