Specifying Complex Scenes

Similar documents
GEOMETRIC TRANSFORMATIONS AND VIEWING

Viewing. Reading: Angel Ch.5

CT5510: Computer Graphics. Transformation BOCHANG MOON

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations

Lecture 5: Transforms II. Computer Graphics and Imaging UC Berkeley CS184/284A

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

MAE : Lecture #12 - Projection and Perspective. Lecture Overview:

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

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

Linear and Affine Transformations Coordinate Systems

Computer Graphics: Geometric Transformations

3-D D Euclidean Space - Vectors

CV: 3D sensing and calibration

THE VIEWING TRANSFORMATION

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Computer Vision Projective Geometry and Calibration. Pinhole cameras

3D Geometry and Camera Calibration

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

Vector Algebra Transformations. Lecture 4

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Homogeneous Coordinates. Lecture18: Camera Models. Representation of Line and Point in 2D. Cross Product. Overall scaling is NOT important.

Geometric Transformations

Transforms. COMP 575/770 Spring 2013

2D Object Definition (1/3)

Camera Calibration. COS 429 Princeton University

Advanced Computer Graphics Transformations. Matthias Teschner

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

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

Projection Lecture Series

Models and The Viewing Pipeline. Jian Huang CS456

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Graphics Pipeline 2D Geometric Transformations

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

CSE452 Computer Graphics

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

2D/3D Geometric Transformations and Scene Graphs

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52

Computer Vision cmput 428/615

Chapter 2 - Basic Mathematics for 3D Computer Graphics

UNIT 2 2D TRANSFORMATIONS

Camera Model and Calibration

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

CSE328 Fundamentals of Computer Graphics

Visual Recognition: Image Formation

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Agenda. Perspective projection. Rotations. Camera models

Discriminant Functions for the Normal Density

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Homework 5: Transformations in geometry

Chapter 5. Projections and Rendering

Agenda. Rotations. Camera calibration. Homography. Ransac

Three Main Themes of Computer Graphics

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

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Answers to practice questions for Midterm 1

CSC 305 The Graphics Pipeline-1

2D and 3D Coordinate Systems and Transformations

CS488. Implementation of projections. Luc RENAMBOT

Homework 5: Transformations in geometry

CS6670: Computer Vision

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

Perspective projection and Transformations

Computer Graphics Geometric Transformations

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Viewing and Projection

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

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

Early Fundamentals of Coordinate Changes and Rotation Matrices for 3D Computer Vision

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

Viewing with Computers (OpenGL)

Geometry of linear operators. Orthogonal opertors

CS 4204 Computer Graphics

Viewing and Projection

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

Agenda. Rotations. Camera models. Camera calibration. Homographies

Chapter 8 Three-Dimensional Viewing Operations

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

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

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

Viewing. Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Pin Hole Cameras & Warp Functions

Multiple View Geometry in Computer Vision

Camera Model and Calibration. Lecture-12

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

2. For the statement above, write either bi-conditional or give a counterexample.

CSE 252B: Computer Vision II

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

CS452/552; EE465/505. Geometry Transformations

Content. Coordinate systems Orthographic projection. (Engineering Drawings)

Institutionen för systemteknik

Coordinate transformations. 5554: Packet 8 1

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Transcription:

Transformations

Specifying Complex Scenes (x,y,z) (r x,r y,r z ) 2 (,,)

Specifying Complex Scenes Absolute position is not very natural Need a way to describe relative relationship: The lego is on top of the roof, which is above the house Work locally for every object and then combine 3

Transformations Transforming an object = transforming all its points For a polygon = transforming its vertices 4

Scaling vector in plane Scaling operator with parameters :, 5 (,) (s x,s y )=(.7,.7) (s x,s y )=(.7, 1.) (s x,s y )=(3., 1.5)

Scaling Matrix Form, Independent in and Non uniform scaling is allowed 6

Rotation W v x V (,) = -45 o = -135 o (,) r v y Polar form: cos sin Rotate V anti clockwise by to W: cos sin cos sin sin cos 7

Rotation Matrix form: Rotation operator with parameter : 8

Rotation Properties cos sin sin cos is orthogonal Rotation by is 9

Translation (t x,t y )=(., 1.) (t x,t y )=(1.,.) (t x,t y )=(1.5,.3) Translation operator with parameters :, Can we express in a matrix form? 1

Homogeneous Coordinates in Points of the form Where we identify For all nonzero 11

Conversion Formulae From Euclidean to homogeneous From homogeneous to Euclidean 12

Example In homogeneous coordinates 13

Translation using Homogeneous Coordinates, 14

Matrix Form Why bother writing transformations in matrix form? 15

Transformation Composition What operation rotates by around? Translate to origin Rotate around origin by Translate back P P 16

Transformation Composition performs one transformation performs a second transformation performs the composed transformation 17

Transformation Composition,, 18

Transformation Quiz What do these Euclidean transformations do? 19

Transformation Quiz And these homogeneous ones? 2

Transformation Quiz Can one rotate in the plane by reflection? How can one reflect through an arbitrary line in the plane? 21

Arbitrary Reflection Shift by Rotate by Reflect through Rotate by Shift by,,, 22

Rotate by Shear Shear Rotation by composition of 3 shears 23

Rotate by Shear cos sin sin cos 1 1 Solve for,, : cos 1 sin Solution: sin When is this useful? tan 2 24

Rotate by Shear Can we rotate with two (scaled) shears? What happens for? 25

Rotation Approximation For small angles we have: cos 1 and sin (Taylor expansion of sin/cos) Can approximate: Examples (steps of ): 26

3D Transformations All 2D transformations extend to 3D In homogeneous coordinates:,,,,, 1 1 1 1 1 cos sin sin cos 1 1 What is?? 27

3D Transformations Questions (commutativity): Scaling: Is S 1 S 2 = S 2 S 1? Translation: Is T 1 T 2 = T 2 T 1? Rotation: Is R 1 R 2 = R 2 R 1? 28

3D Coordinate Systems left right 29

Example: Arbitrary Rotation Y Z W V X U Problem: Given two orthonormal coordinate systems XYZ and UVW, find a transformation from one to the other. 3

Arbitrary Rotation Answer: Transformation matrix R whose columns are U, V, W: Proof: Similarly R(Y) = V and R(Z) = W 31

Arbitrary Rotation (cont.) Inverse (=transpose) transformation, R -1, provides mapping from UVW to XYZ E.g. X u u u w v u w v u w v u u u u U R z y x z z z y y y x x x z y x (1,,),,) ( ),, ( ) ( 2 2 2 1 32

Line Objects Line through two points in parametric form: 1 1. 1 1,.5 1 /2,.5, 1 1 1, 1 Ray:, Segment:,1 1 Intuitively: Coordinates of trajectory of particle at time. 33

Viewing Transformations Screen space View space projectors z Object space Question: How can we view (draw) 3D objects on a 2D screen? Answer: Project the transformed object along Z axis onto XY plane and from there to screen (space) Canonical projection: 1 1 1 In practice ignore the z axis simply use the x and y coordinates for screen coordinates 34

35 Parallel Projection

Projectors are all parallel Parallel Projection Orthographic: Projectors perpendicular to projection plane Axonometric: Rotation + translation + orthographic projection 36

37 Pinhole Camera Model

Perspective Projection Viewing is from point at a finite distance Without loss of generality: Viewpoint at origin Viewing plane is Given similarity gives: triangle X center of projection projectors projection plane x 2 p z = d x 1 p= x 3 p p 2 p 3 p 1 = (x 1, y 1, z 1 ) Z x z x d p and y z y d p x p z x / d and y p z y / d 38

Perspective Projection (cont d) In homogeneous coordinates: In Euclidean coordinates: P not injective & singular: det.,,, 1/ 1 1 1,1),, (,1),, ( d z z y x d z y x z y x P ).,, (, /, / /, /, / d y x d d z y d z x d z z d z y d z x p p 39

4

41 original

Scale Dolly 42

Perspective Projection What is the difference between: Moving the projection plane Moving the viewpoint (center of projection) Z y y Scale y Dolly Z Z z z z 43

Examples Orthographic view Perspective view 44

Perspective Warp Matrix formulation d z d d z y x d d d d d z y x, ) (,, 1 1 1,1),, ( z d z d d z y d z x z y x p p p 2, /, / ),, ( 45

2 2 d ( z) d f( z) 1 ( d ) z d z f(z) d 2 /(d-α) d monotonic increasing in z preserves z ordering α d z 1 z 2 z 46

47 Perspective Warp

Quiz Which transformation preserves which geometric form? lines parallel lines distance angles normals convexity conics scaling rotation translation shear perspective 48

49

5 3D Sidewalk Art by Julian Beever

51

52

53

54

55

56

57

58

59