SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualAnkit Kumar
 
2.2. interactive computer graphics
2.2. interactive computer graphics2.2. interactive computer graphics
2.2. interactive computer graphicsRatnadeepsinh Jadeja
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical dataRajapriya82
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)Timbal Mayank
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmMrinmoy Dalal
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan systemshalinikarunakaran1
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer GraphicsLaxman Puri
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
Clipping Algorithm In Computer Graphics
Clipping Algorithm In Computer GraphicsClipping Algorithm In Computer Graphics
Clipping Algorithm In Computer Graphicsstudent(MCA)
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfAmol Gaikwad
 
Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)shalinikarunakaran1
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manualVivek Kumar Sinha
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Computer graphics chapter 4
Computer graphics chapter 4Computer graphics chapter 4
Computer graphics chapter 4PrathimaBaliga
 

Mais procurados (20)

Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
2.2. interactive computer graphics
2.2. interactive computer graphics2.2. interactive computer graphics
2.2. interactive computer graphics
 
Character attributes
Character attributesCharacter attributes
Character attributes
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing Algorithm
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
Clipping Algorithm In Computer Graphics
Clipping Algorithm In Computer GraphicsClipping Algorithm In Computer Graphics
Clipping Algorithm In Computer Graphics
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Computer graphics chapter 4
Computer graphics chapter 4Computer graphics chapter 4
Computer graphics chapter 4
 
Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)
 

Destaque

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
 
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
 
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
 
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
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 

Destaque (20)

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...
 
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
 
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
 
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
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 

Semelhante a 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
 
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
 
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
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimediasaranyan75
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivessaranyan75
 

Semelhante a 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
 
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
 
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
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimedia
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitives
 

Mais de Ketan Jani

Mais de 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