Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling
|
|
- Shavonne Cooper
- 6 years ago
- Views:
Transcription
1 Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Downloaded from :
2 Contents In today s lecture we ll have a loo at: Bresenham s line drawing algorithm Line drawing algorithm comparisons Circle drawing algorithms A simple technique The mid-point circle algorithm Polygon fill algorithms Summary raster drawing algorithms
3 3 The Bresenham Line Algorithm The Bresenham algorithm is another incremental scan conversion algorithm The big advantage this algorithm is that it uses only integer calculations J a c B r e s e n h a m wored for 7 years at IBM before entering academia. Bresenham developed his famous algorithms at IBM in t h e e a r l y 1960s
4 4 The Big Idea Move across the x axis in unit intervals and at each step choose between two different y coordinates For example, from 5 position (, 3) we (x +1, y +1) have to choose 4 (x, y ) between (3, 3) and 3 (3, 4) (x +1, y ) We would lie the point that is closer to the original line
5 5 Deriving The Bresenham Line Algorithm At sample position x +1 the vertical separations from the mathematical line are labelled d upper and d lower y +1 y y d upper x +1 d lower The y coordinate on the mathematical line at x +1 is: y m( x 1) b
6 6 Deriving The Bresenham Line Algorithm (cont ) So, d upper and d lower are given as follows: and: d d y lower y upper m( x 1) ( y 1) b y We can use these to mae a simple decision about which pixel is closer to the mathematical line y y 1 m( x 1) b
7 7 Deriving The Bresenham Line Algorithm This simple decision is based on the difference between the two pixel positions: d lower d upper m( x 1) y b 1 Let s substitute m with y/ x where x and (cont ) y are the differences between the end-points: y x( dlower dupper) x( ( x 1) y b 1) x y x x y y x(b 1) y x x y c
8 8 Deriving The Bresenham Line Algorithm (cont ) So, a decision parameter p for the th step along a line is given by: p x( d d ) y x lower upper x The sign the decision parameter p is the same as that d lower d upper If p is negative, then we choose the lower pixel, otherwise we choose the upper pixel y c
9 9 Deriving The Bresenham Line Algorithm Remember coordinate changes occur along the x axis in unit steps so we can do everything with integer calculations At step +1 the decision parameter is given as: p y x x y c Subtracting p from this we get: p p y( x 1 x ) x( y 1 1 (cont ) y )
10 10 Deriving The Bresenham Line Algorithm (cont ) But, x +1 is the same as x +1 so: p p y x( y 1 1 where y +1 - y is either 0 or 1 depending on the sign p The first decision parameter p0 is evaluated at (x0, y0) is given as: y ) p 0 y x
11 11 The Bresenham Line Algorithm BRESENHAM S LINE DRAWING ALGORITHM (for m < 1.0) 1. Input the two line end-points, storing the left end-point in (x 0, y 0 ). Plot the point (x 0, y 0 ) 3. Calculate the constants Δx, Δy, Δy, and (Δy - Δx) and get the first value for the decision parameter as: p 0 y x 4. At each x along the line, starting at = 0, perform the following test. If p < 0, the next point to plot is (x +1, y ) and: p 1 p y
12 1 The Bresenham Line Algorithm (cont ) Otherwise, the next point to plot is (x +1, y +1) and: 1 p y x 5. Repeat step 4 (Δx 1) times p ACHTUNG! The algorithm and derivation above assumes slopes are less than 1. for other slopes we need to adjust the algorithm slightly
13 13 Bresenham Example Let s have a go at this Let s plot the line from (0, 10) to (30, 18) First f calculate all the constants: Δx: 10 Δy: 8 Δy: 16 Δy - Δx: -4 Calculate the initial decision parameter p 0 : p0 = Δy Δx = 6
14 14 Bresenham Example (cont ) p (x +1,y +1 )
15 15 Bresenham Exercise Go through the steps the Bresenham line drawing algorithm for a line going from (1,1) to (9,16)
16 16 Bresenham Exercise (cont ) p (x +1,y +1 )
17 17 Bresenham Line Algorithm Summary The Bresenham line algorithm has the following advantages: An fast incremental algorithm Uses only integer calculations Comparing this to the DDA algorithm, DDA has the following problems: Accumulation round-f errors can mae the pixelated line drift away from what was intended The rounding operations and floating point arithmetic involved are time consuming
18 18 A Simple Circle Drawing Algorithm The equation for a circle is: where r is the radius the circle x So, we can write a simple circle drawing algorithm by solving the equation for y at unit x intervals using: y r y r x
19 19 A Simple Circle Drawing Algorithm (cont ) y0 0 0 y y 0 0 y y
20 0 A Simple Circle Drawing Algorithm (cont ) However, unsurprisingly this is not a brilliant solution! Firstly, the resulting circle has large gaps where the slope approaches the vertical Secondly, the calculations are not very efficient The square (multiply) operations The square root operation try really hard to avoid these! We need a more efficient, more accurate solution
21 1 Eight-Way Symmetry The first thing we can notice to mae our circle drawing algorithm more efficient is that circles centred at (0, 0) have eight-way symmetry (-x, y) (x, y) (-y, x) (y, x) (-y, -x) R (y, -x) (-x, -y) (x, -y)
22 Circle Generating Algorithm Properties Circle Circle is defined as the set points that are all at a given distance r from a center point (x c,y c ) y c r ө (x,y) x c For any circle point (x,y), the distance relationship is expressed by the Pythagorean theorem in Cartesian coordinate as: ( x xc ) ( y yc) r
23 3 Circle Generating Algorithm We could use this equation to calculate the points on a circle circumference by stepping along x-axis in unit steps from x c r to x c +r and calculate the corresponding y values as y y c r ( x x) c
24 4 The problems: Involves many computation at each step Spacing between plotted pixel positions is not uniform Adjustment: interchanging x & y (step through y values and calculate x values) Involves many computation too!
25 5 Another way: Calculate points along a circular boundary using polar coordinates r and ө x = x c + r cos ө y = y c + r sin ө Using fixed angular step size, a circle is plotted with equally spaced points along the circumference Problem: trigonometric calculations are still time consuming
26 6 Consider symmetry circles Shape the circle is similar in each quadrant i.e. if we determine the curve positions in the 1 st quadrant, we can generate the circle section in the nd quadrant the xy plane (the circle sections are symmetric with respect to the y axis) The circle section in the 3 rd and 4 th quadrant can be obtained by considering symmetry about the x axis One step further symmetry between octants
27 7 Circle sections in adjacent octants within 1 quadrant are symmetric with respect to the 45 line dividing the octants (-y,x) (y,x) (-x,y) 45 0 (x,y) (-x,-y) (-y,-x) (y,-x) (x,-y) Calculation a circle point (x, y) in 1 octant yields the circle points for the other 7 octants
28 8 Midpoint Circle Algorithm As in raster algorithm, we sample at unit intervals & determine the closest pixel position to the specified circle path at each step For a given radius, r and screen center position (x c,y c ), we can set up our algorithm to calculate pixel positions around a circle path centered at the coordinate origin (0,0) Each calculated position (x, y) is moved to its proper screen position by adding x c to x and y c to y
29 9 Midpoint Circle Algorithm Along a circle section from x=0 to x=y in the 1 st quadrant, the slope (m) the curve varies from 0 to i.e. we can tae unit steps in the +ve x direction over the octant & use decision parameter to determine which possible positions is vertically closer to the circle path Positions in the other 7 octants are obtained by symmetry
30 30 Mid-Point Circle Algorithm Similarly to the case with lines, there is an incremental algorithm for drawing circles the mid-point circle algorithm In the mid-point circle algorithm we use eight-way symmetry so only ever calculate the points for the top right eighth a circle, and then use symmetry to get the rest the points The mid-point circle a l g o r i t h m w a s developed by Jac Bresenham, who we heard about earlier. Bresenham s patent for the algorithm can be v i e w e d h e r e.
31 31 Mid-Point Circle Algorithm (cont ) Assume that we have just plotted point (x, y ) The next point is a choice between (x +1, y ) and (x +1, y -1) We would lie to choose the point that is nearest to the actual circle (x, y ) So how do we mae this choice? (x +1, y ) (x +1, y -1)
32 3 Mid-Point Circle Algorithm (cont ) Let s re-jig the equation the circle slightly to give us: ( x, y) x y r f circ The equation evaluates as follows: f circ 0, if ( x, y) 0, if 0, if ( x, y) is inside thecircle ( x, y) is on thecircle ( x, y) is outside thecircle boundary boundary boundary By evaluating this function at the midpoint between the candidate pixels we can mae our decision
33 33 Mid-Point Circle Algorithm (cont ) Assuming we have just plotted the pixel at (x,y ) so we need to choose between (x +1,y ) and (x +1,y -1) Our decision variable can be defined as: p f ( x circ ( x 1) 1, y If p < 0 the midpoint is inside the circle and and the pixel at y is closer to the circle Otherwise the midpoint is outside and y -1 is closer ( y 1 ) 1 ) r
34 34 Mid-Point Circle Algorithm (cont ) To ensure things are as efficient as possible we can do all our calculations incrementally First consider: or: p p 1 f circ [( x x 1 1, y 1) 1] where y +1 is either y or y -1 depending on the sign p 1 1 y r p ( x 1) ( y 1 y ) ( y 1 y ) 1
35 35 Mid-Point Circle Algorithm (cont ) The first decision variable is given as: (x o, y o =(0,r)) Then if p < 0 then the next decision variable is given as: If p > 0 then the decision variable is: r r r r f p circ 4 5 ) 1 ( 1 ) 1 (1, x p p y x p p
36 36 The Mid-Point Circle Algorithm MID-POINT CIRCLE ALGORITHM Input radius r and circle centre (x c, y c ), then set the coordinates for the first point on the circumference a circle centred on the origin as: ( 0 x0, y ) (0, r) Calculate the initial value the decision parameter as: p 5 0 r 4 Starting with = 0 at each position x, perform the following test. If p < 0, the next point along the circle centred on (0, 0) is (x +1, y ) and: p 1 p x 1 1
37 37 The Mid-Point Circle Algorithm (cont ) Otherwise the next point along the circle is (x +1, y -1) and: p 1 p x 1 1 y 1 4. Determine symmetry points in the other seven octants 5. Move each calculated pixel position (x, y) onto the circular path centred at (x c, y c ) to plot the coordinate values: x x x c y y yc 6. Repeat steps 3 to 5 until x >= y
38 38 Mid-Point Circle Algorithm Example To see the mid-point circle algorithm in action lets use it to draw a circle centred at (0,0) with radius 10
39 Mid-Point Circle Algorithm Example (cont ) p (x +1,y +1 ) x +1 y (1,10) (,10) (3,10) (4,9) (5,9) (6,8) (7,7)
40 40 Mid-Point Circle Algorithm Exercise Use the mid-point circle algorithm to draw the circle centred at (0,0) with radius 15
41 41 Mid-Point Circle Algorithm Example (cont ) p (x +1,y +1 ) x +1 y
42 4 Mid-Point Circle Algorithm Summary The ey insights in the mid-point circle algorithm are: Eight-way symmetry can hugely reduce the wor in drawing a circle Moving in unit steps along the x axis at each point along the circle s edge we need to choose between two possible y coordinates
43 43 Filling Polygons So we can figure out how to draw lines and circles How do we go about drawing polygons? We use an incremental algorithm nown as the scan-line algorithm
44 44 Scan-Line Polygon Fill Algorithm 10 Scan Line
45 45 Scan-Line Polygon Fill Algorithm The basic scan-line algorithm is as follows: Find the intersections the scan line with all edges the polygon Sort the intersections by increasing x coordinate Fill in all pixels between pairs intersections that lie interior to the polygon
46 46 Scan-Line Polygon Fill Algorithm (cont )
47 47 Line Drawing Summary Over the last couple lectures we have looed at the idea scan converting lines The ey thing to remember is this has to be FAST For lines we have either DDA or Bresenham For circles the mid-point algorithm
48 48 Anti-Aliasing
49 49 Summary Of Drawing Algorithms
50 50 Mid-Point Circle Algorithm (cont )
51 51 Mid-Point Circle Algorithm (cont ) M
52 5 Mid-Point Circle Algorithm (cont ) M
53 53 Blan Grid
54 54 Blan Grid
55 55 Blan Grid
56 56 Blan Grid
In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm
Drawing Circles In today s lecture we ll have a look at: Circle drawing algorithms A simple technique The mid-point circle algorithm Polygon fill algorithms Summary raster drawing algorithms A Simple Circle
More informationScan Conversion. CMP 477 Computer Graphics S. A. Arekete
Scan Conversion CMP 477 Computer Graphics S. A. Areete What is Scan-Conversion? 2D or 3D objects in real world space are made up of graphic primitives such as points, lines, circles and filled polygons.
More informationMODULE - 4. e-pg Pathshala
e-pg Pathshala MODULE - 4 Subject : Computer Science Paper: Computer Graphics and Visualization Module: Midpoint Circle Drawing Procedure Module No: CS/CGV/4 Quadrant 1 e-text Before going into the Midpoint
More informationCSC Computer Graphics
7//7 CSC. Computer Graphics Lecture Kasun@dscs.sjp.ac.l Department of Computer Science Universit of Sri Jaewardanepura Line drawing algorithms DDA Midpoint (Bresenham s) Algorithm Circle drawing algorithms
More informationOpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.
D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,
More informationGRAPHICS OUTPUT PRIMITIVES
CHAPTER 3 GRAPHICS OUTPUT PRIMITIVES LINE DRAWING ALGORITHMS DDA Line Algorithm Bresenham Line Algorithm Midpoint Circle Algorithm Midpoint Ellipse Algorithm CG - Chapter-3 LINE DRAWING Line drawing is
More informationOverview of Computer Graphics
Application of Computer Graphics UNIT- 1 Overview of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe outline form. Multi-window
More informationOutput Primitives Lecture: 4. Lecture 4
Lecture 4 Circle Generating Algorithms Since the circle is a frequently used component in pictures and graphs, a procedure for generating either full circles or circular arcs is included in most graphics
More informationUNIT 2 GRAPHIC PRIMITIVES
UNIT 2 GRAPHIC PRIMITIVES Structure Page Nos. 2.1 Introduction 46 2.2 Objectives 46 2.3 Points and Lines 46 2.4 Line Generation Algorithms 48 2.4.1 DDA Algorithm 49 2.4.2 Bresenhams Line Generation Algorithm
More informationComputer Graphics Lecture Notes
Computer Graphics Lecture Notes UNIT- Overview of Computer Graphics. Application of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe
More informationCPSC / Scan Conversion
CPSC 599.64 / 601.64 Computer Screens: Raster Displays pixel rasters (usually) square pixels in rectangular raster evenly cover the image problem no such things such as lines, circles, etc. scan conversion
More informationComputer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again
More informationRenderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Renderer Implementation: Basics and Clipping David Carr Virtual Environments, Fundamentals Spring 2005 Feb-28-05 SMM009, Basics and Clipping 1
More informationChapter - 2: Geometry and Line Generations
Chapter - 2: Geometry and Line Generations In Computer graphics, various application ranges in different areas like entertainment to scientific image processing. In defining this all application mathematics
More informationFrom Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.
From Vertices to Fragments: Rasterization Reading Assignment: Chapter 7 Frame Buffer Special memory where pixel colors are stored. System Bus CPU Main Memory Graphics Card -- Graphics Processing Unit (GPU)
More informationDigital Differential Analyzer Bresenhams Line Drawing Algorithm
Bresenham s Line Generation The Bresenham algorithm is another incremental scan conversion algorithm. The big advantage of this algorithm is that, it uses only integer calculations. Difference Between
More informationRasterization: Geometric Primitives
Rasterization: Geometric Primitives Outline Rasterizing lines Rasterizing polygons 1 Rasterization: What is it? How to go from real numbers of geometric primitives vertices to integer coordinates of pixels
More informationEach point P in the xy-plane corresponds to an ordered pair (x, y) of real numbers called the coordinates of P.
Lecture 7, Part I: Section 1.1 Rectangular Coordinates Rectangular or Cartesian coordinate system Pythagorean theorem Distance formula Midpoint formula Lecture 7, Part II: Section 1.2 Graph of Equations
More informationComputer Graphics: Graphics Output Primitives Line Drawing Algorithms
Computer Graphics: Graphics Output Primitives Line Drawing Algorithms By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic concept of lines in OpenGL 2. Line Equation 3. DDA Algorithm 4. DDA
More informationComputer Graphics: Line Drawing Algorithms
Computer Graphics: Line Drawing Algorithms 1 Graphics hardware The problem scan conversion Considerations Line equations Scan converting algorithms A very simple solution The DDA algorithm, Bresenham algorithm
More informationCSCI 4620/8626. Coordinate Reference Frames
CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.
More informationCS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE
CS 45: COMPUTER GRAPHICS RASTERIZING LINES SPRING 6 DR. MICHAEL J. REALE OBJECT-ORDER RENDERING We going to start on how we will perform object-order rendering Object-order rendering Go through each OBJECT
More informationOutput Primitives. Dr. S.M. Malaek. Assistant: M. Younesi
Output Primitives Dr. S.M. Malaek Assistant: M. Younesi Output Primitives Output Primitives: Basic geometric structures (points, straight line segment, circles and other conic sections, quadric surfaces,
More informationUNIT -8 IMPLEMENTATION
UNIT -8 IMPLEMENTATION 1. Discuss the Bresenham s rasterization algorithm. How is it advantageous when compared to other existing methods? Describe. (Jun2012) 10M Ans: Consider drawing a line on a raster
More information(Refer Slide Time: 00:03:51)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 17 Scan Converting Lines, Circles and Ellipses Hello and welcome everybody
More informationCS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE DRAWING PRIMITIVES: LEGACY VS. NEW Legacy: specify primitive in glbegin() glbegin(gl_points); glvertex3f(1,5,0);
More informationFrom Ver(ces to Fragments: Rasteriza(on
From Ver(ces to Fragments: Rasteriza(on From Ver(ces to Fragments 3D vertices vertex shader rasterizer fragment shader final pixels 2D screen fragments l determine fragments to be covered l interpolate
More informationAbout the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics
r About the Tutorial To display a picture of any size on a computer screen is a difficult process. Computer graphics are used to simplify this process. Various algorithms and techniques are used to generate
More informationCOMP30019 Graphics and Interaction Scan Converting Polygons and Lines
COMP30019 Graphics and Interaction Scan Converting Polygons and Lines Department of Computer Science and Software Engineering The Lecture outline Introduction Scan conversion Scan-line algorithm Edge coherence
More informationChapter 8: Implementation- Clipping and Rasterization
Chapter 8: Implementation- Clipping and Rasterization Clipping Fundamentals Cohen-Sutherland Parametric Polygons Circles and Curves Text Basic Concepts: The purpose of clipping is to remove objects or
More information1.8 Coordinate Geometry. Copyright Cengage Learning. All rights reserved.
1.8 Coordinate Geometry Copyright Cengage Learning. All rights reserved. Objectives The Coordinate Plane The Distance and Midpoint Formulas Graphs of Equations in Two Variables Intercepts Circles Symmetry
More informationOutput Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by:
Lecture 3 Output Primitives Assuming we have a raster display, a picture is completely specified by: - A set of intensities for the pixel positions in the display. - A set of complex objects, such as trees
More informationGraphics (Output) Primitives. Chapters 3 & 4
Graphics (Output) Primitives Chapters 3 & 4 Graphic Output and Input Pipeline Scan conversion converts primitives such as lines, circles, etc. into pixel values geometric description a finite scene area
More informationChapter 3: Graphics Output Primitives. OpenGL Line Functions. OpenGL Point Functions. Line Drawing Algorithms
Chater : Grahics Outut Primitives Primitives: functions in grahics acage that we use to describe icture element Points and straight lines are the simlest rimitives Some acages include circles, conic sections,
More informationEfficient Plotting Algorithm
Efficient Plotting Algorithm Sushant Ipte 1, Riddhi Agarwal 1, Murtuza Barodawala 1, Ravindra Gupta 1, Prof. Shiburaj Pappu 1 Computer Department, Rizvi College of Engineering, Mumbai, Maharashtra, India
More informationRasterization, or What is glbegin(gl_lines) really doing?
Rasterization, or What is glbegin(gl_lines) really doing? Course web page: http://goo.gl/eb3aa February 23, 2012 Lecture 4 Outline Rasterizing lines DDA/parametric algorithm Midpoint/Bresenham s algorithm
More informationR asterisation. Part I: Simple Lines. Affine transformation. Transform Render. Rasterisation Line Rasterisation 2/16
ECM2410:GraphicsandAnimation R asterisation Part I: Simple Lines Rasterisation 1/16 Rendering a scene User space Device space Affine transformation Compose Transform Render Com pose from primitives (lines,
More informationScan Conversion. Drawing Lines Drawing Circles
Scan Conversion Drawing Lines Drawing Circles 1 How to Draw This? 2 Start From Simple How to draw a line: y(x) = mx + b? 3 Scan Conversion, a.k.a. Rasterization Ideal Picture Raster Representation Scan
More informationRaster Displays and Scan Conversion. Computer Graphics, CSCD18 Fall 2008 Instructor: Leonid Sigal
Raster Displays and Scan Conversion Computer Graphics, CSCD18 Fall 28 Instructor: Leonid Sigal Rater Displays Screen is represented by 2D array of locations called piels y Rater Displays Screen is represented
More informationTópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.
Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática Chap. 2 Rasterization Rasterization Outline : Raster display technology. Basic concepts: pixel, resolution,
More informationChapter 3. Sukhwinder Singh
Chapter 3 Sukhwinder Singh PIXEL ADDRESSING AND OBJECT GEOMETRY Object descriptions are given in a world reference frame, chosen to suit a particular application, and input world coordinates are ultimately
More informationCS6504 & Computer Graphics Unit I Page 1
Introduction Computer contains two components. Computer hardware Computer hardware contains the graphics workstations, graphic input devices and graphic output devices. Computer Software Computer software
More informationLine Drawing Week 6, Lecture 9
CS 536 Computer Graphics Line Drawing Week 6, Lecture 9 David Breen, William Regli and axim Peysakhov Department of Computer Science Drexel University Outline Line drawing Digital differential analyzer
More informationCS 548: COMPUTER GRAPHICS DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE
CS 548: COMPUTER GRAPHICS DRAWING LINES AND CIRCLES SPRING 05 DR. MICHAEL J. REALE OPENGL POINTS AND LINES OPENGL POINTS AND LINES In OenGL, there are different constants used to indicate what ind of rimitive
More informationTopic #1: Rasterization (Scan Conversion)
Topic #1: Rasterization (Scan Conversion) We will generally model objects with geometric primitives points, lines, and polygons For display, we need to convert them to pixels for points it s obvious but
More informationCS Rasterization. Junqiao Zhao 赵君峤
CS10101001 Rasterization Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Vector Graphics Algebraic equations describe
More informationCS 130. Scan Conversion. Raster Graphics
CS 130 Scan Conversion Raster Graphics 2 1 Image Formation Computer graphics forms images, generally two dimensional, using processes analogous to physical imaging systems like: - Cameras - Human visual
More informationSAT Timed Section*: Math
SAT Timed Section*: Math *These practice questions are designed to be taken within the specified time period without interruption in order to simulate an actual SAT section as much as possible. Time --
More informationRendering. A simple X program to illustrate rendering
Rendering A simple X program to illustrate rendering The programs in this directory provide a simple x based application for us to develop some graphics routines. Please notice the following: All points
More informationRasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?
Where does a picture come from? Rasterization and Graphics Hardware CS559 Course Notes Not for Projection November 2007, Mike Gleicher Result: image (raster) Input 2D/3D model of the world Rendering term
More informationOUTPUT PRIMITIVES. CEng 477 Introduction to Computer Graphics METU, 2007
OUTPUT PRIMITIVES CEng 477 Introduction to Computer Graphics METU, 007 Recap: The basic forward projection pipeline: MCS Model Model Modeling Transformations M M 3D World Scene Viewing Transformations
More information(Refer Slide Time: 9:36)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 13 Scan Converting Lines, Circles and Ellipses Hello and welcome to the lecture
More informationUnit 2 Output Primitives and their Attributes
Unit 2 Output Primitives and their Attributes Shapes and colors of the objects can be described internally with pixel arrays or with sets of basic geometric structures, such as straight line segments and
More informationMath 8 Honors Coordinate Geometry part 3 Unit Updated July 29, 2016
Review how to find the distance between two points To find the distance between two points, use the Pythagorean theorem. The difference between is one leg and the difference between and is the other leg.
More informationAnnouncements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics
Announcements Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class 1 Scan Conversion Overview of Rendering Scan Conversion Drawing Lines Drawing Polygons
More informationThe x coordinate tells you how far left or right from center the point is. The y coordinate tells you how far up or down from center the point is.
We will review the Cartesian plane and some familiar formulas. College algebra Graphs 1: The Rectangular Coordinate System, Graphs of Equations, Distance and Midpoint Formulas, Equations of Circles Section
More informationThree-Dimensional Coordinate Systems
Jim Lambers MAT 169 Fall Semester 2009-10 Lecture 17 Notes These notes correspond to Section 10.1 in the text. Three-Dimensional Coordinate Systems Over the course of the next several lectures, we will
More informationPolar Coordinates. OpenStax. 1 Dening Polar Coordinates
OpenStax-CNX module: m53852 1 Polar Coordinates OpenStax This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 Abstract Locate points
More informationLine Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller
Line Drawing Introduction to Computer Graphics Torsten Möller / Mike Phillips Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Color Interaction Texture/ Realism
More information1 Introduction to Graphics
1 1.1 Raster Displays The screen is represented by a 2D array of locations called pixels. Zooming in on an image made up of pixels The convention in these notes will follow that of OpenGL, placing the
More informationComputer Graphics. Lecture 3 Graphics Output Primitives. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Lecture 3 Graphics Output Primitives Somsa Walairacht, Computer Engineering, KMITL Outline Line Drawing Algorithms Circle-, Ellipse-Generating Algorithms Fill-Area Primitives Polgon Fill
More information(Refer Slide Time: 00:02:00)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts
More informationLine Drawing. Foundations of Computer Graphics Torsten Möller
Line Drawing Foundations of Computer Graphics Torsten Möller Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism Reading Angel
More informationThe Rectangular Coordinate System and Equations of Lines. College Algebra
The Rectangular Coordinate System and Equations of Lines College Algebra Cartesian Coordinate System A grid system based on a two-dimensional plane with perpendicular axes: horizontal axis is the x-axis
More informationMath 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations
Math 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations 1 Definition of polar coordinates Let us first recall the definition of Cartesian coordinates: to each point in the plane we can
More informationIntroduction to Computer Graphics (CS602) Lecture 05 Line Drawing Techniques
Introduction to Computer Graphics (CS602) Lecture 05 Line Drawing Techniques 5.1 Line A line, or straight line, is, roughly speaking, an (infinitely) thin, (infinitely) long, straight geometrical object,
More informationRectangular Coordinates in Space
Rectangular Coordinates in Space Philippe B. Laval KSU Today Philippe B. Laval (KSU) Rectangular Coordinates in Space Today 1 / 11 Introduction We quickly review one and two-dimensional spaces and then
More informationLecture 5. If, as shown in figure, we form a right triangle With P1 and P2 as vertices, then length of the horizontal
Distance; Circles; Equations of the form Lecture 5 y = ax + bx + c In this lecture we shall derive a formula for the distance between two points in a coordinate plane, and we shall use that formula to
More informationGrade 9 Math Terminology
Unit 1 Basic Skills Review BEDMAS a way of remembering order of operations: Brackets, Exponents, Division, Multiplication, Addition, Subtraction Collect like terms gather all like terms and simplify as
More informationScan Conversion. Lines and Circles
Scan Conversion Lines and Circles (Chapter 3 in Foley & Van Dam) 2D Line Implicit representation: αx + βy + γ = 0 Explicit representation: y y = mx+ B m= x Parametric representation: x P= y P = t y P +
More informationComputer Graphics. - Rasterization - Philipp Slusallek
Computer Graphics - Rasterization - Philipp Slusallek Rasterization Definition Given some geometry (point, 2D line, circle, triangle, polygon, ), specify which pixels of a raster display each primitive
More informationLab Manual. Computer Graphics. T.E. Computer. (Sem VI)
Lab Manual Computer Graphics T.E. Computer (Sem VI) Index Sr. No. Title of Programming Assignments Page No. 1. Line Drawing Algorithms 3 2. Circle Drawing Algorithms 6 3. Ellipse Drawing Algorithms 8 4.
More informationEinführung in Visual Computing
Einführung in Visual Computing 186.822 Rasterization Werner Purgathofer Rasterization in the Rendering Pipeline scene objects in object space transformed vertices in clip space scene in normalized device
More informationSection 10.1 Polar Coordinates
Section 10.1 Polar Coordinates Up until now, we have always graphed using the rectangular coordinate system (also called the Cartesian coordinate system). In this section we will learn about another system,
More information+ b. From this we can derive the following equations:
A. GEOMETRY REVIEW Pythagorean Theorem (A. p. 58) Hypotenuse c Leg a 9º Leg b The Pythagorean Theorem is a statement about right triangles. A right triangle is one that contains a right angle, that is,
More informationLossy Coding 2 JPEG. Perceptual Image Coding. Discrete Cosine Transform JPEG. CS559 Lecture 9 JPEG, Raster Algorithms
CS559 Lecture 9 JPEG, Raster Algorithms These are course notes (not used as slides) Written by Mike Gleicher, Sept. 2005 With some slides adapted from the notes of Stephen Chenney Lossy Coding 2 Suppose
More informationDIOCESE OF HARRISBURG MATHEMATICS CURRICULUM GRADE 8
MATHEMATICS CURRICULUM GRADE 8 8A Numbers and Operations 1. Demonstrate an numbers, ways of representing numbers, relationships among numbers and number systems. 2. Compute accurately and fluently. a.
More information0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves
CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~elf Instructor: Eugene Fiume Office: BA 5266 Phone: 416 978 5472 (not a reliable way) Email:
More informationI Internal Examination (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering
I Internal Examination 2017-18 (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering Subject: 6CS4 Computer Graphics & Multimedia Technology Time: 1:30 Hr M.M:40 Question No. Question
More informationDepartment of Computer Science Engineering, Mits - Jadan, Pali, Rajasthan, India
International Journal of Scientific Research in Computer Science, Engineering and Information Technology 2018 IJSRCSEIT Volume 3 Issue 1 ISSN : 2456-3307 Performance Analysis of OpenGL Java Bindings with
More informationy= sin( x) y= cos( x)
. The graphs of sin(x) and cos(x). Now I am going to define the two basic trig functions: sin(x) and cos(x). Study the diagram at the right. The circle has radius. The arm OP starts at the positive horizontal
More informationComputer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk
Computer Graphics Lecture 2 Doç. Dr. Mehmet Gokturk Mathematical Foundations l Hearn and Baker (A1 A4) appendix gives good review l Some of the mathematical tools l Trigonometry l Vector spaces l Points,
More information4.5 VISIBLE SURFACE DETECTION METHODES
4.5 VISIBLE SURFACE DETECTION METHODES A major consideration in the generation of realistic graphics displays is identifying those parts of a scene that are visible from a chosen viewing position. There
More information7 Fractions. Number Sense and Numeration Measurement Geometry and Spatial Sense Patterning and Algebra Data Management and Probability
7 Fractions GRADE 7 FRACTIONS continue to develop proficiency by using fractions in mental strategies and in selecting and justifying use; develop proficiency in adding and subtracting simple fractions;
More informationPipeline implementation II
Pipeline implementation II Overview Line Drawing Algorithms DDA Bresenham Filling polygons Antialiasing Rasterization Rasterization (scan conversion) Determine which pixels that are inside primitive specified
More informationDepartment of Computer Sciences Graphics Fall 2003 (Lecture 2) Pixels
Pixels Pixel: Intensity or color sample. Raster Image: Rectangular grid of pixels. Rasterization: Conversion of a primitive s geometric representation into A set of pixels. An intensity or color for each
More informationComputer Graphics 7 - Rasterisation
Computer Graphics 7 - Rasterisation Tom Thorne Slides courtesy of Taku Komura www.inf.ed.ac.uk/teaching/courses/cg Overview Line rasterisation Polygon rasterisation Mean value coordinates Decomposing polygons
More informationSmarter Balanced Vocabulary (from the SBAC test/item specifications)
Example: Smarter Balanced Vocabulary (from the SBAC test/item specifications) Notes: Most terms area used in multiple grade levels. You should look at your grade level and all of the previous grade levels.
More informationLevel 4 means that I can
Level 4 means that I can Describe number patterns Find multiples Find factors Work out the square numbers Use word formulae Use co-ordinates in the first quadrant Multiply and divide whole numbers by 10
More informationThis blog addresses the question: how do we determine the intersection of two circles in the Cartesian plane?
Intersecting Circles This blog addresses the question: how do we determine the intersection of two circles in the Cartesian plane? This is a problem that a programmer might have to solve, for example,
More informationWHAT YOU SHOULD LEARN
GRAPHS OF EQUATIONS WHAT YOU SHOULD LEARN Sketch graphs of equations. Find x- and y-intercepts of graphs of equations. Use symmetry to sketch graphs of equations. Find equations of and sketch graphs of
More informationSection 4.1: Introduction to Trigonometry
Section 4.1: Introduction to Trigonometry Review of Triangles Recall that the sum of all angles in any triangle is 180. Let s look at what this means for a right triangle: A right angle is an angle which
More informationA New Line Drawing Algorithm Based on Sample Rate Conversion
A New Line Drawing Algorithm Based on Sample Rate Conversion c 2002, C. Bond. All rights reserved. February 5, 2002 1 Overview In this paper, a new method for drawing straight lines suitable for use on
More informationSNAP Centre Workshop. Graphing Lines
SNAP Centre Workshop Graphing Lines 45 Graphing a Line Using Test Values A simple way to linear equation involves finding test values, plotting the points on a coordinate plane, and connecting the points.
More informationComputer Graphics: 6-Rasterization
Computer Graphics: 6-Rasterization Prof. Dr. Charles A. Wüthrich, Fakultät Medien, Medieninformatik Bauhaus-Universität Weimar caw AT medien.uni-weimar.de Raster devices In modern devices the smallest
More informationTopics in Analytic Geometry Part II
Name Chapter 9 Topics in Analytic Geometry Part II Section 9.4 Parametric Equations Objective: In this lesson you learned how to evaluate sets of parametric equations for given values of the parameter
More informationMaths. Formative Assessment/key piece of work prior to end of unit: Term Autumn 1
Term Autumn 1 3 weeks Negative numbers Multiples and factors Common factors Prime numbers Ordering decimal numbers Rounding Square numbers and square roots Prime factor decomposition LCM and HCF Square
More informationround decimals to the nearest decimal place and order negative numbers in context
6 Numbers and the number system understand and use proportionality use the equivalence of fractions, decimals and percentages to compare proportions use understanding of place value to multiply and divide
More informationBirkdale High School - Higher Scheme of Work
Birkdale High School - Higher Scheme of Work Module 1 - Integers and Decimals Understand and order integers (assumed) Use brackets and hierarchy of operations (BODMAS) Add, subtract, multiply and divide
More informationShading Techniques Denbigh Starkey
Shading Techniques Denbigh Starkey 1. Summary of shading techniques 2 2. Lambert (flat) shading 3 3. Smooth shading and vertex normals 4 4. Gouraud shading 6 5. Phong shading 8 6. Why do Gouraud and Phong
More information