SlideShare a Scribd company logo
1 of 9
COMPUTER GRAPHICS
BY
MS. N.RUBA
ASST. PROF/ CA
BSCW, THANJAVUR.
❑ Graphics are defined as any sketch or a drawing or a special
network that pictorially represents some meaningful information.
❑ Computer Graphics is used where a set of images needs to be manipulated
or the creation of the image in the form of pixels and is drawn on the
computer.
❑ Computer Graphics can be used in digital photography, film,
entertainment, electronic gadgets, and all other core technologies which are
required. It is a vast subject and area in the field of computer science.
❑ Computer Graphics can be used in UI design, rendering, geometric objects,
animation, and many more.
❑ In most areas, computer graphics is an abbreviation of CG.
INTRODUCTION TO COMPUTERGRAPHICS
POINTS :
❑ A Point in three-dimensional geometry is defined as a location in 3D
space that is uniquely defined by an ordered triplet (x, y, z) where x,
y, & z are the distances of the point from the X-axis, Y-axis, and
Z-axis respectively.
POINTS AND LINES
❑ A Line in three-dimensional geometry is defined as a set of points
in 3D that extends infinitely in both directions and is represented
by L : (x – x1) / l = (y – y1) / m = (z – z1) / n; here (x, y, z) are
the position coordinates of any variable point lying on the line,
(x1, y1, z1) are the position coordinates of a point P lying on the
line, and l, m, & n are the direction ratios (DRs).
❑ In 3D a line is also formed by the intersection of two non-parallel
planes.
LINES :
LINE-DRAWING ALGORITHMS
❑ “The Line drawing algorithm is a graphical algorithm which is
used to represent the line segment on discrete graphical media,
i.e., printer and pixel-based media.”
❑ A line contains two points. The point is an important element of a
line.
Algorithms of Line Drawing
There are following algorithms used for drawing a line:
□ DDA (Digital Differential Analyzer) Line Drawing
Algorithm
□ Bresenham’s Line Drawing Algorithm
□ Mid-Point Line Drawing Algorithm
DDA ALGORITHM
❑ DDA stands ly
zer
.It is an incremental method of scan conversion of
line. In this method calculation is performed at each step but by
using results of previous steps.
❑ Suppose at step i, the pixels is (xi,yi)
The line of equation for step i
yi=mxi+b......................equation 1
Next value will be
yi+1=mxi+1+b.................equation 2
m =
yi+1-yi=∆y.......................equation 3
yi+1-xi=∆x......................equation 4
yi+1=yi+∆y
∆y=m∆x
yi+1=yi+m∆x
∆x=∆y/m
xi+1=xi+∆x
xi+1=xi+∆y/m
□ This algorithm is used for scan converting a line. It was developed by
Bresenham.
□ It is an efficient method because it involves only integer addition,
subtractions, and multiplication operations.
□ These operations can be performed very rapidly so lines can be
generated quickly.
BRESENHAM’S LINE ALGORITHM
PARALLEL LINE ALGORITHMS
❑ A parallel algorithm is an algorithm that can execute several
instructions simultaneously on different processing devices
and then combine all the individual outputs to produce the
final result.
LOADING THE FRAME BUFFER
□ A frame buffer is a large, contiguous piece of computer memory. At
a minimum there is one memory bit for each pixel in the rater; this
amount of memory is called a bit plane. The picture is built up in
the frame buffer one bit at a time.
□ You know that a memory bit has only two states, therefore a single
bit plane yields a black-and white display.
□ You know that a frame buffer is a digital device and the CRT is an
analog device.
□ Therefore, a conversion from a digital representation to an analog
signal must take place is read from the frame buffer and
displayed on the raster when information CRT graphics device.
□ For this you can use a digital to analog converter (DAC).
□ Each pixel in the frame buffer must be accessed and converted
before it is visible on the raster CRT.

More Related Content

Similar to dda algorithm-cg.pptx

Introduction with graphics
Introduction with graphicsIntroduction with graphics
Introduction with graphics
msouravmishra
 
FPGA-Sketch Board
FPGA-Sketch BoardFPGA-Sketch Board
FPGA-Sketch Board
shahparin
 
Kulum alin-11 jan2014
Kulum alin-11 jan2014Kulum alin-11 jan2014
Kulum alin-11 jan2014
rolly purnomo
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
amitsarda3
 

Similar to dda algorithm-cg.pptx (20)

A concept of graphics
A concept of graphicsA concept of graphics
A concept of graphics
 
Introduction with graphics
Introduction with graphicsIntroduction with graphics
Introduction with graphics
 
A0280105
A0280105A0280105
A0280105
 
computer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcodecomputer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcode
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
Overview of CG by R.Chinthamani.pptx
Overview of CG by R.Chinthamani.pptxOverview of CG by R.Chinthamani.pptx
Overview of CG by R.Chinthamani.pptx
 
unit1_updated.pptx
unit1_updated.pptxunit1_updated.pptx
unit1_updated.pptx
 
Introduction to computer graphics - Copy.pdf
Introduction to computer graphics - Copy.pdfIntroduction to computer graphics - Copy.pdf
Introduction to computer graphics - Copy.pdf
 
FPGA-Sketch Board
FPGA-Sketch BoardFPGA-Sketch Board
FPGA-Sketch Board
 
Hardware/software co-design for a parallel three-dimensional bresenham’s algo...
Hardware/software co-design for a parallel three-dimensional bresenham’s algo...Hardware/software co-design for a parallel three-dimensional bresenham’s algo...
Hardware/software co-design for a parallel three-dimensional bresenham’s algo...
 
CG_ch1.pptx
CG_ch1.pptxCG_ch1.pptx
CG_ch1.pptx
 
Basic of computer graphic - Computer Graphic - Notes
Basic of computer graphic - Computer Graphic - NotesBasic of computer graphic - Computer Graphic - Notes
Basic of computer graphic - Computer Graphic - Notes
 
paper
paperpaper
paper
 
Automatic vehicle license plate detection using VEDA
Automatic vehicle license plate detection using VEDAAutomatic vehicle license plate detection using VEDA
Automatic vehicle license plate detection using VEDA
 
Computer graphics notes watermark
Computer graphics notes watermarkComputer graphics notes watermark
Computer graphics notes watermark
 
Computer graphics - Nitish Nagar
Computer graphics - Nitish NagarComputer graphics - Nitish Nagar
Computer graphics - Nitish Nagar
 
Kulum alin-11 jan2014
Kulum alin-11 jan2014Kulum alin-11 jan2014
Kulum alin-11 jan2014
 
Computer Graphics Notes
Computer Graphics NotesComputer Graphics Notes
Computer Graphics Notes
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Computer graphics notes
Computer graphics notesComputer graphics notes
Computer graphics notes
 

More from RubaNagarajan

More from RubaNagarajan (19)

Computer graphics-CRT.pptx
Computer graphics-CRT.pptxComputer graphics-CRT.pptx
Computer graphics-CRT.pptx
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
 
Personality development.pptx
Personality development.pptxPersonality development.pptx
Personality development.pptx
 
TRANSFORMATION-CG.pptx
TRANSFORMATION-CG.pptxTRANSFORMATION-CG.pptx
TRANSFORMATION-CG.pptx
 
line attributes.pptx
line attributes.pptxline attributes.pptx
line attributes.pptx
 
Java files and io streams
Java files and io streamsJava files and io streams
Java files and io streams
 
Java -Exception handlingunit-iv
Java -Exception handlingunit-ivJava -Exception handlingunit-iv
Java -Exception handlingunit-iv
 
Java Programming
Java Programming Java Programming
Java Programming
 
Features of java unit 1
Features of java unit 1Features of java unit 1
Features of java unit 1
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Constructors in C++
Constructors in C++Constructors in C++
Constructors in C++
 
Risks in cc
Risks in ccRisks in cc
Risks in cc
 
Dreamweaver
DreamweaverDreamweaver
Dreamweaver
 
Working principles of internet
Working principles of internetWorking principles of internet
Working principles of internet
 
Coreldraw
CoreldrawCoreldraw
Coreldraw
 
C programming
C programmingC programming
C programming
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
 
Cloud computing technology
Cloud computing technologyCloud computing technology
Cloud computing technology
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

dda algorithm-cg.pptx

  • 1. COMPUTER GRAPHICS BY MS. N.RUBA ASST. PROF/ CA BSCW, THANJAVUR.
  • 2. ❑ Graphics are defined as any sketch or a drawing or a special network that pictorially represents some meaningful information. ❑ Computer Graphics is used where a set of images needs to be manipulated or the creation of the image in the form of pixels and is drawn on the computer. ❑ Computer Graphics can be used in digital photography, film, entertainment, electronic gadgets, and all other core technologies which are required. It is a vast subject and area in the field of computer science. ❑ Computer Graphics can be used in UI design, rendering, geometric objects, animation, and many more. ❑ In most areas, computer graphics is an abbreviation of CG. INTRODUCTION TO COMPUTERGRAPHICS
  • 3. POINTS : ❑ A Point in three-dimensional geometry is defined as a location in 3D space that is uniquely defined by an ordered triplet (x, y, z) where x, y, & z are the distances of the point from the X-axis, Y-axis, and Z-axis respectively. POINTS AND LINES
  • 4. ❑ A Line in three-dimensional geometry is defined as a set of points in 3D that extends infinitely in both directions and is represented by L : (x – x1) / l = (y – y1) / m = (z – z1) / n; here (x, y, z) are the position coordinates of any variable point lying on the line, (x1, y1, z1) are the position coordinates of a point P lying on the line, and l, m, & n are the direction ratios (DRs). ❑ In 3D a line is also formed by the intersection of two non-parallel planes. LINES :
  • 5. LINE-DRAWING ALGORITHMS ❑ “The Line drawing algorithm is a graphical algorithm which is used to represent the line segment on discrete graphical media, i.e., printer and pixel-based media.” ❑ A line contains two points. The point is an important element of a line. Algorithms of Line Drawing There are following algorithms used for drawing a line: □ DDA (Digital Differential Analyzer) Line Drawing Algorithm □ Bresenham’s Line Drawing Algorithm □ Mid-Point Line Drawing Algorithm
  • 6. DDA ALGORITHM ❑ DDA stands ly zer .It is an incremental method of scan conversion of line. In this method calculation is performed at each step but by using results of previous steps. ❑ Suppose at step i, the pixels is (xi,yi) The line of equation for step i yi=mxi+b......................equation 1 Next value will be yi+1=mxi+1+b.................equation 2 m = yi+1-yi=∆y.......................equation 3 yi+1-xi=∆x......................equation 4 yi+1=yi+∆y ∆y=m∆x yi+1=yi+m∆x ∆x=∆y/m xi+1=xi+∆x xi+1=xi+∆y/m
  • 7. □ This algorithm is used for scan converting a line. It was developed by Bresenham. □ It is an efficient method because it involves only integer addition, subtractions, and multiplication operations. □ These operations can be performed very rapidly so lines can be generated quickly. BRESENHAM’S LINE ALGORITHM
  • 8. PARALLEL LINE ALGORITHMS ❑ A parallel algorithm is an algorithm that can execute several instructions simultaneously on different processing devices and then combine all the individual outputs to produce the final result.
  • 9. LOADING THE FRAME BUFFER □ A frame buffer is a large, contiguous piece of computer memory. At a minimum there is one memory bit for each pixel in the rater; this amount of memory is called a bit plane. The picture is built up in the frame buffer one bit at a time. □ You know that a memory bit has only two states, therefore a single bit plane yields a black-and white display. □ You know that a frame buffer is a digital device and the CRT is an analog device. □ Therefore, a conversion from a digital representation to an analog signal must take place is read from the frame buffer and displayed on the raster when information CRT graphics device. □ For this you can use a digital to analog converter (DAC). □ Each pixel in the frame buffer must be accessed and converted before it is visible on the raster CRT.