SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Computer Graphics 4: Bresenham Line  Drawing Algorithm,  Circle Drawing &  Polygon Filling
Contents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Bresenham Line Algorithm ,[object Object],[object Object],Jack Bresenham worked for 27 years at IBM before entering academia. Bresenham developed his famous algorithms at IBM in the early 1960s
The Big Idea ,[object Object],2 3 4 5 2 4 3 5 For example, from position (2, 3) we have to choose between (3, 3) and (3, 4) We would like the point that is closer to the original line ( x k ,  y k ) ( x k +1,  y k ) ( x k +1,  y k +1)
Deriving The Bresenham Line Algorithm ,[object Object],The  y  coordinate on the mathematical line at  x k + 1  is: y y k y k+ 1 x k + 1 d lower d upper
[object Object],[object Object],[object Object],Deriving The Bresenham Line Algorithm (cont…)
[object Object],[object Object],Deriving The Bresenham Line Algorithm (cont…)
[object Object],[object Object],[object Object],Deriving The Bresenham Line Algorithm (cont…)
[object Object],[object Object],[object Object],Deriving The Bresenham Line Algorithm (cont…)
[object Object],[object Object],[object Object],Deriving The Bresenham Line Algorithm (cont…)
The Bresenham Line Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object]
The Bresenham Line Algorithm (cont…) ,[object Object],[object Object],[object Object]
Bresenham Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bresenham Example (cont…) 17 16 15 14 13 12 11 10 18 29 27 26 25 24 23 22 21 20 28 30 k p k (x k+1 ,y k+1 ) 0 1 2 3 4 5 6 7 8 9
Bresenham Exercise ,[object Object]
Bresenham Exercise (cont…) 17 16 15 14 13 12 11 10 18 29 27 26 25 24 23 22 21 20 28 30 k p k (x k+1 ,y k+1 ) 0 1 2 3 4 5 6 7 8
Bresenham Line Algorithm Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A Simple Circle Drawing Algorithm ,[object Object],[object Object],[object Object]
A Simple Circle Drawing Algorithm (cont…)
A Simple Circle Drawing Algorithm (cont…) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Eight-Way Symmetry ,[object Object],(x, y) (y, x) (y, -x) (x, -y) (-x, -y) (-y, -x) (-y, x) (-x, y)
Mid-Point Circle Algorithm ,[object Object],[object Object],The mid-point circle algorithm was developed by Jack Bresenham, who we heard about earlier. Bresenham’s patent for the algorithm can be viewed  here .
Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object],[object Object],( x k +1, y k ) ( x k +1, y k -1) ( x k , y k )
Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object]
Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object],[object Object]
Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object],[object Object]
Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object]
The Mid-Point Circle Algorithm ,[object Object],[object Object],[object Object],[object Object]
The Mid-Point Circle Algorithm (cont…) ,[object Object],[object Object],[object Object],[object Object]
Mid-Point Circle Algorithm Example ,[object Object]
Mid-Point Circle Algorithm Example (cont…) 9 7 6 5 4 3 2 1 0 8 9 7 6 5 4 3 2 1 0 8 10 10 k p k (x k+1 ,y k+1 ) 2x k+1 2y k+1 0 1 2 3 4 5 6
Mid-Point Circle Algorithm Exercise ,[object Object]
Mid-Point Circle Algorithm Example (cont…) k p k (x k+1 ,y k+1 ) 2x k+1 2y k+1 0 1 2 3 4 5 6 7 8 9 10 11 12 9 7 6 5 4 3 2 1 0 8 9 7 6 5 4 3 2 1 0 8 10 10 13 12 11 14 15 13 12 14 11 16 15 16
Mid-Point Circle Algorithm Summary ,[object Object],[object Object],[object Object]
Filling Polygons ,[object Object],[object Object],[object Object]
Scan-Line Polygon Fill Algorithm 2 4 6 8 10 Scan Line 0 2 4 6 8 10 12 14 16
Scan-Line Polygon Fill Algorithm ,[object Object],[object Object],[object Object],[object Object]
Scan-Line Polygon Fill Algorithm (cont…)
Line Drawing Summary ,[object Object],[object Object],[object Object],[object Object]
Anti-Aliasing
Summary Of Drawing Algorithms
Mid-Point Circle Algorithm (cont…) 6 2 3 4 1 5 4 3
Mid-Point Circle Algorithm (cont…) M 6 2 3 4 1 5 4 3
Mid-Point Circle Algorithm (cont…) M 6 2 3 4 1 5 4 3
Blank Grid
Blank Grid
Blank Grid 9 7 6 5 4 3 2 1 0 8 9 7 6 5 4 3 2 1 0 8 10 10
Blank Grid

Weitere ähnliche Inhalte

Was ist angesagt?

Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...Saikrishna Tanguturu
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determinationPatel Punit
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentationLOKENDRA PRAJAPATI
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphicsSafayet Hossain
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circleDivy Kumar Gupta
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithmPooja Dixit
 
2.4 rule based classification
2.4 rule based classification2.4 rule based classification
2.4 rule based classificationKrish_ver2
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithmMani Kanth
 
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICSATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICSnehrurevathy
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clippingShweta Shah
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphicsLOKESH KUMAR
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Mani Kanth
 

Was ist angesagt? (20)

Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Min-Max algorithm
Min-Max algorithmMin-Max algorithm
Min-Max algorithm
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphics
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Illumination Models & Shading
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circle
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithm
 
2.4 rule based classification
2.4 rule based classification2.4 rule based classification
2.4 rule based classification
 
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 lecture2  computer graphics graphics hardware(Computer graphics tutorials) lecture2  computer graphics graphics hardware(Computer graphics tutorials)
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 
Clipping
ClippingClipping
Clipping
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
 
Anti aliasing Computer Graphics
Anti aliasing Computer GraphicsAnti aliasing Computer Graphics
Anti aliasing Computer Graphics
 
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICSATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
 
03.Scan Conversion.ppt
03.Scan Conversion.ppt03.Scan Conversion.ppt
03.Scan Conversion.ppt
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
 

Andere mochten auch

Digital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmDigital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmKasun Ranga Wijeweera
 
Bresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmMahesh Kodituwakku
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.Mohd Arif
 
Lab lecture 2 bresenham
Lab lecture 2 bresenhamLab lecture 2 bresenham
Lab lecture 2 bresenhamsimpleok
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
 
Computer Graphics Programes
Computer Graphics ProgramesComputer Graphics Programes
Computer Graphics ProgramesAbhishek Sharma
 
Lines and curves algorithms
Lines and curves algorithmsLines and curves algorithms
Lines and curves algorithmsMohammad Sadiq
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformationjapan vasani
 
SE Computer, Programming Laboratory(210251) University of Pune
SE Computer, Programming Laboratory(210251) University of PuneSE Computer, Programming Laboratory(210251) University of Pune
SE Computer, Programming Laboratory(210251) University of PuneBhavesh Shah
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmMrinmoy Dalal
 
dda algorithm
dda  algorithmdda  algorithm
dda algorithm774474
 
Advanced Computer Aided Design ACAD
Advanced Computer Aided Design ACADAdvanced Computer Aided Design ACAD
Advanced Computer Aided Design ACADJordi Torner
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics labPriya Goyal
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.Mohd Arif
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 

Andere mochten auch (20)

Digital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmDigital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing Algorithm
 
Bresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing Algorithm
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
 
Lab lecture 2 bresenham
Lab lecture 2 bresenhamLab lecture 2 bresenham
Lab lecture 2 bresenham
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
bresenham circles and polygons in computer graphics(Computer graphics tutorials)
bresenham circles and polygons in computer graphics(Computer graphics tutorials)bresenham circles and polygons in computer graphics(Computer graphics tutorials)
bresenham circles and polygons in computer graphics(Computer graphics tutorials)
 
Lect14 lines+circles
Lect14 lines+circlesLect14 lines+circles
Lect14 lines+circles
 
Bresenhams
BresenhamsBresenhams
Bresenhams
 
Computer Graphics Programes
Computer Graphics ProgramesComputer Graphics Programes
Computer Graphics Programes
 
Lines and curves algorithms
Lines and curves algorithmsLines and curves algorithms
Lines and curves algorithms
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformation
 
SE Computer, Programming Laboratory(210251) University of Pune
SE Computer, Programming Laboratory(210251) University of PuneSE Computer, Programming Laboratory(210251) University of Pune
SE Computer, Programming Laboratory(210251) University of Pune
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing Algorithm
 
dda algorithm
dda  algorithmdda  algorithm
dda algorithm
 
Advanced Computer Aided Design ACAD
Advanced Computer Aided Design ACADAdvanced Computer Aided Design ACAD
Advanced Computer Aided Design ACAD
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Graphics Programming in C
Graphics Programming in CGraphics Programming in C
Graphics Programming in C
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
2. fractal presentation
2. fractal presentation2. fractal presentation
2. fractal presentation
 

Ähnlich wie Graphics6 bresenham circlesandpolygons

Lecture-4-Scan_Conversion_Bresenhams_Algorithm.ppt
Lecture-4-Scan_Conversion_Bresenhams_Algorithm.pptLecture-4-Scan_Conversion_Bresenhams_Algorithm.ppt
Lecture-4-Scan_Conversion_Bresenhams_Algorithm.pptKhondokarMdMehediHas
 
Bresenham circlesandpolygons
Bresenham circlesandpolygonsBresenham circlesandpolygons
Bresenham circlesandpolygonsaa11bb11
 
Unit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsUnit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsAmol Gaikwad
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer GraphicsKamal Acharya
 
Unit 2
Unit 2Unit 2
Unit 2ypnrao
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualAnkit Kumar
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxKokebe2
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2SanthiNivas
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfRajJain516913
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
cgrchapter2version-1-200729063505 (1).pdf
cgrchapter2version-1-200729063505 (1).pdfcgrchapter2version-1-200729063505 (1).pdf
cgrchapter2version-1-200729063505 (1).pdfmeenasp
 
Bresenhems line Genration derivation for Mtech
Bresenhems line Genration derivation for MtechBresenhems line Genration derivation for Mtech
Bresenhems line Genration derivation for Mtechrahulkatre9
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniyaTutorialsDuniya.com
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output PrimitivesPrathimaBaliga
 

Ähnlich wie Graphics6 bresenham circlesandpolygons (20)

Lecture-4-Scan_Conversion_Bresenhams_Algorithm.ppt
Lecture-4-Scan_Conversion_Bresenhams_Algorithm.pptLecture-4-Scan_Conversion_Bresenhams_Algorithm.ppt
Lecture-4-Scan_Conversion_Bresenhams_Algorithm.ppt
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
 
Bresenham circlesandpolygons
Bresenham circlesandpolygonsBresenham circlesandpolygons
Bresenham circlesandpolygons
 
Unit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsUnit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithms
 
Computer graphics notes
Computer graphics notesComputer graphics notes
Computer graphics notes
 
Computer graphics notes watermark
Computer graphics notes watermarkComputer graphics notes watermark
Computer graphics notes watermark
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Unit 2
Unit 2Unit 2
Unit 2
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
module 1.pdf
module 1.pdfmodule 1.pdf
module 1.pdf
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptx
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
cgrchapter2version-1-200729063505 (1).pdf
cgrchapter2version-1-200729063505 (1).pdfcgrchapter2version-1-200729063505 (1).pdf
cgrchapter2version-1-200729063505 (1).pdf
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
 
Bresenhems line Genration derivation for Mtech
Bresenhems line Genration derivation for MtechBresenhems line Genration derivation for Mtech
Bresenhems line Genration derivation for Mtech
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniya
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 
lecture 1.pptx
lecture 1.pptxlecture 1.pptx
lecture 1.pptx
 

Mehr von Ketan Jani

Mehr von Ketan Jani (14)

08viewing3d
08viewing3d08viewing3d
08viewing3d
 
07object3d 1
07object3d 107object3d 1
07object3d 1
 
03raster 1
03raster 103raster 1
03raster 1
 
Shading
ShadingShading
Shading
 
Graphics pipeline
Graphics pipelineGraphics pipeline
Graphics pipeline
 
Curves
CurvesCurves
Curves
 
09transformation3d
09transformation3d09transformation3d
09transformation3d
 
07object3d
07object3d07object3d
07object3d
 
06 clipping
06 clipping06 clipping
06 clipping
 
05viewing2d
05viewing2d05viewing2d
05viewing2d
 
04transformation2d
04transformation2d04transformation2d
04transformation2d
 
03raster
03raster03raster
03raster
 
02mathematics 1
02mathematics 102mathematics 1
02mathematics 1
 
02mathematics
02mathematics02mathematics
02mathematics
 

Graphics6 bresenham circlesandpolygons