8
Most read
13
Most read
16
Most read
Prof. Sujata L. Sonawane
AssistantProfessor
DepartmentofArtificialIntelligenceandMachineLearning
P.E.S.ModernCollegeofEngineering,Pune.
Basic Concepts in Line Drawing
• Requirements specify the desired
characteristics of line:
– Line should appear as straight lines and should
start and end accurately.
– should be displayed with constant brightness
along its length independent of its length and
orientation
– should be drawn rapidly.
DDA-line-drawing-algorithm.pptx
DDA-line-drawing-algorithm.pptx
• Complex calculations are required to provide
the equal brightness along lines of varying
length and orientation.
• To draw lines rapidly some compromises are
made such as
– Calculate only an approximate line length.
– Reduce the calculations using simple integer
arithmetic.
– Implement the result in hardware or firmware.
DDA-line-drawing-algorithm.pptx
 The line (vector) generation algorithms which determine the
pixels that should be turned ON are called as digital
differential analyzer (DDA).
 It is one of the technique for obtaining a rasterized straight
line.
 This algorithm can be used to draw the line in all the
quadrants.
DDA LINE DRAWING ALGORITHM
DDA ALGORITHM
DDA-line-drawing-algorithm.pptx
Example
Δx = |x2-x1| = |4-0| = 4 Δy = |y2-y1| = |6-0| = 6
DDA-line-drawing-algorithm.pptx
Put x and y values in table as given below
x = x + Δx y = y + Δy
= 0.5 + (4/6) = 0.5 + (1)
= 1.167 = 1.5
Similarly find the values of x and y till i<=length
Plot the points.
It shows that the rasterized line lies to both sides of actual line, .i.e.
the algorithm is orientation dependent.
Advantages and Disadvantages of DDA
 Advantages :
1. Simplest line drawing algorithm
2. No special skills required for its implementation
3. DDA draws the line faster than drawing the line by directly using the
line equation.
 Disadvantages :
1. It dependents on orientation which makes the end point accuracy
poor.
2. It requires floating point addition to determine each successive point
which is time consuming.
3. Error due to limited precision in floating point representation may
cause calculated points to shift away from their actual position when
the line is relatively long.
Solve
• Consider the line segment from A(-2,-1) to
B(6,3). Use the DDA line Drawing algorithm to
rasterize this line.
• Consider the line from (0,0) to (-6,-6). Use the
simple DDA algorithm to rasterize this line.
• Consider a line from A (5,7) to B (10, 15). Use
DDA line drawing algorithm to rasterize the
line from A to B. Draw the pixel wise
rasterization of Line.
DDA-line-drawing-algorithm.pptx

More Related Content

PPTX
Depth Buffer Method
PPTX
Dda algorithm
PPTX
BRESENHAM’S LINE DRAWING ALGORITHM
PPT
Line drawing algo.
PPTX
Input of graphical data
PPTX
Computer graphics LINE DRAWING algorithm.pptx
PPTX
Line Drawing Algorithms - Computer Graphics - Notes
PPTX
Mid point circle algorithm
Depth Buffer Method
Dda algorithm
BRESENHAM’S LINE DRAWING ALGORITHM
Line drawing algo.
Input of graphical data
Computer graphics LINE DRAWING algorithm.pptx
Line Drawing Algorithms - Computer Graphics - Notes
Mid point circle algorithm

What's hot (20)

PDF
3D Transformation
PPTX
Computer graphics basic transformation
PPTX
DDA algorithm
PPTX
2d-transformation
PPTX
3 d display methods
PPTX
Spline representations
PPT
Visible surface detection in computer graphic
PPTX
2D viewing & clipping
PPTX
Attributes of Output Primitives
PPTX
Circle generation algorithm
PPTX
2 d viewing computer graphics
PPTX
3D transformation in computer graphics
PPT
Liang barsky Line Clipping Algorithm
PPTX
Bresenham circle
PPT
2D transformation (Computer Graphics)
PPT
Polygon clipping
PPTX
Segments in Graphics
PPTX
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
PPTX
Back face detection
PPTX
Bresenham's line drawing algorithm
3D Transformation
Computer graphics basic transformation
DDA algorithm
2d-transformation
3 d display methods
Spline representations
Visible surface detection in computer graphic
2D viewing & clipping
Attributes of Output Primitives
Circle generation algorithm
2 d viewing computer graphics
3D transformation in computer graphics
Liang barsky Line Clipping Algorithm
Bresenham circle
2D transformation (Computer Graphics)
Polygon clipping
Segments in Graphics
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
Back face detection
Bresenham's line drawing algorithm
Ad

Similar to DDA-line-drawing-algorithm.pptx (20)

PPTX
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
PDF
Bresenham line-drawing-algorithm By S L Sonawane.pdf
PDF
Graphics 2 Output Primitives Slide.pdf
PPTX
Dijkstra’s Algorithm in modern navigation and autonomous vehicles
PDF
CAD/CAM/CAE - Notes
PPTX
Graphis_AI_Desiggn.pptx
PPTX
dda algorithm-cg.pptx
PPTX
Directed Graph in Graph Theory and Combinatorics.pptx
PPTX
Digital Differential Analyzer Line Drawing Algorithm
PPTX
SJT_COMPUTER GRAPHICS detailed intto.pptx
PPTX
COMPUTER GRAPHICS
PDF
Lline Drawing Algorithm
PPTX
Introduction to matlab
PPTX
CGA is a creation and manipulation of image or picture with the help of compu...
PPTX
dda-line-algorithm.pptx of computer graphics
PDF
Generating LaTeX Code for Handwritten Mathematical Equations using Convolutio...
PPTX
Group 6 Presentation - Copy.pptx
PPTX
Group 5 Presentation.pptx
PPTX
Group 5 Presentation.pptx
PDF
SEGMENTATION AND RECOGNITION OF HANDWRITTEN DIGIT NUMERAL STRING USING A MULT...
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
Bresenham line-drawing-algorithm By S L Sonawane.pdf
Graphics 2 Output Primitives Slide.pdf
Dijkstra’s Algorithm in modern navigation and autonomous vehicles
CAD/CAM/CAE - Notes
Graphis_AI_Desiggn.pptx
dda algorithm-cg.pptx
Directed Graph in Graph Theory and Combinatorics.pptx
Digital Differential Analyzer Line Drawing Algorithm
SJT_COMPUTER GRAPHICS detailed intto.pptx
COMPUTER GRAPHICS
Lline Drawing Algorithm
Introduction to matlab
CGA is a creation and manipulation of image or picture with the help of compu...
dda-line-algorithm.pptx of computer graphics
Generating LaTeX Code for Handwritten Mathematical Equations using Convolutio...
Group 6 Presentation - Copy.pptx
Group 5 Presentation.pptx
Group 5 Presentation.pptx
SEGMENTATION AND RECOGNITION OF HANDWRITTEN DIGIT NUMERAL STRING USING A MULT...
Ad

Recently uploaded (20)

PDF
Mechanics of materials week 2 rajeshwari
PPTX
Environmental studies, Moudle 3-Environmental Pollution.pptx
PDF
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
PPTX
CNS - Unit 1 (Introduction To Computer Networks) - PPT (2).pptx
PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PDF
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
PPT
Programmable Logic Controller PLC and Industrial Automation
PPTX
Micro1New.ppt.pptx the mai themes of micfrobiology
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PDF
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PPTX
AI-Reporting for Emerging Technologies(BS Computer Engineering)
PPTX
BBOC407 BIOLOGY FOR ENGINEERS (CS) - MODULE 1 PART 1.pptx
PPTX
Micro1New.ppt.pptx the main themes if micro
PPTX
Module1.pptxrjkeieuekwkwoowkemehehehrjrjrj
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
Micro 3 New.ppt.pdf tools the laboratory the method
PPTX
Agentic Artificial Intelligence (Agentic AI).pptx
PDF
Research on ultrasonic sensor for TTU.pdf
PPTX
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
Mechanics of materials week 2 rajeshwari
Environmental studies, Moudle 3-Environmental Pollution.pptx
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
CNS - Unit 1 (Introduction To Computer Networks) - PPT (2).pptx
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
Programmable Logic Controller PLC and Industrial Automation
Micro1New.ppt.pptx the mai themes of micfrobiology
MLpara ingenieira CIVIL, meca Y AMBIENTAL
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
AI-Reporting for Emerging Technologies(BS Computer Engineering)
BBOC407 BIOLOGY FOR ENGINEERS (CS) - MODULE 1 PART 1.pptx
Micro1New.ppt.pptx the main themes if micro
Module1.pptxrjkeieuekwkwoowkemehehehrjrjrj
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
Micro 3 New.ppt.pdf tools the laboratory the method
Agentic Artificial Intelligence (Agentic AI).pptx
Research on ultrasonic sensor for TTU.pdf
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev

DDA-line-drawing-algorithm.pptx

  • 1. Prof. Sujata L. Sonawane AssistantProfessor DepartmentofArtificialIntelligenceandMachineLearning P.E.S.ModernCollegeofEngineering,Pune.
  • 2. Basic Concepts in Line Drawing • Requirements specify the desired characteristics of line: – Line should appear as straight lines and should start and end accurately. – should be displayed with constant brightness along its length independent of its length and orientation – should be drawn rapidly.
  • 5. • Complex calculations are required to provide the equal brightness along lines of varying length and orientation. • To draw lines rapidly some compromises are made such as – Calculate only an approximate line length. – Reduce the calculations using simple integer arithmetic. – Implement the result in hardware or firmware.
  • 7.  The line (vector) generation algorithms which determine the pixels that should be turned ON are called as digital differential analyzer (DDA).  It is one of the technique for obtaining a rasterized straight line.  This algorithm can be used to draw the line in all the quadrants. DDA LINE DRAWING ALGORITHM
  • 10. Example Δx = |x2-x1| = |4-0| = 4 Δy = |y2-y1| = |6-0| = 6
  • 12. Put x and y values in table as given below
  • 13. x = x + Δx y = y + Δy = 0.5 + (4/6) = 0.5 + (1) = 1.167 = 1.5 Similarly find the values of x and y till i<=length
  • 15. It shows that the rasterized line lies to both sides of actual line, .i.e. the algorithm is orientation dependent.
  • 16. Advantages and Disadvantages of DDA  Advantages : 1. Simplest line drawing algorithm 2. No special skills required for its implementation 3. DDA draws the line faster than drawing the line by directly using the line equation.  Disadvantages : 1. It dependents on orientation which makes the end point accuracy poor. 2. It requires floating point addition to determine each successive point which is time consuming. 3. Error due to limited precision in floating point representation may cause calculated points to shift away from their actual position when the line is relatively long.
  • 17. Solve • Consider the line segment from A(-2,-1) to B(6,3). Use the DDA line Drawing algorithm to rasterize this line. • Consider the line from (0,0) to (-6,-6). Use the simple DDA algorithm to rasterize this line. • Consider a line from A (5,7) to B (10, 15). Use DDA line drawing algorithm to rasterize the line from A to B. Draw the pixel wise rasterization of Line.