Einführung in Visual Computing

Size: px
Start display at page:

Transcription

1 Einführung in Visual Computing Rasterization Werner Purgathofer

2 Rasterization in the Rendering Pipeline scene objects in object space transformed vertices in clip space scene in normalized device coordinates Werner raster Purgathofer image in pixel coordinates2 object capture/creation modeling viewing projection vertex stage ( vertex shader ) clipping + homogenization viewport transformation rasterization shading pixel stage ( fragment shader )

3 Important Graphics Output Primitives in 2D points, lines polygons, circles, ellipses & other curves (also filled) pixel array operations characters in 3D triangles & other polygons free form surfaces + commands for properties: color, texture, Werner Purgathofer / Einf. in Visual Computing 3

4 Points and Lines point plotting instruction in display list (random scan) entry in frame buffer (raster scan) line drawing instruction in display list (random scan) intermediate discrete pixel positions calculated (raster scan) jaggies, aliasing Werner Purgathofer / Einf. in Visual Computing 4

5 Lines: Staircase Effect stairstep effect (jaggies) produced when a line is generated as a series of pixel positions Werner Purgathofer / Einf. in Visual Computing 5

6 Line-Drawing Algorithms line equation: y = m. x + b line path between two points: y 1 m = y 1 y 0 x 1 x 0 y 0 }b x 1 x 0 y 1 y 0 b = y 0 m. x 0 x 0 x 1 Werner Purgathofer / Einf. in Visual Computing 6

7 DDA Line-Drawing Algorithm line equation: y = m. x + b δy = m. δx for m <1 y 1 y 0 δx m. δx x 0 x 1 Werner Purgathofer / Einf. in Visual Computing 7

8 DDA Line-Drawing Algorithm line equation: y = m. x + b δy = m. δx for m <1 δy ( δx = m for m >1 ) y 1 y 0 sampling points with distance 1 m DDA (digital differential analyzer) x 0 1 x 1 for δx=1, m <1 : y k+1 = y k + m Werner Purgathofer / Einf. in Visual Computing 8

9 DDA Algorithm Principle dx = x1 x0; dy = y1 y0; m = dy / dx; x = x0; y = y0; drawpixel (round(x), round(y)); m = y 1 y 0 x 1 x 0 for (k = 0; k < dx; k++) y k+1 = y + k m { x += 1; y += m; drawpixel (round(x), round(y)} for δx=1, m <1 extension to other cases simple Werner Purgathofer / Einf. in Visual Computing 9

10 Bresenham s Line Algorithm faster than simple DDA incremental integer calculations adaptable to circles, other curves y = m. (x k + 1) + b decision for every column which of the two candidate pixels is selected Werner Purgathofer / Einf. in Visual Computing 10

11 Bresenham s Line Algorithm y k+2 y k+1 y = mx + b section of the screen grid showing a pixel in column x k on scan line y k that is to be plotted along the path of a line segment with slope 0 < m < 1 y k x k x k+1 x k+2 x k+3 Werner Purgathofer / Einf. in Visual Computing 11

12 Bresenham s Line Algorithm (1/4) y k+1 y d upper d lower y k x k x k+1

13 Bresenham s Line Algorithm (1/4) y = m. x k+1 + b = m. (x k + 1) + b y k+1 y y k d upper d lower d lower = y y k = = m. (x k + 1) + b y k d upper = (y k + 1) y = = y k + 1 m. (x k + 1) b d lower d upper = = 2m. (x k + 1) 2y k + 2b 1 x k+1 13

14 Bresenham s Line Algorithm (2/4) y k+1 y d upper d lower d upper = = 2m. (x k + 1) 2y k + 2b 1 m = y/ x ( x = x 1 x 0, y = y 1 y 0 ) d lower decision parameter: y k p k = x. (d lower d upper ) = 2 y. x k 2 x. y k + c same sign as (d lower d upper ) x k+1 14

15 Bresenham s Line Algorithm (3/4) current decision value: p k = x. (d lower d upper ) = 2 y. x k 2 x. y k + c next decision value: p k+1 = 2 y. x 2 x. k+1 y + k+1 c p k 2 y. x k + 2 x. y k c = = p k + 2 y 2 x. (y k+1 y k ) starting decision value: p 0 = 2 y x Werner Purgathofer / Einf. in Visual Computing 15

16 Bresenham s Line Algorithm (4/4) 1. store left line endpoint in (x 0,y 0 ) 2. draw pixel (x 0,y 0 ) 3. calculate constants x, y, 2 y, 2 y 2 x, and obtain p 0 = 2 y x 4. at each x k along the line, perform test: if p k <0 then draw pixel (x k +1,y k ); p k+1 = p k + 2 y else draw pixel (x k +1,y k +1); p k+1 = p k + 2 y 2 x 5. perform step 4 ( x 1) times. Werner Purgathofer / Einf. in Visual Computing 16

17 Bresenham: Example k p k (x k+1,y k+1 ) (20,41) 0-4 (21,41) 1 2 (22,42) 2-12 (23,42) 3-6 (24,42) 4 0 (25,43) 5-14 (26,43) 6-8 (27,43) 7-2 (28,43) 8 4 (29,44) 9-10 (30,44) p 0 = 2 y x 46 x = 10, y = if p k <0 then draw pixel (x k +1,y k ); p k+1 = p k + 2 y else draw pixel (x k +1,y k +1); p k+1 = p k + 2 y 2 x Werner Purgathofer / Einf. in Visual Computing 17

18 Attributes of Graphics Output Primitives in 2D points, lines characters in 2D and 3D triangles other polygons ((filled) ellipses and other curves) Werner Purgathofer / Einf. in Visual Computing 18

19 Points and Line Attributes color type: solid, dashed, dotted, width, line caps, corners pen and brush options Werner Purgathofer / Einf. in Visual Computing 19

20 Character Attributes text attributes font (e.g. Courier, Arial, Times, Roman, ) proportionally sized vs. fixed space fonts styles (regular, bold, italic, underline, ) size (32 point, 1 point = 1/72 inch) string attributes orientation alignment (left, center, right, justify) horizontal v e r t i c a l Displayed primitives generated by the raster algorithms discussed in Chapter 3 have a jagged, or stairstep, appearance. Displayed primitives generated by the raster algorithms discussed in Chapter 3 have a jagged, or stairstep, appearance. Werner Purgathofer / Einf. in Visual Computing 20 Displayed primitives generated by the raster algorithms discussed in Chapter 3 have a jagged, or stairstep, appearance. Displayed primitives generated by the raster algorithms discussed in Chapter 3 have a jagged, or stairstep, appearance.

21 Character Primitives font (typeface) design style for (family of) characters Courier, Times, Arial, serif (better readable), sans serif (better legible) definition model Sfzrn Sfzrn bitmap font (simple to define and display), needs more space (font cache) outline font (more costly, less space, geometric transformations) Werner Purgathofer / Einf. in Visual Computing 21

22 Example: Newspaper Werner Purgathofer / Einf. in Visual Computing 22

23 Character Generation Examples the letter B represented with an 8x8 bilevel bitmap pattern and with an outline shape defined with straight line and curve segments Werner Purgathofer / Einf. in Visual Computing 23

24 Area-Fill Attributes (1) fill styles hollow, solid fill, pattern fill fill options edge type, width, color pattern specification through pattern tables tiling (reference point) Werner Purgathofer / Einf. in Visual Computing 24

25 Area-Fill Attributes (2) combination of fill pattern with background colors and soft fill pattern background or combination of colors antialiasing at object borders xor semitransparent brush simulation example: linear soft-fill replace F... foreground color B...background color P = t F + (1 t) B Werner Purgathofer / Einf. in Visual Computing 25

26 Triangle and Polygon Attributes color material transparency texture surface details reflexion properties, defined illumination produces effects Werner Purgathofer / Einf. in Visual Computing 26

27 General Polygon Fill Algorithms triangle rasterization other polygons: what is inside? scan-line fill method flood fill method (α, β,γ) clean borders between adjacent triangles barycentric coordinates Werner Purgathofer / Einf. in Visual Computing 27

28 General Polygon Fill Algorithms triangle rasterization other polygons: what is inside? scan-line fill method flood fill method interior, exterior for self-intersecting polygons? Werner Purgathofer / Einf. in Visual Computing 28

29 General Polygon Fill Algorithms triangle rasterization other polygons: what is inside? scan-line fill method flood fill method interior pixels along a scan line passing through a polygon area Werner Purgathofer / Einf. in Visual Computing 29

30 General Polygon Fill Algorithms triangle rasterization other polygons: what is inside? scan-line fill method flood fill method starting from a seed point: fill until you reach a border Werner Purgathofer / Einf. in Visual Computing 30

31 Triangles: Barycentric Coordinates notation: (α, β,γ) P 2 (x 2, y 2 ) (0, 0, 1) P 0 (x 0, y 0 ) (1, 0,0) P (, 0.13, 7) 0.60 P = αp 0 + βp 1 + γp 2 triangle = {P α+β+γ=1, 0<α<1, 0<β<1, 0<γ<1} P 1 (x 1, y 1 ) (0, 1, 0) Werner Purgathofer / Einf. in Visual Computing 31

32 Barycentric Coordinates in 3D notation: (α, β,γ) P 2 (x 2, y 2, z 2 ) (0, 0, 1) P 0 (x 0, y 0, z 0 ) (1, 0,0) P (, 0.13, 7) 0.60 P = αp 0 + βp 1 + γp 2 triangle = {P α+β+γ=1, 0<α<1, 0<β<1, 0<γ<1} P 1 (x 1, y 1, z 1 ) (0, 1, 0) Werner Purgathofer / Einf. in Visual Computing 32

33 Triangle Rasterization Algorithm for all x for all y /* use a bounding box!*/ {compute (α, β,γ) for (x,y) ; if (0<α<1) <1 and (0<β<1) <1 and (0<γ<1) <1 {c c = αc 00 + βc 11 + γc 22 ; draw pixel (x,y) with color c }} P = αp 0 + βp 1 + γp 2 triangle = {P α+β+γ=1, 0<α<1, 0<β<1, 0<γ<1} interpolates corner values (vertices) linearly inside the triangle (and along edges) Werner Purgathofer / Einf. in Visual Computing 33

34 Computing (α, β,γ) for P(x,y) line through P 1, P 2 : g 12 (x,y) = a 12 x+b 12 y+c 12 =0 then α = g 12 (x P,y P ) / g 12 (x 0,y 0 ) P 2 (x 2, y 2 ) β,γ analogous P 0 (x 0, y 0 ) P(x P, y P ) (α, β,γ)? g 12 (x,y)=0 P 1 (x 1, y 1 ) P = αp 0 + βp 1 + γp 2 triangle = {P α+β+γ=1, 0<α<1, 0<β<1, 0<γ<1} Werner Purgathofer / Einf. in Visual Computing 34

35 Barycentric Coordinates Example P = αp 0 + βp 1 + γp 2 triangle = {P α+β+γ=1, 0<α<1, 0<β<1, 0<γ<1} Werner Purgathofer / Einf. in Visual Computing 35

36 Avoiding to Draw Borders Twice don t draw the outline of the triangle! result would depend on rendering order Werner Purgathofer / Einf. in Visual Computing 36

37 Avoiding to Draw Borders Twice don t draw the outline of the triangle! result would depend on rendering order draw only pixels that are inside exact triangle i.e. pixels with α = 0 or β = 0 or γ = 0 are not drawn clean borders between adjacent triangles Werner Purgathofer / Einf. in Visual Computing 37

38 Pixels exactly on a Border!? holes if both triangles leave pixels away simplest solution: draw both pixels better: arbitrary choice based on some test e.g. only right boundaries Werner Purgathofer / Einf. in Visual Computing 38

39 What is Inside a Polygon? odd-even rule nonzero-winding- number rule??? Werner Purgathofer / Einf. in Visual Computing 39

40 Inside-Outside Tests area-filling algorithms interior, exterior for self-intersecting polygons? odd-even rule nonzero-winding-number rule same result for simple polygons Werner Purgathofer / Einf. in Visual Computing 40

41 What is Inside?: Odd-Even Rule inside/outside switches at every edge straight line to the outside: even number of edge intersections = outside odd number of edge intersections = inside Werner Purgathofer / Einf. in Visual Computing

42 What is Inside?: Nonzero Winding Number point is inside if polygon surrounds it straight line to the outside: same number of edges up and down = outside different number of edges up and down = inside Werner Purgathofer / Einf. in Visual Computing 42

43 Polygon Fill Areas polygon classifications convex: no interior angle > 180 concave: not convex concavity test vector method all vector cross products have the same sign convex rotational method rotate polygon-edges onto x-axis, always same direction convex Werner Purgathofer / Einf. in Visual Computing 43

Graphics Output Primitives

Important Graphics Output Primitives Graphics Output Primitives in 2D polgons, circles, ellipses & other curves piel arra operations in 3D triangles & other polgons Werner Purgathofer / Computergraphik

Attributes of Graphics Primitives

ttributes for Graphics Output Primitives ttributes of Graphics Primitives in 2 points, lines polygons, circles, ellipses & other curves (also filled) characters in 3 triangles & other polygons anti-aliasing

Chapter - 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

COMP371 COMPUTER GRAPHICS

COMP371 COMPUTER GRAPHICS LECTURE 14 RASTERIZATION 1 Lecture Overview Review of last class Line Scan conversion Polygon Scan conversion Antialiasing 2 Rasterization The raster display is a matrix of picture

Unit 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

Graphics (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

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes t Line Attributes Fill-Area Attributes Scan-Line

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

CSCI 420 Computer Graphics Lecture 14 Rasterization Jernej Barbic University of Southern California Scan Conversion Antialiasing [Angel Ch. 6] Rasterization (scan conversion) Final step in pipeline: rasterization

Rasterization: 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

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes Line Attributes Fill-Area Attributes Scan-Line

Rasterization, 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

Output 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,

OpenGL 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,

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

Fall 2015 CSCI 420: Computer Graphics 7.1 Rasterization Hao Li http://cs420.hao-li.com 1 Rendering Pipeline 2 Outline Scan Conversion for Lines Scan Conversion for Polygons Antialiasing 3 Rasterization

Chapter 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

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

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines Emmanuel Agu 2D Graphics Pipeline Clipping Object World Coordinates Applying world window Object subset window to viewport mapping

Pipeline 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

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

CSCI 420 Computer Graphics Lecture 14 Rasterization Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California 1 Rasterization (scan conversion) Final step in pipeline:

Topics. From vertices to fragments

Topics From vertices to fragments From Vertices to Fragments Assign a color to every pixel Pass every object through the system Required tasks: Modeling Geometric processing Rasterization Fragment processing

2D Image Synthesis. 2D image synthesis. Raster graphics systems. Modeling transformation. Vectorization. u x u y 0. o x o y 1

General scheme of a 2D CG application 2D Image Synthesis Balázs Csébfalvi modeling image synthesis Virtual world model world defined in a 2D plane Department of Control Engineering and Information Technology

Computer 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

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

Implementation III Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Objectives Survey Line Drawing Algorithms - DDA - Bresenham 2 Rasterization

Tó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,

Line 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

Computer 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

Rasterization. COMP 575/770 Spring 2013

Rasterization COMP 575/770 Spring 2013 The Rasterization Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to

Scan 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.

Line 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

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

FROM VERTICES TO FRAGMENTS Lecture 5 Comp3080 Computer Graphics HKBU OBJECTIVES Introduce basic implementation strategies Clipping Scan conversion OCTOBER 9, 2011 2 OVERVIEW At end of the geometric pipeline,

CS 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

CS 543: Computer Graphics. Rasterization

CS 543: Computer Graphics Rasterization Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu (with lots

From 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

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

Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

COMP30019 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

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

CS452/552; EE465/505 Clipping & Scan Conversion 3-31 15 Outline! From Geometry to Pixels: Overview Clipping (continued) Scan conversion Read: Angel, Chapter 8, 8.1-8.9 Project#1 due: this week Lab4 due:

Computer 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

Announcements. 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

Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Surface shading: lights and rasterization Computer Graphics CSE 167 Lecture 6 CSE 167: Computer Graphics Surface shading Materials Lights Rasterization 2 Scene data Rendering pipeline Modeling and viewing

From 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)

Rasterization. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 16

Rasterization CS 4620 Lecture 16 1 Announcements A3 due on Thu Will send mail about grading once finalized 2 Pipeline overview you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX

Renderer 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

Pipeline and Rasterization. COMP770 Fall 2011

Pipeline and Rasterization COMP770 Fall 2011 1 The graphics pipeline The standard approach to object-order graphics Many versions exist software, e.g. Pixar s REYES architecture many options for quality

Computer 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

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

Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Recall: Rasterization Rasterization (scan conversion)

CS 130 Final. Fall 2015

CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

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

CS4620/5620: Lecture 12 Rasterization 1 Announcements Turn in HW 1 PPA 1 out Friday lecture History of graphics PPA 1 in 4621 2 The graphics pipeline The standard approach to object-order graphics Many

The graphics pipeline. Pipeline and Rasterization. Primitives. Pipeline

The graphics pipeline Pipeline and Rasterization CS4620 Lecture 9 The standard approach to object-order graphics Many versions exist software, e.g. Pixar s REYES architecture many options for quality and

Werner Purgathofer

Einführung in Visual Computing 186.822 Visible Surface Detection Werner Purgathofer Visibility in the Rendering Pipeline scene objects in object space object capture/creation ti modeling viewing projection

CS 325 Computer Graphics

CS 325 Computer Graphics 02 / 06 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Antialiasing Polygons Interior points Fill areas tiling halftoning dithering Antialiasing Aliasing

CSCI 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.

Realtime 3D Computer Graphics Virtual Reality

Realtime 3D Computer Graphics Virtual Reality From Vertices to Fragments Overview Overall goal recapitulation: Input: World description, e.g., set of vertices and states for objects, attributes, camera,

Scan Converting Text. Attributes of Output Primitives. CS 460/560 Computer Graphics. Binghamton University. EngiNet. Thomas J.

Binghamton University EngiNet State University of New York EngiNet Thomas J. Watson School of Engineering and Applied Science WARNING All rights reserved. No Part of this video lecture series may be reproduced

Chapter 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

Overview 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

Scan 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

Rasterization. CS4620 Lecture 13

Rasterization CS4620 Lecture 13 2014 Steve Marschner 1 The graphics pipeline The standard approach to object-order graphics Many versions exist software, e.g. Pixar s REYES architecture many options for

CHAPTER 1 Graphics Systems and Models 3

?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

RASTERIZING POLYGONS IN IMAGE SPACE

On-Line Computer Graphics Notes RASTERIZING POLYGONS IN IMAGE SPACE Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis A fundamental

Topic #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

1 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

Rasterization 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

Text in OpenGL and Windows. Computer Graphics Attributes. Computer Graphics. Binghamton University. EngiNet. Thomas J. Watson

Binghamton University EngiNet State University of New York EngiNet Thomas J. Watson School of Engineering and Applied Science WARNING All rights reserved. No Part of this video lecture series may be reproduced

Rasteriza2on and Clipping

Overview Scan conversion Computer Graphics Rasterizaon and Clipping Polygon filling Clipping in D Aleksandra Pizurica Raster Display PIEL (picture element) RASTER (a rectangular array of points or dots)

Computer Graphics Geometry and Transform

! Computer Graphics 2014! 5. Geometry and Transform Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2014-10-11! Today outline Triangle rasterization Basic vector algebra ~ geometry! Antialiasing

SE Mock Online Test 1-CG

SE Mock Online Test 1-CG 1. Email address * 2. 1. For gentle slope line, slope m is -1

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

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

Rendering approaches 1.image-oriented foreach pixel... 2.object-oriented foreach object... geometry 3D rendering pipeline image 3D graphics pipeline Vertices Vertex processor Clipper and primitive assembler

Painter s HSR Algorithm

Painter s HSR Algorithm Render polygons farthest to nearest Similar to painter layers oil paint Viewer sees B behind A Render B then A Depth Sort Requires sorting polygons (based on depth) O(n log n) complexity

UNIT 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

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Computer Science

INTERNAL ASSESSMENT TEST 2 Solution Date : 30.03.15 Max Marks : 50 Subject & Code : Computer Graphics and Visualization/10CS65 Section : A, B and C Name of faculty : Ms. Sarasvathi V/ Ms. Archana Time

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo) www.vucybarien.com Question No: 1 What are the two focusing methods in CRT? Explain briefly. Page no : 26 1. Electrostatic focusing

CS488 2D Graphics. Luc RENAMBOT

CS488 2D Graphics Luc RENAMBOT 1 Topics Last time, hardware and frame buffer Now, how lines and polygons are drawn in the frame buffer. Then, how 2D and 3D models drawing into the frame buffer Then, more

Rendering. Basic Math Review. Rasterizing Lines and Polygons Hidden Surface Remove Multi-pass Rendering with Accumulation Buffers.

Rendering Rasterizing Lines and Polygons Hidden Surface Remove Multi-pass Rendering with Accumulation Buffers Basic Math Review Slope-Intercept Formula For Lines Given a third point on the line: P = (X,Y)

CS6504 & 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

Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

Computer graphics 2 Marks 1. Define Computer graphics.

Computer graphics 2 Marks 1. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation

Hidden surface removal. Computer Graphics

Lecture Hidden Surface Removal and Rasterization Taku Komura Hidden surface removal Drawing polygonal faces on screen consumes CPU cycles Illumination We cannot see every surface in scene We don t want

Rasterization Computer Graphics I Lecture 14. Scan Conversion Antialiasing Compositing [Angel, Ch , ]

15-462 Computer Graphics I Lecture 14 Rasterization March 13, 2003 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Scan Conversion Antialiasing Compositing [Angel,

2D Graphics Primitives II. Additional issues in scan converting lines. 1)Endpoint order. Want algorithms to draw the same pixels for each line

walters@buffalo.edu CSE 480/580 Lecture 8 Slide 1 2D Graphics Primitives II Additional issues in scan converting lines 1)Endpoint order Want algorithms to draw the same pixels for each line How handle?

Department 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

Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

Output 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

Points and lines. x x 1 + y 1. y = mx + b

Points and lines Point is the fundamental element of the picture representation. It is nothing but the position in a plan defined as either pairs or triplets of number depending on whether the data are

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

COMP30019 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

Lecture outline COMP30019 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Introduction to Modelling Polygonal geometry The rendering

Clipping and Scan Conversion

15-462 Computer Graphics I Lecture 14 Clipping and Scan Conversion Line Clipping Polygon Clipping Clipping in Three Dimensions Scan Conversion (Rasterization) [Angel 7.3-7.6, 7.8-7.9] March 19, 2002 Frank

CS 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);

0. 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:

Graphics and Interaction Rendering pipeline & object modelling

433-324 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering

Triangle Rasterization

Triangle Rasterization Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/07/07 1 From last time Lines and planes Culling View frustum culling Back-face culling Occlusion culling

Einführung in Visual Computing

Einführung in Visual Computing 186.822 Textures Werner Purgathofer Surface-Rendering Methods polygon rendering methods ray tracing global illumination environment mapping texture mapping bump mapping Werner

Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

Polygon Filling. Can write frame buffer one word at time rather than one bit. 2/3/2000 CS 4/57101 Lecture 6 1

Polygon Filling 2 parts to task which pixels to fill what to fill them with First consider filling unclipped primitives with solid color Which pixels to fill consider scan lines that intersect primitive

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK SUB.NAME: COMPUTER GRAPHICS SUB.CODE: IT307 CLASS : III/IT UNIT-1 2-marks 1. What is the various applications

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CS2401 Computer Graphics CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK CS2401- COMPUTER GRAPHICS UNIT 1-2D PRIMITIVES 1. Define Computer Graphics. 2. Explain any 3 uses of computer graphics applications.