University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia.

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
Scan conversion of Line , circle & ellipse
Larry F. Hodges (modified by Amos Johnson) 1 Design of Line, Circle & Ellipse Algorithms.
OUTPUT PRIMITIVES Screen vs. World coordinate systems ● Objects positions are specified in a Cartesian coordinate system called World Coordinate.
Raster conversion algorithms for line and circle
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Implementation III Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
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.
Line Drawing by Algorithm. Line Drawing Algorithms Line drawn as pixels Graphics system –Projects the endpoints to their pixel locations in the frame.
Rasterization Foley, Ch: 3. Pixels are represented as disjoint circles centered on uniform grid Each (x,y) of the grid has a pixel Y X (1,1) (1,2) (0,0)
Dr. Scott Schaefer Scan Conversion of Lines. 2/78 Displays – Cathode Ray Tube.
Dr. S.M. Malaek Assistant: M. Younesi
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Graphics Primitives: line. Pixel Position
WHERE TO DRAW A LINE?? Line drawing is accomplished by calculating intermediate positions along the line path between specified end points. Precise definition.
Scan Conversion Line and Circle
Triangle Scan Conversion. 2 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Rasterization Rasterization (scan conversion) –Determine which.
1Computer Graphics Implementation III Lecture 17 John Shearer Culture Lab – space 2
Introduction to Computer Graphics with WebGL
CS 480/680 Computer Graphics Implementation III Dr. Frederick C Harris, Jr. Fall 2011.
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.
CGMB214: Introduction to Computer Graphics
 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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Image Synthesis Rabie A. Ramadan, PhD 7. 2 Image Rasterization.
CS-321 Dr. Mark L. Hornick 1 Line Drawing Algorithms.
1 CSCE 441 Lecture 2: Scan Conversion of Lines Jinxiang Chai.
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 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.
OUTPUT PRIMITIVES CEng 477 Computer Graphics METU, 2004.
Primitive graphic objects
CSCE 441 Lecture 2: Scan Conversion of Lines
Computer graphics 2D graphics.
Lecture 9 Line Drawing Algorithms (Bresenham’s Line Algorithm)
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
University of New Mexico
Implementation III.
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
2D Scan-line Conversion
Rasterization and Antialiasing
Line Drawing Algorithms
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
Implementation III Ed Angel Professor Emeritus of Computer Science
OUTPUT PRIMITIVES / DISPLAY TECHNIQUES
Presentation transcript:

University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia

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

University of Missouri at Columbia DDA algorithm The simplest algorithm. Named after Digital Differential Analyzer. The simplest algorithm. Named after Digital Differential Analyzer. (x 1, y 1 ) (x 0, y 0 ) dydy dxdx

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia DDA Algorithm

University of Missouri at Columbia 2D Scan-line Conversion DDA algorithm Bresenham’s algorithm DDA algorithm Bresenham’s algorithm

University of Missouri at Columbia Bresenham’s Midpoint Algorithm DDA is simple, efficient, but needs floating points. Bresenham’s use integer addition only. DDA is simple, efficient, but needs floating points. Bresenham’s use integer addition only. (x 1, y 1 ) (x 0, y 0 ) dydy dxdx

University of Missouri at Columbia 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. 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. M E NE (x 0, y 0 )

University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 ) Choose NE if d is positive, Choose E if d is negative. Choose NE if d is positive, Choose E if d is negative.

University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 ) Choose NE if d is positive, Choose E if d is negative. Choose NE if d is positive, Choose E if d is negative.

University of Missouri at Columbia Incremental Calculation of the decision variable d new M E NE (x 0, y 0 )

University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 )