Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Similar documents
Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Lecture 7 of 41. Viewing 4 of 4: Culling and Clipping Lab 1b: Flash Intro

Lecture 0 of 41: Part A Course Organization. Introduction to Computer Graphics: Course Organization and Survey

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Lecture 4 of 41. Lab 1a: OpenGL Basics

EF432. Introduction to spagetti and meatballs

Lecture 16 of 41. Transparency, Painter s Algorithm, & Z-Buffer Lab 3a: Shading & Transparency

Line Drawing Week 6, Lecture 9

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

From Ver(ces to Fragments: Rasteriza(on

Raster Displays and Scan Conversion. Computer Graphics, CSCD18 Fall 2008 Instructor: Leonid Sigal

Topic 0. Introduction: What Is Computer Graphics? CSC 418/2504: Computer Graphics EF432. Today s Topics. What is Computer Graphics?

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete

Rasterization: Geometric Primitives

Line Drawing. Foundations of Computer Graphics Torsten Möller

Painter s HSR Algorithm

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu

EF432. Introduction to spagetti and meatballs

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

Lecture 0 of 41: Part B Course Content. Advanced Computer Graphics: Course Organization and Survey

Lecture 24 of 41. Collision Handling Part 1 of 2: Separating Axes, Oriented Bounding Boxes

Lecture 32 of 41. Lab 6: Ray Tracing with ACM SIGGRAPH Demo & POV-Ray

CS452/552; EE465/505. Clipping & Scan Conversion

Scan Conversion. Drawing Lines Drawing Circles

Lecture 15 of 41. Scene Graphs: State Videos 1: CGA Shorts, Demos

Rasterization, or What is glbegin(gl_lines) really doing?

Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing

CPSC / Scan Conversion

CS Rasterization. Junqiao Zhao 赵君峤

CS 543: Computer Graphics. Rasterization

CS 130 Final. Fall 2015

Rendering. A simple X program to illustrate rendering

UNIT -8 IMPLEMENTATION

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Computer Graphics: Graphics Output Primitives Line Drawing Algorithms

Course Title: Computer Graphics Course no: CSC209

COMP371 COMPUTER GRAPHICS

Lecture 21 of 41. Animation Basics Lab 4: Modeling & Rigging in Maya

In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling

Lahore University of Management Sciences. CS 452 Computer Graphics

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

CSCI 420 Computer Graphics Lecture 14. Rasterization. Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California

Display Technologies: CRTs Raster Displays

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.

R asterisation. Part I: Simple Lines. Affine transformation. Transform Render. Rasterisation Line Rasterisation 2/16

? Which intermediate. Recall: Line drawing algorithm. Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics

CSE4030 Introduction to Computer Graphics

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Computer Graphics (CS 543) Lecture 1 (Part 1): Introduction to Computer Graphics

Lahore University of Management Sciences. CS 452 Computer Graphics

Graphics (Output) Primitives. Chapters 3 & 4

CS488 2D Graphics. Luc RENAMBOT

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

CHAPTER 1 Graphics Systems and Models 3

KRISTU JYOTI COLLEGE OF MANAGEMENT & TECHNOLOGY QUESTION BANK BCA SEMESTER III Computer graphics Part A (2 marks questions)

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Department of Computer Sciences Graphics Fall 2003 (Lecture 2) Pixels

3D GRAPHICS. design. animate. render

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

Topics. From vertices to fragments

Output Primitives. Dr. S.M. Malaek. Assistant: M. Younesi

CS 112 The Rendering Pipeline. Slide 1

(Refer Slide Time: 00:02:00)

CIS 581 Interactive Computer Graphics (slides based on Dr. Han-Wei Shen s slides) Requirements. Reference Books. Textbook

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

CS 4731/543: Computer Graphics Lecture 7 (Part I): Raster Graphics: Polygons & Antialiasing. Emmanuel Agu

Institutionen för systemteknik

Computer Graphics CS 543 Lecture 11 (Part 1) Polygon Filling & Antialiasing

(Refer Slide Time: 00:03:51)

Computer Graphics D Graphics Algorithms

Rasteriza2on and Clipping

CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE

Rendering. A simple X program to illustrate rendering

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

1 Introduction to Graphics

OpenGL/GLUT Intro. Week 1, Fri Jan 12

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Rasterization. CS4620/5620: Lecture 12. Announcements. Turn in HW 1. PPA 1 out. Friday lecture. History of graphics PPA 1 in 4621.

CS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE

The Traditional Graphics Pipeline

CIS 581 Interactive Computer Graphics

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Chapter 8: Implementation- Clipping and Rasterization

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Computer Graphics. Chapter 3 Computer Graphics Software

CS 591B Lecture 9: The OpenGL Rendering Pipeline

Implementation III. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

OUTPUT PRIMITIVES. CEng 477 Introduction to Computer Graphics METU, 2007

Transcription:

Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public mirror web site: http://www.kddresearch.org/courses/cis636 Instructor home page: http://www.cis.ksu.edu/~bhsu Readings: Today: Sections 2.5.1, 3.1, Eberly 2 e see http://bit.ly/ieuq45 This week: Brown CS123 slides on Scan Conversion http://bit.ly/hfbf0d Wayback Machine archive of Brown CS123 slides: http://bit.ly/gahjbh 2 Lecture Outline Reading for Last Class: Section 2.3 (esp. 2.3.7), 2.6, 2.7, Eberly 2 e Reading for Today: 2.5.1, 3.1 Eberly 2 e Reading for Next Class: 2.3.5, 2.4, 3.1.3, Eberly 2 e Last Time: View Volume Specification and Viewing Transformation CG Basics: First of Three Tutorials on OpenGL (Three Parts) 1. OpenGL & GL Utility Toolkit (GLUT) V. Shreiner 2. Basic rendering V. Shreiner 3. 3-D viewing setup E. Angel Today: Scan Conversion (aka Rasterization) Lines Incremental algorithm Bresenham s algorithm & midpoint line algorithm Circles and Ellipses Next Time: More Scan Conversion & Intro to Clipping

3 Where We Are 4 Review: CTM for Polygons-to-Pixels Pipeline

5 Review: Lab 1a & NeHe Tutorials on GameDev Review: Coordinate Spaces & Transformation Matrices

7 Scan Converting Lines 8 What Is Scan Conversion?

9 Finding Next Pixel 10 Vertical Distance

11 Strategy 1: Incremental Algorithm [1] 12 Strategy 1: Incremental Algorithm [2]

13 Strategy 1: Incremental Algorithm [3] Example Code & Problems 14 Strategy 2: Midpoint Line Algorithm [1]

15 Strategy 2: Midpoint Line Algorithm [2] 16 Strategy 2: Midpoint Line Algorithm [3]

17 Line Equations and Properties 18 Decision Variable

19 East Neighbor (E) Case 20 Northeast Neighbor (NE) Case

21 Midpoint Algorithm [1]: Forward Differences 22 Midpoint Algorithm [2]: Initialization and Normalization

23 Bresenham s Midpoint Line Algorithm: Pseudocode 24 Preview: Drawing Circles, Versions1 & 2

25 Preview: Drawing Circles, Version 3 26 Preview: Using The Symmetry

27 Summary Lab 1a: Based on First of Three Tutorials on OpenGL (Three Parts) Lecture 5: Viewing 3 of 4 Graphics Pipeline ( 2.3.2-2.3.7, pp. 48-66) See Also: CG Basics 1-2 CG Basics 1: Mathematical Foundations CG Basics 2: OpenGL Primer 1 of 3 (in greater detail) Today: Scan Conversion (aka Rasterization) Lines Incremental algorithm Symmetries (8) and reduction to two-case analysis: E vs. NE Decision variable and method of forward differences (Bresenham s) midpoint line algorithm Circles and Ellipses Next Time: More Scan Conversion & Intro to Clipping Polygons: scan line interpolation Clipping basics: 2-D problem definition and examples 28 Terminology Picture elements (pixels) Scan Conversion (aka Rasterization) Given: geometric object (e.g., line segment, projected polygon) Decide: what pixels to light (turn on; later, color/shade) Basis: what part of pixels crossed by object Issues (Reasons why Scan Conversion is Nontrivial Problem) Aliasing (e.g., jaggies) discontinuities in lines Cracks: discontinuities in polygon mesh Line Drawing Incremental algorithm uses rounding, floating point arithmetic Forward differences precalculated amounts to add to running total Midpoint line algorithm uses forward differences For lines: Bresenham s algorithm For circles and ellipses