Graphics Pipeline 2D Geometric Transformations

Similar documents
Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Geometric Transformations

2D/3D Geometric Transformations and Scene Graphs

Vector Algebra Transformations. Lecture 4

CS4620/5620: Lecture 14 Pipeline

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture 14

The graphics pipeline. Pipeline and Rasterization. Primitives. Pipeline

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

Rasterization. CS4620 Lecture 13

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

Pipeline and Rasterization. COMP770 Fall 2011

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Pipeline Operations. CS 4620 Lecture 10

CS 130 Final. Fall 2015

CHAPTER 1 Graphics Systems and Models 3

Drawing in 3D (viewing, projection, and the rest of the pipeline)

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

Transforms. COMP 575/770 Spring 2013

Linear and Affine Transformations Coordinate Systems

Lecture 5 2D Transformation

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Last week. Machiraju/Zhang/Möller/Fuhrmann

CS 4620 Program 3: Pipeline

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Rasterization Overview

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

CS 130 Exam I. Fall 2015

CS Exam 1 Review Problems Fall 2017

Rasterization. COMP 575/770 Spring 2013

CSE328 Fundamentals of Computer Graphics

3D GRAPHICS. design. animate. render

CS452/552; EE465/505. Geometry Transformations

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Drawing in 3D (viewing, projection, and the rest of the pipeline)

CS 130 Exam I. Fall 2015

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

CS 464 Review. Review of Computer Graphics for Final Exam

Computer Graphics I Lecture 11

CMSC427 Final Practice v2 Fall 2017

CS451Real-time Rendering Pipeline

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Translations. Geometric Image Transformations. Two-Dimensional Geometric Transforms. Groups and Composition

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

Computer Graphics Fundamentals. Jon Macey

2D transformations: An introduction to the maths behind computer graphics

6.837 LECTURE 7. Lecture 7 Outline Fall '01. Lecture Fall '01

Last week. Machiraju/Zhang/Möller

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

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

Specifying Complex Scenes

Scanline Rendering 2 1/42

the gamedesigninitiative at cornell university Lecture 14 2D Sprite Graphics

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Graphics Hardware and Display Devices

(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Advanced Rendering Techniques

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

Shaders. Slide credit to Prof. Zwicker

Introduction to Computer Graphics

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

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

Models and Architectures

CS6670: Computer Vision

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

Advanced Computer Graphics Transformations. Matthias Teschner

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

GEOMETRIC TRANSFORMATIONS AND VIEWING

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Graphics and Interaction Rendering pipeline & object modelling

Camera model and multiple view geometry

Today s Topics. 3. Transformations in 2D. 4. Coordinate-free geometry. 5. 3D Objects (curves & surfaces) 6. Transformations in 3D

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

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

2D Spline Curves. CS 4620 Lecture 18

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

MIT EECS 6.837, Teller and Durand 1

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

Institutionen för systemteknik

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

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

The Rasterization Pipeline

Ciril Bohak. - INTRODUCTION TO WEBGL

Spring 2009 Prof. Hyesoon Kim

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Spring 2011 Prof. Hyesoon Kim

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

Lecture 8 Ray tracing Part 1: Basic concept Yong-Jin Liu.

3D Viewing. CS 4620 Lecture 8

COMP3421. Vector geometry, Clipping

CS 184, Fall 1996 Midterm #1 Professor: unknown

Transcription:

Graphics Pipeline 2D Geometric Transformations CS 4620 Lecture 8 1

Plane projection in drawing Albrecht Dürer 2

Plane projection in drawing source unknown 3

Rasterizing triangles Summary 1 evaluation of linear functions on pixel grid 2 functions defined by parameter values at vertices 3 using extra parameters to determine fragment set 4

Pixel-walk (Pineda) rasterization Conservatively visit a superset of the pixels you want Interpolate linear functions Use those functions to determine when to emit a fragment 5

The z buffer another example of a memory-intensive brute force approach that works and has become the standard [Foley et al.] 6

Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION FRAGMENTS blending, compositing, shading FRAGMENT PROCESSING FRAMEBUFFER IMAGE user sees this DISPLAY 7

8

Some demos http://mrdoob.github.io/three.js/examples/ http://carvisualizer.plus360degrees.com/threejs/ http://madebyevan.com/webgl-water/ http://akirodic.com/p/jellyfish/ 9

Pipeline of transformations Standard sequence of transforms object space camera space screen space modeling transformation camera transformation projection transformation viewport transformation world space canonical view volume 10

A little quick math background Notation for sets, functions, mappings Linear transformations Matrices Matrix-vector multiplication Matrix-matrix multiplication Geometry of curves in 2D Implicit representation Explicit representation 11

Implicit representations Equation to tell whether we are on the curve Example: line (orthogonal to u, distance k from 0) (u is a unit vector) Example: circle (center p, radius r) {v (v p) (v p) r 2 =0} Always define boundary of region (if f is continuous) 12

Explicit representations Also called parametric Equation to map domain into plane Example: line (containing p, parallel to u) Example: circle (center b, radius r) Like tracing out the path of a particle over time Variable t is the parameter 13

Transforming geometry Parametric representation: Implicit representation: 14

Translation Simplest transformation: Inverse: 15

Linear transformations One way to define a transformation is by matrix multiplication: Such transformations are linear, which is to say: (and in fact all linear transformations can be written this way) 16

Geometry of 2D linear trans. 2x2 matrices have simple geometric interpretations uniform scale non-uniform scale rotation shear reflection Reading off the matrix 17

Linear transformation gallery Uniform scale 18

Linear transformation gallery Nonuniform scale 19

Linear transformation gallery Reflection can consider it a special case of nonuniform scale 20

Linear transformation gallery Rotation apple 0.866 0.5 0.5 0.866 21

Linear transformation gallery Shear 22

Composing transformations Want to move an object, then move it some more We need to represent S o T ( S compose T ) and would like to use the same representation as for S and T Translation easy Translation by u T then by u S is translation by u T + u S commutative! 23

Composing transformations Linear transformations also straightforward Transforming first by M T then by M S is the same as transforming by M S M T only sometimes commutative e.g. rotations & uniform scales e.g. non-uniform scales w/o rotation Note M S M T, or S o T, is T first, then S 24

Combining linear with translation Need to use both in single framework Can represent arbitrary seq. as e. g. Transforming by M T and u T, then by M S and u S, is the same as transforming by M S M T and u S + M S u T This will work but is a little awkward 25

Homogeneous coordinates A trick for representing the foregoing more elegantly Extra component w for vectors, extra row/column for matrices for affine, can always keep w = 1 Represent linear transformations with dummy extra row and column 26

Homogeneous coordinates Represent translation using the extra column 27

Homogeneous coordinates Composition just works, by 3x3 matrix multiplication This is exactly the same as carrying around M and u but cleaner and generalizes in useful ways as we ll see later 28