2

I have been studying DDA and Bresenham algorithms for line drawing and am curious about one thing.In both the algorithms,we consider a pixel grid to be of unit size and perform further steps.My question is if I change my grid size to say 0.5*0.5 instead of 1*1 grid,will there be any changes reflected in the way both algorithms work.If yes,can somebody enlighten me as to what those changes will be in each algorithm respectively.Very curious to know.Thanks for your answers in advance.Anybody who can help,please do so,since it urgent.I have an exam and I want this concept clarified.Please.Thanks:)

  • 1
    in DDA the step will be half so you can not use increment .... instead you have to use for example `x+=0.5` which is a small bit slower and prevent to use integers (yes DDA can be done on Integers just with `+,-`). With Bresenham it is much worse as the iteration equation will have different coefficients which need to be computed first. Much simpler would be internally convert coordinate system to unit step. – Spektre Apr 17 '16 at 05:40

0 Answers0