Bresenhams Line Drawing Algorithm in Graphics.pdf

294 views 5 slides Feb 28, 2024
Slide 1
Slide 1 of 5
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5

About This Presentation

Bresenhams Line Drawing Algorithm


Slide Content

18CSE338J – Computer Graphics
Unit – 1 : Session –8 : SLO -1,2
Bresenhams Line Drawing Algorithm
1

Bresenhams Line Drawing Algorithm
•Thisalgorithmisusedforscanconvertingaline.Itwas
developedbyBresenham.Itisanefficientmethodbecauseit
involvesonlyintegeraddition,subtractions,andmultiplication
operations.Theseoperationscanbeperformedveryrapidly
solinescanbegeneratedquickly.
•GiventhecoordinateoftwopointsA(x1,y1)andB(x2,y2).
Thetaskistofindalltheintermediatepointsrequiredfor
drawinglineABonthecomputerscreenofpixels.Notethat
everypixelhasintegercoordinates.
•Inthismethod,nextpixelselectedisthatonewhohasthe
leastdistancefromtrueline.

2

3

•Bresenham's Line Algorithm
•1. Bresenham's Line Algorithm use fixed point, i.e., Integer Arithmetic
•2.Bresenham's Line Algorithm uses only subtraction and addition its
operation
•3. Bresenham's Algorithm is faster than DDA Algorithm in line because it
involves only addition & subtraction in its calculation and uses only integer
arithmetic.
•4. Bresenham's Line Algorithm is more accurate and efficient at DDA
Algorithm.
4
Tags