CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE

Size: px
Start display at page:

Download "CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE"

Transcription

1 CS 45: COMUTER GRAHICS 2D TRANSFORMATIONS SRING 26 DR. MICHAEL J. REALE

2 INTRODUCTION Now that we hae some linear algebra under our resectie belts, we can start ug it in grahics! So far, for each rimitie, we hae a descrition that includes the ositions of the ertices model coordinates Eamles: A square with ertices (-,-), (,-), (,), (-,) A teaot with its ertices relatie to its bottom We would like to be able to lace this rimitie in the world whereer we want (as well as rotate it and/or scale it) use a model transform Recall: Model coordinates (relatie to model) MODEL TRANSFORM World coordinates We would also like to be able to get the world coordinates relatie to the camera use iew transform Recall: World coordinates VIEW TRANSFORM Camera (Ee) Coordinates

3 TRANSFORMATIONS Transformations or transforms = oerations that change osition, orientation, and/or size of geometric object Use matrices to erform transformations on ectors/oints Eamles: model transforms, the iew transform, rojection transform, etc.

4 OVERVIEW Three most basic transformations: Rotation Scaling (i.e., resizing the object) Translation (i.e., moing/lacing the object) Other transformations: shear, reflection, etc. We re going to start with 2D transformations first Then, later, we ll moe on to 3D transformations Kee in mind, we will be building simle transformations (with certain imlicit assumtions) Howeer, we will combine these to make more owerful transformations

5 ROTATION

6 ROTATION: INTRODUCTION To rotate an object, we need: Rotation angle how much to rotate Counterclockwise in lane we re rotating Rotation ais what we re rotating around In 2D, just use z ais WARNING: Rotation erformed around ORIGIN Origin (,) = rotation oint (or iot oint) (We ll talk later about how to rotate around an arbitrar rotation oint)

7 ROTATION: DERIVING Recall: ( A B) A B A B ( A B) A B A B = (,) original oint = (, ) transformed oint ϕ = original angle of oint (,) from ais θ = difference in angle between old and new oint So, our original oint (,) and transformed oint (, ) in olar coordinates are as follows r r r ( ) r ( ) r r r r After substitution, we can eress the transformed oint in terms of θ onl:

8 ROTATION MATRIX We hae: If our rotation matri transform is R, then: Therefore, our 2D rotation matri is: R R R

9 SCALING

10 SCALING: INTRODUCTION Scaling an object = altering the size of an object The scaling we will be doing here siml multiling each coordinate b a scaling factor: The corresonding scaling matri transformation s s s s

11 SCALING: FACTORS Scaling factor >. enlarge Scaling factor <. shrink Scaling factor < negatie scaling resizes AND reflects object Uniform scaling = scaling factors are all the same (e.g., s = s ) Otherwise, called differential scaling

12 SCALING: ASSUMTIONS WARNING: Because of the wa we are doing scaling: Onl scaling in X or Y direction (or both), but NOT in arbitrar direction! Scaling relatie to ORIGIN! ORIGIN = fied oint (oint unaffected b scaling) (We ll talk later about how to use a different fied oint)

13 TRANSLATION

14 TRANSLATION: INTRODUCTION Translation = moing a oint b a certain distance (t, t ) (t, t ) = translation distances = translation ector = shift ector If we re stuck with 22 matrices and 2 ectors, we hae to add ectors to erform a translation: t t t t t t T

15 TRANSLATION: ROBLEM At some oint, we would like to be able to combine multile transformations into a gle matri: This means we can multil all our transformations together first (M), and then al it to each oint we want HOWEVER, because translation is handled as addition, we need to comute intermediate stes: M A B C D E F A B C D E F ) ( T R ) (

16 HOMOGENEOUS COORDINATES

17 HOMOGENEOUS COORDINATES To fi this, we will etend our 22 matrices (and our 2 ectors) to 33 matrices (and to 3 ectors) Homogeneous coordinates = for 2D coordinates, etension to ( h, h, h) h = homogeneous arameter nonzero alue such that: Often just set h = (, ) becomes (,, ) Often use w instead of h (eseciall for 3D ectors (,,z,w) ) As we ll see, this allows us to reresent translation as a matri multilication! h h h h

18 TRANSLATION MATRIX WITH HOMOGENEOUS COORDINATES The 2D translation matri is sometimes reresented as T(t, t ) t t t t T

19 ROTATION MATRIX WITH HOMOGENEOUS COORDINATES The 2D rotation matri is sometimes reresented as R(θ)

20 SCALING MATRIX WITH HOMOGENEOUS COORDINATES The 2D scaling matri is sometimes reresented as S(s, s ) s s

21 ATTERN WITH HOMOGENEOUS COORDINATE MATRICES With the translation matri, we urosel use the additional elements of the matri (in this case, the etra column): T For rotation, scaling, and shear matrices (discussed later), the original matri is augmented with an etra row and column of zeros (ecet for the last (row,column) osition, which is set to ): M m m m m M t t m m m 2 m m m 2 m m m

22 HOMOGENEOUS COORDINATES: OINTS VS. VECTORS Recall: a ector can also be interreted as: Location (w = ) Direction (w = ) in sace Note: sometimes, location called oint and direction called ector Deending on how we want to interret the ector, we will set a different alue for w

23 HOMOGENEOUS COORDINATES: OINTS VS. VECTORS oints all transformations should hae an effect (translation, rotation, scaling, etc.) w set to Direction translation has no meaning (other transformation should work though) w set to t t t t T t t T

24 INVERSE TRANSFORMATIONS

25 INVERSE TRANSFORMATIONS Fortunatel, the inerses of the translation, rotation, and scaling matrices can be comuted directl: Aling an inerse transformation does the oosite transformation T - translate object (-t, -t ) s s S R t t T

26 QUICK ASIDE: INVERSE OF ROTATION MATRIX We comuted the inerse directl b ug the negatie angle (-θ) onl e was affected b this It turns out, an rotation matri is ORTHOGONAL inerse = transose = swaing rows and columns Also note: R = 2 θ + 2 θ = R R R T

27 CHANGING COORDINATE SYSTEMS

28 CHANGING 2D COORDINATE SYSTEMS Gien a oint, man times we want to get the coordinates of this oint relatie to some OTHER coordinate basis ectors and origin oint Eamle: iewing transform getting coordinates with resect to camera s iew (camera s basis ectors) and camera s starting oint (camera s origin) As with all our slides thus far, we ll stick to 2D for now. For a 2D coordinate sstem, we need: An origin oint (, ) Two aes and

29 CHANGING 2D COORDINATE SYSTEMS To change 2D coordinate sstems: Translate so that the new origin is at (,) T(-, - ) Rotate the ais onto the ais need to get angle θ between and R(-θ) Final transformation: R(-θ) T(-, - )

30 COMUTING NEW COORDINATE AXES If we onl know one ector V (and we want to oint in the same direction): Alternatiel, we might be gien (origin) and (endoint of ais): ), ( V V

31 CHANGING 2D COORDINATE AXES ONLY If our new coordinate aes are u = (u, u ) and = (, ), then we can construct the ROTATION matri directl: When multiling b a oint, will be rojected on each ais ( dotted with each ais): u u R u u u u u R

32 CHANGING 2D COORDINATE AXES ONLY To drie the oint home: ) ( 9 9 ) 9 ( 9 9 ) 9 ( u u R u u B A B A B A B A B A B A ) ( ) ( Recall:

33 UNDOING A 2D COORDINATE AXIS CHANGE To go back to the standard basis, we need to get the original coordinates back To get the coordinate * u + * * To get the coordinate * u + * * The matri form becomes: u u u u R

34 UNDOING A 2D COORDINATE AXIS CHANGE Note: If coordinate aes are orthonormal matri R is orthogonal R - = R T T u u R R u u R

35 COMOSITE TRANSFORMATIONS

36 COMOSITE TRANSFORMATIONS Comosite transformation matri = roduct of indiidual transformations rocess of forming one is called concatenation or comosition of matrices Eamle: al M then M 2 M = M 2 M NOTE THE ORDER! Must multil from RIGHT to LEFT!!! M 2 M M

37 WHY USE COMOSITE TRANSFORMATIONS? There are a LOT of different things ou can do with these; we ll talk about a few er common eamles: Rotation around an arbitrar iot oint Scaling around an arbitrar fied oint Scaling in an arbitrar direction

38 ROTATION AROUND AN ARBITRARY IVOT OINT Let s sa we want to rotate around an iot oint (, ) Basic idea: Translate (-, - ) (, ) is now at origin Rotate oints Translate back to (, ) ), ( ) ( ), ( T R T

39 SCALING AROUND AN ARBITRARY FIXED OINT Sa we want to scale an object relatie a fied oint (, ) Basic idea: Translate (-, - ) (, ) is now at origin Scale oints Translate back to (, ) ), ( ), ( ), ( s s T s s S T

40 SCALING IN AN ARBITRARY DIRECTION Let s assume our fied oint is alread at the origin Basic idea: Rotate our arbitrar ais u into the ais Scale along Rotate back If u is our ais, then our ais = = (-u, u ): ), ( u u s s u u R s s S R

41 ORDER MATTERS! What order ou al our matrices will affect what transformations ou erform!!! Eamle: rotation then scale s. scale then rotation First transformation RIGHT-most matri when multiling!

42 RIGID-BODY TRANSFORMATIONS

43 RIGID-BODY TRANSFORMATIONS Rigid-bod transformation = onl includes translation and/or rotation All angles and distances between coordinate ositions resered Intuitiel, object doesn t change shae onl changes osition and/or orientation Also called a rigid-motion transformation In 2D, has the general form: r r r r tr tr WARNING: (tr, tr )!= (t, t ) from earlier! (Deends on order of transformations) Uer-left 22 matri orthonormal ector set

44 OTHER TRANSFORMATIONS (REFLECTION AND SHEAR)

45 REFLECTION TRANSFORMATION Reflection transformation = transformation that roduces a mirror image of object In 2D 8 rotation about ais of reflection ais Reflection about line = ( ais): Reflection about line = ( ais): Reflection about origin:

46 REFLECTION ACROSS DIAGONALS Reflection across = : Reflection across = -:

47 SHEAR TRANSFORMATION Shear transformation = distorts shae of object like as if the object is comosed of laers sliding oer each other Shear in -direction: Shear in -direction: h h H h h H

48 SHEAR TRANSFORMATION WARNING: B default, assumes reference line is either the ais or the ais (for the -shear and - shear, resectiel)

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation Comuter Grahics (Fall 24) COMS 416, Lecture 3: ransformations 1 htt://www.cs.columbia.edu/~cs416 o Do Start (thinking about) assignment 1 Much of information ou need is in this lecture (slides) Ask A NOW

More information

CS 428: Fall Introduction to. Geometric Transformations. Andrew Nealen, Rutgers, /15/2010 1

CS 428: Fall Introduction to. Geometric Transformations. Andrew Nealen, Rutgers, /15/2010 1 CS 428: Fall 21 Introduction to Comuter Grahics Geometric Transformations Andrew Nealen, Rutgers, 21 9/15/21 1 Toic overview Image formation and OenGL (last week) Modeling the image formation rocess OenGL

More information

Geometric Transformations

Geometric Transformations CS INTRODUCTION TO COMPUTER GRAPHICS Geometric Transformations D and D Andries an Dam 9/9/7 /46 CS INTRODUCTION TO COMPUTER GRAPHICS How do we use Geometric Transformations? (/) Objects in a scene at the

More information

What and Why Transformations?

What and Why Transformations? 2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)

More information

Remember: The equation of projection. Imaging Geometry 1. Basic Geometric Coordinate Transforms. C306 Martin Jagersand

Remember: The equation of projection. Imaging Geometry 1. Basic Geometric Coordinate Transforms. C306 Martin Jagersand Imaging Geometr 1. Basic Geometric Coordinate Transorms emember: The equation o rojection Cartesian coordinates: (,, z) ( z, z ) C36 Martin Jagersand How do we develo a consistent mathematical ramework

More information

CS559: Computer Graphics

CS559: Computer Graphics CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 28 Most Slides from Stephen Chenne Finish Color space Toda 3D Transforms and Coordinate sstem Reading: Shirle ch 6 RGB and HSV Green(,,)

More information

Image Formation. 2. Camera Geometry. Focal Length, Field Of View. Pinhole Camera Model. Computer Vision. Zoltan Kato

Image Formation. 2. Camera Geometry. Focal Length, Field Of View. Pinhole Camera Model. Computer Vision. Zoltan Kato Image Formation 2. amera Geometr omuter Vision oltan Kato htt://www.in.u-seged.hu/~kato seged.hu/~kato/ 3D Scene Surace Light (Energ) Source inhole Lens Imaging lane World Otics Sensor Signal amera: Sec

More information

CMSC 425: Lecture 16 Motion Planning: Basic Concepts

CMSC 425: Lecture 16 Motion Planning: Basic Concepts : Lecture 16 Motion lanning: Basic Concets eading: Today s material comes from various sources, including AI Game rogramming Wisdom 2 by S. abin and lanning Algorithms by S. M. LaValle (Chats. 4 and 5).

More information

3D Geometry and Camera Calibration

3D Geometry and Camera Calibration 3D Geometr and Camera Calibration 3D Coordinate Sstems Right-handed vs. left-handed 2D Coordinate Sstems ais up vs. ais down Origin at center vs. corner Will often write (u, v) for image coordinates v

More information

Perception of Shape from Shading

Perception of Shape from Shading 1 Percetion of Shae from Shading Continuous image brightness variation due to shae variations is called shading Our ercetion of shae deends on shading Circular region on left is erceived as a flat disk

More information

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

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6 Math background 2D Geometric Transformations CS 4620 Lecture 6 Read: Chapter 2: Miscellaneous Math Chapter 5: Linear Algebra Notation for sets, functions, mappings Linear transformations Matrices Matrix-vector

More information

Vector Algebra Transformations. Lecture 4

Vector Algebra Transformations. Lecture 4 Vector Algebra Transformations Lecture 4 Cornell CS4620 Fall 2008 Lecture 4 2008 Steve Marschner 1 Geometry A part of mathematics concerned with questions of size, shape, and relative positions of figures

More information

CSE4421/5324: Introduction to Robotics

CSE4421/5324: Introduction to Robotics CSE442/5324: Introduction to Robotics Contact Information Burton Ma Lassonde 246 burton@cse.yorku.ca EECS442/5324 lectures Monday, Wednesday, Friday :3-2:3PM (SLH C) Lab Thursday 2:3-2:3, Prism 4 Lab 2

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical descriptions of geometric changes,

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Computer Graphics Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical

More information

Computer Graphics. Computer Graphics. Lecture 3 Line & Circle Drawing

Computer Graphics. Computer Graphics. Lecture 3 Line & Circle Drawing Comuter Grahics Comuter Grahics Lecture 3 Line & Circle Drawing Comuter Grahics Towards the Ideal Line We can onl do a discrete aroimation Illuminate iels as close to the true ath as ossible, consider

More information

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

1. We ll look at: Types of geometrical transformation. Vector and matrix representations Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Tob.Howard@manchester.ac.uk Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations

More information

Modeling Transformations Revisited

Modeling Transformations Revisited Modeling Transformations Revisited Basic 3D Transformations Translation Scale Shear Rotation 3D Transformations Same idea as 2D transformations o Homogeneous coordinates: (,,z,w) o 44 transformation matrices

More information

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1 Foundations of Computer Graphics Homogeneous Coordinates Start doing HW 1 To Do Specifics of HW 1 Last lecture covered basic material on transformations in 2D Likely need this lecture to understand full

More information

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1 Toda s class Geometric objects and transformations Wednesda, November 7, 27 Computer Graphics - Class 5 Vector operations Review of vector operations needed for working in computer graphics adding two

More information

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications CSE328 Fundamentals of Computer Graphics: Theor, Algorithms, and Applications Hong in State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794-44 Tel: (63)632-845; Fa:

More information

CS F-07 Objects in 2D 1

CS F-07 Objects in 2D 1 CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for

More information

Geometric Transformations

Geometric Transformations Geometric Transformations CS 4620 Lecture 9 2017 Steve Marschner 1 A little quick math background Notation for sets, functions, mappings Linear and affine transformations Matrices Matrix-vector multiplication

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Overview Ra-Tracing so far Modeling transformations Ra Tracing Image RaTrace(Camera camera, Scene scene, int width, int heigh,

More information

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Determining the 2d transformation that brings one image into alignment (registers it) with another. And Last two lectures: Representing an image as a weighted combination of other images. Toda: A different kind of coordinate sstem change. Solving the biggest problem in using eigenfaces? Toda Recognition

More information

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

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionall left blank. 4.10 Concatenation of Transformations 219 in

More information

CT5510: Computer Graphics. Transformation BOCHANG MOON

CT5510: Computer Graphics. Transformation BOCHANG MOON CT5510: Computer Graphics Transformation BOCHANG MOON 2D Translation Transformations such as rotation and scale can be represented using a matrix M.., How about translation? No way to express this using

More information

4. Two Dimensional Transformations

4. Two Dimensional Transformations 4. Two Dimensional Transformations CS362 Introduction to Computer Graphics Helena Wong, 2 In man applications, changes in orientations, sizes, and shapes are accomplished with geometric transformations

More information

Structure from Motion

Structure from Motion 04/4/ Structure from Motion Comuter Vision CS 543 / ECE 549 University of Illinois Derek Hoiem Many slides adated from Lana Lazebnik, Silvio Saverese, Steve Seitz his class: structure from motion Reca

More information

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101 Convex Hulls Helen Cameron Helen Cameron Convex Hulls 1/101 What Is a Convex Hull? Starting Point: Points in 2D y x Helen Cameron Convex Hulls 3/101 Convex Hull: Informally Imagine that the x, y-lane is

More information

CS335 Fall 2007 Graphics and Multimedia. 2D Drawings: Lines

CS335 Fall 2007 Graphics and Multimedia. 2D Drawings: Lines CS335 Fall 007 Grahics and Multimedia D Drawings: Lines Primitive Drawing Oerations Digital Concets of Drawing in Raster Arras PIXEL is a single arra element at x, - No smaller drawing unit exists Px,

More information

2D/3D Geometric Transformations and Scene Graphs

2D/3D Geometric Transformations and Scene Graphs 2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background

More information

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

CS 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 information

Flux Integrals. Solution. We want to visualize the surface together with the vector field. Here s a picture of exactly that:

Flux Integrals. Solution. We want to visualize the surface together with the vector field. Here s a picture of exactly that: Flu Integrals The pictures for problems # - #4 are on the last page.. Let s orient each of the three pictured surfaces so that the light side is considered to be the positie side. Decide whether each of

More information

Chapter 8: Adaptive Networks

Chapter 8: Adaptive Networks Chater : Adative Networks Introduction (.1) Architecture (.2) Backroagation for Feedforward Networks (.3) Jyh-Shing Roger Jang et al., Neuro-Fuzzy and Soft Comuting: A Comutational Aroach to Learning and

More information

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation Simle eamle Analsis of rograms with ointers := 5 tr := @ *tr := 9 := rogram S1 S2 S3 S4 deendences What are the deendences in this rogram? Problem: just looking at variable names will not give ou the correct

More information

Matrix Transformations. Affine Transformations

Matrix Transformations. Affine Transformations Matri ransformations Basic Graphics ransforms ranslation Scaling Rotation Reflection Shear All Can be Epressed As Linear Functions of the Original Coordinates : A + B + C D + E + F ' A ' D 1 B E C F 1

More information

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

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices Computergrafik Matthias Zwicker Universität Bern Herbst 2008 Today Transformations & matrices Introduction Matrices Homogeneous Affine transformations Concatenating transformations Change of Common coordinate

More information

Realtime 3D Computer Graphics Virtual Reality

Realtime 3D Computer Graphics Virtual Reality Realtime 3D Comuter Grahics Virtual Realit Viewing an rojection Classical an General Viewing Transformation Pieline CPU CPU Pol. Pol. DL DL Piel Piel Per Per Verte Verte Teture Teture Raster Raster Frag

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Announcement Assignment 2 has been posted: Due: 10/24 ASAP: Download the code and make sure it compiles» On windows: just build

More information

KAAP686 Mathematics and Signal Processing for Biomechanics. Rotation Matrices William C. Rose ,

KAAP686 Mathematics and Signal Processing for Biomechanics. Rotation Matrices William C. Rose , KAAP686 Mathematics and Signal Processing for Biomechanics Rotation Matrices William C. Rose 20150928, 20170423 Two-dimensional rotation matrices Consider the 2x2 matrices corresonding to rotations of

More information

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates Coordinate Sstems Point Representation in two dimensions Cartesian Coordinates: (; ) Polar Coordinates: (; ) (, ) ρ θ (ρ, θ) Cartesian Coordinates Polar Coordinates p = CPS1, 9: Computer Graphics D Geometric

More information

3D Geometry and Camera Calibration

3D Geometry and Camera Calibration 3D Geometry and Camera Calibration 3D Coordinate Systems Right-handed vs. left-handed x x y z z y 2D Coordinate Systems 3D Geometry Basics y axis up vs. y axis down Origin at center vs. corner Will often

More information

Camera Models. Acknowledgements Used slides/content with permission from

Camera Models. Acknowledgements Used slides/content with permission from Camera Models Acknowledgements Used slides/content with ermission rom Marc Polleeys or the slides Hartley and isserman: book igures rom the web Matthew Turk: or the slides Single view geometry Camera model

More information

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 2 Image Transformations image filtering: change range of image g() T(f())

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points Coordinate Sstems Coordinate sstems used in graphics Screen coordinates: the

More information

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1]

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D A vector is specified b its coordinates, so it is defined relative to a reference frame. The same vector will have different coordinates in

More information

Homogeneous Coordinates

Homogeneous Coordinates COMS W4172 3D Math 2 Steven Feiner Department of Computer Science Columbia Universit New York, NY 127 www.cs.columbia.edu/graphics/courses/csw4172 Februar 1, 218 1 Homogeneous Coordinates w X W Y X W Y

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theor, Algorithms, and Applications Hong Qin State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794--44 Tel: (63)632-845; Fa: (63)632-8334 qin@cs.sunsb.edu

More information

λ = What About Elementary Inverses? Transformations II Scale Inverse Shear Inverse λ = λ 0 1 CS Scale Shear CS5600 Computer Graphics by

λ = What About Elementary Inverses? Transformations II Scale Inverse Shear Inverse λ = λ 0 1 CS Scale Shear CS5600 Computer Graphics by Lecture Set 6 Transformations II CS56 Comuter Grahics b Rich Riesenfeld March 23 Scale Shear What About Elementar Inverses? Rotation Translation CS56 2 Scale Inverse Shear Inverse λ λ λ λ CS56 3 b a b

More information

Notes. University of British Columbia

Notes. University of British Columbia Notes Drop-bo is no. 14 You can hand in our assignments Assignment 0 due Fri. 4pm Assignment 1 is out Office hours toda 16:00 17:00, in lab or in reading room Uniersit of Uniersit of Chapter 4 - Reminder

More information

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship? Utah School of Computing Fall 25 Transformations II CS46 Computer Graphics From Rich Riesenfeld Fall 25 Arbitrar 3D Rotation What is its inverse? What is its transpose? Can we constructivel elucidate this

More information

GEOMETRIC TRANSFORMATIONS AND VIEWING

GEOMETRIC TRANSFORMATIONS AND VIEWING GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways. Grade 9 IGCSE A1: Chapter 9 Matrices and Transformations Materials Needed: Straightedge, Graph Paper Exercise 1: Matrix Operations Matrices are used in Linear Algebra to solve systems of linear equations.

More information

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics : Lecture Basics of Skeletal Animation and Kinematics Reading: Chapt of Gregor, Game Engine Architecture. The material on kinematics is a simplification of similar concepts developed in the field of robotics,

More information

CS 548: COMPUTER GRAPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 2015 DR. MICHAEL J. REALE

CS 548: COMPUTER GRAPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 2015 DR. MICHAEL J. REALE CS 548: COMPUTER GRPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 05 DR. MICHEL J. RELE NOTE: COUNTERCLOCKWISE ORDER ssuming: Right-handed sstem Vertices in counterclockwise order looking at front of polgon

More information

Kinematics. Why inverse? The study of motion without regard to the forces that cause it. Forward kinematics. Inverse kinematics

Kinematics. Why inverse? The study of motion without regard to the forces that cause it. Forward kinematics. Inverse kinematics Kinematics Inverse kinematics The study of motion without regard to the forces that cause it Forward kinematics Given a joint configuration, what is the osition of an end oint on the structure? Inverse

More information

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

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms Chapter IV Spaces and Transforms Scaling 2D scaling with the scaling factors, s x and s y, which are independent. Examples When a polygon is scaled, all of its vertices are processed by the same scaling

More information

Homographies and Mosaics

Homographies and Mosaics Tri reort Homograhies and Mosaics Jeffrey Martin (jeffrey-martin.com) CS94: Image Maniulation & Comutational Photograhy with a lot of slides stolen from Alexei Efros, UC Berkeley, Fall 06 Steve Seitz and

More information

Last time: Disparity. Lecture 11: Stereo II. Last time: Triangulation. Last time: Multi-view geometry. Last time: Epipolar geometry

Last time: Disparity. Lecture 11: Stereo II. Last time: Triangulation. Last time: Multi-view geometry. Last time: Epipolar geometry Last time: Disarity Lecture 11: Stereo II Thursday, Oct 4 CS 378/395T Prof. Kristen Grauman Disarity: difference in retinal osition of same item Case of stereo rig for arallel image lanes and calibrated

More information

Chapter 3: Graphics Output Primitives. OpenGL Line Functions. OpenGL Point Functions. Line Drawing Algorithms

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

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

Last week. Machiraju/Zhang/Möller/Fuhrmann Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 26 Image Warping image filtering: change range of image g() T(f()) f T f image

More information

Computer Graphics. Viewing. Fundamental Types of Viewing. Perspective views. Parallel views. October 12, finite COP (center of projection)

Computer Graphics. Viewing. Fundamental Types of Viewing. Perspective views. Parallel views. October 12, finite COP (center of projection) Comuter Grahics Viewing October 2, 25 htt://www.hallm.ac.kr/~sunkim/teach/25/cga Funamental Tes of Viewing Persective views finite COP (center of rojection) Parallel views COP at infinit DOP (irection

More information

Homework 5: Transformations in geometry

Homework 5: Transformations in geometry Math 21b: Linear Algebra Spring 2018 Homework 5: Transformations in geometry This homework is due on Wednesday, February 7, respectively on Thursday February 8, 2018. 1 a) Find the reflection matrix at

More information

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker)

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker) Viewing in 3D (Chapt. 6 in FVD, Chapt. 2 in Hearn & Baker) Viewing in 3D s. 2D 2D 2D world Camera world 2D 3D Transformation Pipe-Line Modeling transformation world Bod Sstem Viewing transformation Front-

More information

3D Computer Vision Camera Models

3D Computer Vision Camera Models 3D Comuter Vision Camera Models Nassir Navab based on a course given at UNC by Marc Pollefeys & the book Multile View Geometry by Hartley & Zisserman July 2, 202 chair for comuter aided medical rocedures

More information

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

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL Chapter 5 Geometric Transformations Somsak Walairacht, Computer Engineering, KMITL 1 Outline Basic Two-Dimensional Geometric Transformations Matrix Representations and Homogeneous Coordinates Inverse Transformations

More information

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1 Fondations of Compter Graphics (Fall 212) CS 184, Lectre 3: Transformations 1 http://inst.eecs.berkele.ed/~cs184 Sbmit HW b To Do Start looking at HW 1 (simple, bt need to think) Ais-angle rotation and

More information

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala) 3D Transformations CS 4620 Lecture 10 1 Translation 2 Scaling 3 Rotation about z axis 4 Rotation about x axis 5 Rotation about y axis 6 Properties of Matrices Translations: linear part is the identity

More information

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER GEOMETRIC CONSTRAINT SOLVING IN < AND < 3 CHRISTOPH M. HOFFMANN Deartment of Comuter Sciences, Purdue University West Lafayette, Indiana 47907-1398, USA and PAMELA J. VERMEER Deartment of Comuter Sciences,

More information

CS4620/5620. Professor: Kavita Bala. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

CS4620/5620. Professor: Kavita Bala. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner) CS4620/5620 Affine and 3D Transformations Professor: Kavita Bala 1 Announcements Updated schedule on course web page 2 Prelim days finalized and posted Oct 11, Nov 29 No final exam, final project will

More information

Cross products Line segments The convex combination of two distinct points p

Cross products Line segments The convex combination of two distinct points p CHAPTER Comutational Geometry Is the branch of comuter science that studies algorithms for solving geometric roblems. Has alications in many fields, including comuter grahics robotics, VLSI design comuter

More information

CS354 Computer Graphics Rotations and Quaternions

CS354 Computer Graphics Rotations and Quaternions Slide Credit: Don Fussell CS354 Computer Graphics Rotations and Quaternions Qixing Huang April 4th 2018 Orientation Position and Orientation The position of an object can be represented as a translation

More information

Objectives. Geometry. Basic Elements. Coordinate-Free Geometry. Transformations to Change Coordinate Systems. Scalars

Objectives. Geometry. Basic Elements. Coordinate-Free Geometry. Transformations to Change Coordinate Systems. Scalars Objecties Geometry CS 432 Interactie Computer Graphics Prof. Daid E. Breen Department of Computer Science Introduce the elements of geometry - Scalars - Vectors - Points Deelop mathematical operations

More information

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11 3D Transformations CS 4620 Lecture 11 1 Announcements A2 due tomorrow Demos on Monday Please sign up for a slot Post on piazza 2 Translation 3 Scaling 4 Rotation about z axis 5 Rotation about x axis 6

More information

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University Computer Graphics P4 Transformations Aleksandra Pizurica Ghent Universit Telecommunications and Information Processing Image Processing and Interpretation Group Transformations in computer graphics Goal:

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Spring 2 Image Transformations image filtering: change range of image g() = T(f())

More information

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll Image Warping Man slides from Alosha Efros + Steve Seitz Photo b Sean Carroll Morphing Blend from one object to other with a series of local transformations Image Transformations image filtering: change

More information

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

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016 Lecture 4: Transforms Computer Graphics CMU 15-462/15-662, Fall 2016 Brief recap from last class How to draw a triangle - Why focus on triangles, and not quads, pentagons, etc? - What was specific to triangles

More information

Introduction to Homogeneous Transformations & Robot Kinematics

Introduction to Homogeneous Transformations & Robot Kinematics Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Ka Rowan Universit Computer Science Department. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

More information

Geometric Model of Camera

Geometric Model of Camera Geometric Model of Camera Dr. Gerhard Roth COMP 42A Winter 25 Version 2 Similar Triangles 2 Geometric Model of Camera Perspective projection P(X,Y,Z) p(,) f X Z f Y Z 3 Parallel lines aren t 4 Figure b

More information

Trigonometric Functions

Trigonometric Functions Similar Right-Angled Triangles Trigonometric Functions We lan to introduce trigonometric functions as certain ratios determined by similar right-angled triangles. By de nition, two given geometric gures

More information

Image Metamorphosis By Affine Transformations

Image Metamorphosis By Affine Transformations Image Metamorphosis B Affine Transformations Tim Mers and Peter Spiegel December 16, 2005 Abstract Among the man was to manipulate an image is a technique known as morphing. Image morphing is a special

More information

Image Warping (Szeliski Sec 2.1.2)

Image Warping (Szeliski Sec 2.1.2) Image Warping (Szeliski Sec 2..2) http://www.jeffre-martin.com CS94: Image Manipulation & Computational Photograph Aleei Efros, UC Berkele, Fall 7 Some slides from Steve Seitz Image Transformations image

More information

Announcements. Equation of Perspective Projection. Image Formation and Cameras

Announcements. Equation of Perspective Projection. Image Formation and Cameras Announcements Image ormation and Cameras Introduction to Computer Vision CSE 52 Lecture 4 Read Trucco & Verri: pp. 22-4 Irfanview: http://www.irfanview.com/ is a good Windows utilit for manipulating images.

More information

Scene Graphs & Modeling Transformations COS 426

Scene Graphs & Modeling Transformations COS 426 Scene Graphs & Modeling Transformations COS 426 3D Object Representations Points Range image Point cloud Surfaces Polgonal mesh Subdivision Parametric Implicit Solids Voels BSP tree CSG Sweep High-level

More information

Dr Pavan Chakraborty IIIT-Allahabad

Dr Pavan Chakraborty IIIT-Allahabad GVC-43 Lecture - 5 Ref: Donald Hearn & M. Pauline Baker, Comuter Grahics Foley, van Dam, Feiner & Hughes, Comuter Grahics Princiles & Practice Dr Pavan Chakraborty IIIT-Allahabad Summary of line drawing

More information

521493S Computer Graphics Exercise 3 (Chapters 6-8)

521493S Computer Graphics Exercise 3 (Chapters 6-8) 521493S Comuter Grahics Exercise 3 (Chaters 6-8) 1 Most grahics systems and APIs use the simle lighting and reflection models that we introduced for olygon rendering Describe the ways in which each of

More information

MEM380 Applied Autonomous Robots Winter Robot Kinematics

MEM380 Applied Autonomous Robots Winter Robot Kinematics MEM38 Applied Autonomous obots Winter obot Kinematics Coordinate Transformations Motivation Ultimatel, we are interested in the motion of the robot with respect to a global or inertial navigation frame

More information

Lecture 9: Transformations. CITS3003 Graphics & Animation

Lecture 9: Transformations. CITS3003 Graphics & Animation Lecture 9: Transformations CITS33 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 212 Objectives Introduce standard transformations Rotation Translation Scaling

More information

CS Computer Graphics: Transformations & The Synthetic Camera

CS Computer Graphics: Transformations & The Synthetic Camera CS 543 - Computer Graphics: Transformations The Snthetic Camera b Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Introduction to Transformations A transformation changes an objects Size

More information

Computer Graphics: Geometric Transformations

Computer Graphics: Geometric Transformations Computer Graphics: Geometric Transformations Geometric 2D transformations By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic 2D transformations 2. Matrix Representation of 2D transformations

More information

Linear and Affine Transformations Coordinate Systems

Linear and Affine Transformations Coordinate Systems Linear and Affine Transformations Coordinate Systems Recall A transformation T is linear if Recall A transformation T is linear if Every linear transformation can be represented as matrix Linear Transformation

More information

Honors Advanced Math More on Determinants, Transformations and Systems 14 May 2013

Honors Advanced Math More on Determinants, Transformations and Systems 14 May 2013 Honors Advanced Math Name: More on Determinants, Transformations and Sstems 14 Ma 013 Directions: The following problems are designed to help develop connections between determinants, sstems of equations

More information

Section 4.3 Trigonometry Extended: The Circular Functions

Section 4.3 Trigonometry Extended: The Circular Functions Section. Trigonometr Etended: The Circular Functions 9 7. False. This is onl true if is an acute angle in a right triangle. (Then it is true b definition.) 8. False. The larger the angle of a triangle,

More information

Objectives. Geometry. Coordinate-Free Geometry. Basic Elements. Transformations to Change Coordinate Systems. Scalars

Objectives. Geometry. Coordinate-Free Geometry. Basic Elements. Transformations to Change Coordinate Systems. Scalars Objecties Geometry CS Interactie Computer Graphics Prof. Daid E. Breen Department of Computer Science Introduce the elements of geometry - Scalars - Vectors - Points Deelop mathematical operations among

More information