2D Scan-line Conversion

Slides:



Advertisements
Similar presentations
Graphics Primitives Part II: Bresenhams line and circle.
Advertisements

Graphics Primitives: line
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
4- 1 Raster Display Model Pixel (Picture Element, 像素 )
Computer Graphics 4: Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling By:Kanwarjeet Singh.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphics Drawing Elementary Figures Dr. Eng. Farag Elnagahy.
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE.
+ CPCS 391 Computer Graphics 1 Instructor: Dr. Sahar Shabanah Lecture 3.
Scan Conversion Algorithms
ECE291 Computer Engineering II Lecture 19 Josh Potts University of Illinois at Urbana- Champaign.
Scan conversion of Line , circle & ellipse
Line Drawing Algorithms. Rasterization-Process of determining which pixels give the best approximation to a desired line on the screen. Scan Conversion-Digitizing.
Larry F. Hodges (modified by Amos Johnson) 1 Design of Line, Circle & Ellipse Algorithms.
Lecture 17 Fun with Graphics Dr. Dimitrios S. Nikolopoulos CSL/UIUC.
OUTPUT PRIMITIVES Screen vs. World coordinate systems ● Objects positions are specified in a Cartesian coordinate system called World Coordinate.
Lecture 16 Fun with graphics
Raster conversion algorithms for line and circle
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 50 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 45 Computer Graphics Implementation I.
University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia.
Line Drawing by Algorithm. Line Drawing Algorithms Line drawn as pixels Graphics system –Projects the endpoints to their pixel locations in the frame.
Dr. Scott Schaefer Scan Conversion of Lines. 2/78 Displays – Cathode Ray Tube.
Dr. S.M. Malaek Assistant: M. Younesi
Graphics Primitives: line. Pixel Position
Scan Conversion Line and Circle
1Computer Graphics Implementation III Lecture 17 John Shearer Culture Lab – space 2
Introduction Computer Graphics & Its application Types of computer graphics Graphic display : random Scan & Raster Scan display Frame buffer and video.
Line Drawing and Generalization. Outline  overview  line drawing  circle drawing  curve drawing.
 A line segment in a scene is defined by the coordinate positions of the line end-points x y (2, 2) (7, 5)
Chapter 3 Scan Conversion Lecture-02. Bresenham’s Line Algorithm Bresenham’s line algorithm – is a highly efficient incremental method for scan- converting.
CS-321 Dr. Mark L. Hornick 1 Line Drawing Algorithms.
1 CSCE 441 Lecture 2: Scan Conversion of Lines Jinxiang Chai.
Rendering.
Scan Conversion.
Lecture 13: Raster Graphics and Scan Conversion
Example: (7,9) (12,0) Example 2: Point1 V:(7,9 ) C:( 0,255,0) Point2 V:(12,0) C:(0,255,0) (0,0) (18,0) (0,9) What are the problems with this method? Slope>1.
Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing
Computer Graphics Inf4/MSc Computer Graphics Lecture 4 Line & Circle Drawing.
10/10/2006TCSS458A Isabelle Bichindaritz1 Line and Circle Drawing Algorithms.
Rasterization CENG 477 Introduction to Computer Graphics Slides from Steve Marschner, CS4620, 2008 Cornell University.
Scan Conversion of Line Segments. What is Scan conversion? Final step of rasterization (the process of taking geometric shapes and converting them into.
Computer Graphics I, Fall 2010 Scan conversion algorithms.
Rasterization, or “What is glBegin(GL_LINES) really doing?” Course web page: February 23, 2012  Lecture 4.
Computer Graphics Lecture 05 Line Drawing Techniques Taqdees A. Siddiqi
Line Drawing Algorithms 1. A line in Computer graphics is a portion of straight line that extends indefinitely in opposite direction. 2. It is defined.
Primitive graphic objects
Scan Conversion or Rasterization
CSCE 441 Lecture 2: Scan Conversion of Lines
Computer graphics 2D graphics.
CENG 477 Introduction to Computer Graphics
Lecture 9 Line Drawing Algorithms (Bresenham’s Line Algorithm)
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Scan Conversion or Rasterization
Lecture 8 Shear and Line Drawing Algorithms
University of New Mexico
Implementation III.
Computer Graphics Implementation I.
Chapter Three Part I Output Primitives CS 380.
Scan Conversion of Lines
Introduction to Computer Graphics with WebGL
CSCE 441 Lecture 2: Scan Conversion of Lines
Rasterization and Antialiasing
Computer Graphics Implementation III
Rasterization and Antialiasing
Edited from The Rasterization Problem: Idealized Primitives Map to Discrete Display Space Edited from.
Chapter 3 Graphics Output Primitives
Type to enter a caption. Computer Graphics Week 1 Lecture 2.
Implementation III Ed Angel Professor Emeritus of Computer Science
Line Drawing Algorithms
OUTPUT PRIMITIVES / DISPLAY TECHNIQUES
Presentation transcript:

2D Scan-line Conversion University of Missouri at Columbia

2D Scan-line Conversion DDA algorithm Bresenham’s algorithm

DDA algorithm The simplest algorithm. Named after Digital Differential Analyzer. (x1, y1) dy (x0, y0) dx

DDA Algorithm

DDA Algorithm

DDA Algorithm

DDA Algorithm

DDA Algorithm

DDA Algorithm

2D Scan-line Conversion DDA algorithm Bresenham’s algorithm

Bresenham’s Midpoint Algorithm DDA is simple, efficient, but needs floating points. Bresenham’s use integer addition only. (x1, y1) dy (x0, y0) dx

Bresenham’s Midpoint Algorithm To choose from the two pixels NE or E depending on the relative position of the midpoint M and the line. Choose E if M is above the line, Choose NE if M is below the line. NE M E (x0, y0)

Bresenham’s Midpoint Algorithm Choose E if d is positive, Choose NE if d is negative. NE M E (x0, y0)

Bresenham’s Midpoint Algorithm Choose E if d is positive, Choose NE if d is negative. NE M E (x0, y0)

Incremental Calculation of the decision variable dnew (x0, y0)

Bresenham’s Midpoint Algorithm NE M E (x0, y0)