Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Size: px
Start display at page:

Download "Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University"

Transcription

1 Computer Graphics P4 Transformations Aleksandra Pizurica Ghent Universit Telecommunications and Information Processing Image Processing and Interpretation Group

2 Transformations in computer graphics Goal: introduce methodolog to Change coordinate sstem Move and deform objects Principle: transformations are applied to object vertices In 2D, point P(X,Y) is transformed to P (X,Y ); in 3D, P(X,Y,Z) P (X,Y,Z ) P4_2

3 Overview 2D transformations 3D transformations Quaternions Transformations in OpenGL P4_3

4 2D transformations

5 2D affine transformations Translate Shear Rotate Scale P4_5

6 Basic classes of geometric transformations General linear (preserve lines) Affine (preserve paralelism) Arbitrar shearing General scaling Conformal (preserve angles) Uniform scaling Rigid (preserve lengths) Translation Rotation P4_6

7 Elementar 2D transformations Translation T(T,T ) X X + T X Y Y + T Scaling S(S,S ) X X * S X Y Y * S Y Rotation R(θ) X X * cosθ Y*sinθ Y X * sinθ + Y*cosθ P4_7

8 Matri representation P4_8 Suppose we represent a 2D transformation b a matri d c b a d c b a + + transformed point transformation matri original point l k j i h g f e d c b a Wh is this useful? -A sequence of transformations matri multiplication Can we do it for an affine transform?

9 22 Matrices Which transformations can be represented b 22 matrices? -Lets look at some eamples: P4_9 S S 2D scale around (,) S S 2D identit 2D mirror over (,) - - 2D mirror over Y ais -

10 22 Matrices Which transformations can be represented b 22 matrices? -Lets look at some eamples: 2D rotation around (,) * cosθ *sinθ * sinθ+ *cosθ cosθ sinθ sinθ cosθ 2D Shear + H X * + H Y * H H P4_

11 22 Matrices Which transformations can be represented b 22 matrices? -Can we represent translation b a 22 matri? 2D Translation + T + T NO 22 matri! Onl linear2d transformations can be represented b a 22 matri Linear transformations satisf: T(s P +s 2 P 2 )s T (P )+s 2 T(P 2 ) are combinations of scale, rotation, share and mirror P4_

12 Matri representation for affine 2D transforms We want a representation where 2D translation is also represented b a matri (so that we can easil combine different transformations b multiplication) 2D matri representation of translation does not eist! What do we do? Solution: use a 33 matri 2D Translation + T + T T T Homogeneous coordinates P4_2

13 Homogeneous coordinates An equivalent formulation: adding a 3 rd coordinate to 2D point such that (, ) (W, W, W) (/W, /W) are Cartesian coordinates of the homogeneous point (,, W) (,, ) represents a point at infinit (,, ) not allowed 3 (2,3,) or (4,6,2) or (6,9,3) or W 2 (3,,) or (6,2,2) or Homogeneous point is a line in 3D space P4_3

14 Homogeneous coordinates Even points infinitel far have a representation in homogeneous coordinates Points at infinit have their last coordinate equal to zero Eamples: P (,,); P 2 (,,); P 3 (,,), P 4 (2,,) P P 2 P 4 P P4_4

15 Matri form of elementar 2D transformations P4_5 T T Translation T(T,T ) S S Scaling S(S,S ) cos sin sin cos θ θ θ θ Rotation R(θ)

16 2D Shear transformation P4_6 H H General shear operation SH (H,H) Shear in the X-direction: H a SH b SH Shear in the Y-direction: H Shear can be represented as a combination of rotations and nonuniform scaling operations.

17 Compositions of 2D transformations Translate Rotate Eample: A comple transformation as a sequence of elementar transformations P4_7

18 Compositions of 2D transformations Inverse elementar transforms T - (T X, T Y ) T (-T X, -T Y ) S - (S X, S Y ) S (/S X, /S Y ) R - (θ) R (-θ) Comple transformations can be described as a combination (composition) of elementar transformations (X, Y,) T S (-) R (-) T (-) R (-) S (-) (X, Y, ) T Each rotation brings an etra parameter, scaling and translations two etra parameters Can this be simplified? P4_8

19 Compositions of 2D transformations We tr to simplif such epressions b Combining transformations, if possible Changing the order of transformations in order to make the combinations possible Sequential elementar transforms of the same tpe absorb each other T (T X, T Y ) T (T X2, T Y2 ) T (T X +T X2, T Y +T Y2 ) S (S X, S Y ) S (S X2, S Y2 ) S (S X.S X2, S Y.S Y2 ) R (θ ) R (θ 2 ) R (θ +θ 2 ) Changing transformation order is not alwas possible! Transformations that commute are onl Two elementar transformations of the same tpe Scaling with S S and Rotation P4_9

20 Compositions of 2D transformations Translation and rotation pseudo-commute T (T X,T Y ) R (θ) R (θ) T (T X2,T Y2 ) T (T X2,T Y2 ) R (θ) R (θ) T (T X,T Y ) P4_2

21 Compositions of 2D transformations Translation and scaling pseudo-commute S (S X, S Y ) T (T X,T Y ) T (T X2,T Y2 ) S (S X, S Y ) T(T X,T Y ) S(.5,3.) S (.5,3.) T (T X2,T Y2 ) No similar propert for rotation and scaling P4_2

22 Compositions of 2D transformations Hpothesis: Most general affine transform can alwas be represented as R(θ ) S (S X, S Y ) R(θ 2 ) T(T X,T Y ) This means: a unit square in the centre is reshaped to an arbitrar parallelogram, brought to an arbitrar position and rotated b an arbitrar angle Prove the hpothesis formall X ax + by + c Y dx + ey + f Set ct, ft Determine the parameters θ, θ 2, S X, S Y as a function of a, b, d, e P4_22

23 Efficienc: matri calculations The most general affine transformation P4_23 f e d c b a Multiplication of a 33 matri with column vector requires 9 multiplies and 6 additions Actuall we need onl 4 multiplies and 4 additions X ax + by + c Y dx + ey + f Even though matri representation is useful, practical application should make use of the special structure of the matri, for efficienc

24 Efficienc: creating successive views To produce an impression of a dnamicall rotating object, man successive views are needed *cosθ *sinθ *sinθ+ *cosθ The angle difference between the successive views is ver small (a few degrees). Can we simplif the calculation? Solution : Use approimation cosθ : *sinθ *sinθ+ What is wrong with this solution? A better solution *sinθ *sinθ+ Check the determinant of the matri in both cases! P4_24

25 3D transformations

26 3-D Transformations Generalization of 2D transformations Same principle: appl to vertices (which are now 3D points) P(X,Y,Z) is transformed to P (X,Y,Z ) We consider general 3D affine transformation X ax + by + cz + d Y ex + fy + gz + h Z ix + jy + kz + l Properties analogous to 2D case Lines map to lines (plane segments map to plane segments) Parallelism preserved A unit cube centered in the origin is transformed into an arbitrar parallelepiped, arbitraril positioned in space P4_26

27 3D transformations Convention that we will adopt: Right-hand side sstem z z z P4_27

28 3D rotation 3D rotation of a rigid object is described b three parameters, such as three angles of Euler In Euler angle formulation an arbitrar rotation is represented as a composition of three elemental rotations, each around a single coordinate ais P4_28

29 3D rotation The rotations around, and z ais are also known as Roll, Pitch and Yaw ( heading ); terms coming from flight dnamics Pitch Yaw Longitudinal Roll Vertica Lateral P4_29

30 3D transformations Three elementar transforms Elementar translation Three elementar rotations Around the X-ais, Y-ais and Z-ais Elementar scaling In X-, Y-, en Z-direction Matri representation 4 4 matrices for 3-D, analogous to 3 3 matrices for 2-D using homogeneous coordinates W W ; Wz z W usual notation W : z z Each point in 3D space a line throught the origin in 4D space P4_3

31 3D Translation and Scaling Translation P4_3 T (T X, T Y, T Z ) z T T T z z X X + T X Y Y + T Y Z Z + T Z Elementar scaling S (S X, S Y, S Z ) z S S S z Y Y X X S X X Y S Y Y Z S Z Z

32 3D Rotation Rotation around -ais P4_32 cos sin sin cos θ θ θ θ R X (θ) R Y (ϕ) R Z (ψ) cos sin sin cos ϕ ϕ ϕ ϕ cos sin sin cos ψ ψ ψ ψ X X Y Y cos(θ) -Z sin(θ) Z Y sin(θ) + Z cos(θ Similarl for rotations around other two aes:

33 3D Shear Shear around the Z-ais X X + H X Z Y Y + H Y Z Z Z Can be represented in matri form as P4_33 z H H z Shear around the X-ais and Y-ais have a similar form

34 3D Transformations: properties Inverse transforms are defined as T - (T X, T Y, T Z ) T (-T X, -T Y, -T Z ) S - (S X, S Y, S Z ) S (/S X, /S Y, /S Z ) R X - (θ) R X (-θ); R Y - (φ) R Y (-φ); R Z - (ψ) R X (-ψ) The same absorption and pseudo-commutation are valid like in the 2D case Translation pseudo-commutes with scaling and with three rotations Scaling and rotations do not pseudo-commute Additional properties, specific for 3D (without proof) Two (different) rotations do not pseudo-commute (not even with an additional translation) Three (different) rotations and a translation do pseudo commute P4_34

35 3D Transformations: properties z. A general positioning transformation involves 6 parameters T (T X, T Y, T Z ) R X (θ) R Y (φ) R Z (ψ) Object deformation: 6 other parameters (scaling + rotation) A general affine transformation involves thus 2 parameters R X (θ) R Y (φ) R Z (ψ) S (S X,S Y,S Z ) R X (θ ) R Y (φ ) R Z (ψ ) T (T X,T Y,T Z ) There are man equivalent forms P4_35

36 Arbitrar displacement in 3D C B See eercises A C z Initial position z B A Desired position z C A () B B z C A (2) A z B C (3) C z B A (4) P4_36

37 Compositions of 3D transformations Rotation about arbitrar point: in this eample about z-ais From the book of Edward Angel: Interactive Computer Graphics A Top-Down Approach Using OpenGL P4_37

38 Quaternions and 3D rotation

39 Comple numbers and rotation Remember polar representation of a comple number c a + ib re iθ 2 r a + b 2, θ arctan( b / a) Denotebc the resultof rotatingc aboutthe originb φ: c re iθ iφ i( θ + φ) e re Quaternions (Sir William Rowan Hamilton, 843) are etensions of comple numbers in 3D, ielding elegant rotations in 3D a ( q, q); q qi + q2j + q3k i j k ijk P4_39

40 Comple numbers and rotation A point in space p (, p) Rotationof the point p b θaboutthe vector v: where: θ θ r cos, sin v, 2 2 p rpr θ cos, sin 2 θ v 2 Whare quaternionsinterestingfor3drotationsin computer graphics? Euler angle representation suffers from Gimbal lock Simpler representation Lower computational compleit, but not necessaril after conversion to matri form r P4_4

41 Gimbal lock When the aes of two of the three gimbals align, "locking" into rotation in a degenerate 2D space. Eample: when the pitch (green) and aw (magenta) gimbals become aligned, changes to roll (blue) and aw appl the same rotation to the airplane. P4_4

42 Transformations in OpenGL

43 OpenGL function format function name dimensions glverte3f(,,z) belongs to GL librar,,z are floats glverte3fv(p) pis a pointer to an arra Angel: Interactive Computer Graphics 4E Addison-Wesle 25 P4_43

44 Transformations in OpenGL We canloadmatri withthe function glloadmatri(pointer_to_matri) Orset a matri to identitmatri withthe function glloadidentit() Rotation, translation and scaling are provided through glrotatef(angle,v,v,vz) gltranslatef(d,d,dz) glscalef(s,s,sz) P4_44

45 Summar 2D transformations arbitrar 2D affine transformation 6 parameters comple transformations as compositions of the elementar ones 3D transformations arbitrar 3D affine transformation 2 parameters comple transformations as compositions of the elementar ones Euler angles Quaternions advantage over Euler angle representation (Gimbal lock avoided) Transformations in OpenGL P4_45

Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons

Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons Transforma3ons in computer graphics omputer Graphics Transforma3ons leksandra Piurica Goal: introduce methodolog to hange coordinate sstem Move and deform objects Principle: transforma3ons are applied

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

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

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

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

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

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

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

(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

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

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

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

Modeling Transformations

Modeling Transformations Transformations Transformations Specif transformations for objects o Allos definitions of objects in on coordinate sstems o Allos use of object definition multiple times in a scene Adam Finkelstein Princeton

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allos definitions of objects in on coordinate sstems Allos use

More information

How is project #1 going?

How is project #1 going? How is project # going? Last Lecture Edge Detection Filtering Pramid Toda Motion Deblur Image Transformation Removing Camera Shake from a Single Photograph Rob Fergus, Barun Singh, Aaron Hertzmann, Sam

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

Image Warping CSE399b, Spring 07 Computer Vision

Image Warping CSE399b, Spring 07 Computer Vision Image Warping CSE399b, Spring 7 Computer Vision http://maps.a9.com http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html Autostiching on A9.com

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

Modeling Transformations שיעור 3 גרפיקה ממוחשבת תשס"ח ב ליאור שפירא Modeling Transformations Heavil based on: Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allows

More information

Transformations II. Week 2, Wed Jan 17

Transformations II. Week 2, Wed Jan 17 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munzner Transformations II Week 2, Wed Jan 7 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

Chapter 3 : Computer Animation

Chapter 3 : Computer Animation Chapter 3 : Computer Animation Histor First animation films (Disne) 30 drawings / second animator in chief : ke frames others : secondar drawings Use the computer to interpolate? positions orientations

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

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

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

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

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

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

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University 2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Extract features from an image what do we do next? Feature matching (object recognition, 3D reconstruction, augmented

More information

Computer Graphics Geometric Transformations

Computer Graphics Geometric Transformations Computer Graphics 2016 6. Geometric Transformations Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-10-31 Contents Transformations Homogeneous Co-ordinates Matrix Representations of Transformations

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

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

Editing and Transformation

Editing and Transformation Lecture 5 Editing and Transformation Modeling Model can be produced b the combination of entities that have been edited. D: circle, arc, line, ellipse 3D: primitive bodies, etrusion and revolved of a profile

More information

Last Lecture. Edge Detection. Filtering Pyramid

Last Lecture. Edge Detection. Filtering Pyramid Last Lecture Edge Detection Filtering Pramid Toda Motion Deblur Image Transformation Removing Camera Shake from a Single Photograph Rob Fergus, Barun Singh, Aaron Hertzmann, Sam T. Roweis and William T.

More information

High Dimensional Rendering in OpenGL

High Dimensional Rendering in OpenGL High Dimensional Rendering in OpenGL Josh McCo December, 2003 Description of Project Adding high dimensional rendering capabilit to the OpenGL graphics programming environment is the goal of this project

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

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is. Interactive Computer Graphics Warping and morphing Lecture 14+15: Warping and Morphing Lecture 14: Warping and Morphing: Slide 1 Lecture 14: Warping and Morphing: Slide 2 Warping and Morphing What is Warping

More information

Rotation and Orientation: Fundamentals. Perelyaev Sergei VARNA, 2011

Rotation and Orientation: Fundamentals. Perelyaev Sergei VARNA, 2011 Rotation and Orientation: Fundamentals Perelyaev Sergei VARNA, 0 What is Rotation? Not intuitive Formal definitions are also confusing Many different ways to describe Rotation (direction cosine) matri

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

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

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

Transformations. Examples of transformations: shear. scaling

Transformations. Examples of transformations: shear. scaling Transformations Eamples of transformations: translation rotation scaling shear Transformations More eamples: reflection with respect to the y-ais reflection with respect to the origin Transformations Linear

More information

Transformations III. Week 2, Fri Jan 19

Transformations III. Week 2, Fri Jan 19 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 2007 Tamara Munzner Transformations III Week 2, Fri Jan 9 http://www.ugrad.cs.ubc.ca/~cs34/vjan2007 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

Transformations Week 9, Lecture 18

Transformations Week 9, Lecture 18 CS 536 Computer Graphics Transformations Week 9, Lecture 18 2D Transformations David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 3 2D Affine Transformations

More information

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices Uses of Transformations 2D transformations Homogeneous coordinates odeling: position and resie parts of a comple model; Viewing: define and position the virtual camera Animation: define how objects move/change

More information

3D Kinematics. Consists of two parts

3D Kinematics. Consists of two parts D Kinematics Consists of two parts D rotation D translation The same as D D rotation is more complicated than D rotation (restricted to z-ais) Net, we will discuss the treatment for spatial (D) rotation

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

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

CS612 - Algorithms in Bioinformatics

CS612 - Algorithms in Bioinformatics Fall 2017 Structural Manipulation November 22, 2017 Rapid Structural Analysis Methods Emergence of large structural databases which do not allow manual (visual) analysis and require efficient 3-D search

More information

CMSC 425: Lecture 6 Affine Transformations and Rotations

CMSC 425: Lecture 6 Affine Transformations and Rotations CMSC 45: Lecture 6 Affine Transformations and Rotations Affine Transformations: So far we have been stepping through the basic elements of geometric programming. We have discussed points, vectors, and

More information

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h Image warping Image warping image filtering: change range of image g() () = h(f()) h(f()) f h g h()=0.5+0.5 image warping: change domain of image g() = f(h()) f h g h([,])=[,/2] Parametric (global) warping

More information

Warping, Morphing and Mosaics

Warping, Morphing and Mosaics Computational Photograph and Video: Warping, Morphing and Mosaics Prof. Marc Pollefes Dr. Gabriel Brostow Toda s schedule Last week s recap Warping Morphing Mosaics Toda s schedule Last week s recap Warping

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

2D and 3D Coordinate Systems and Transformations

2D and 3D Coordinate Systems and Transformations Graphics & Visualization Chapter 3 2D and 3D Coordinate Systems and Transformations Graphics & Visualization: Principles & Algorithms Introduction In computer graphics is often necessary to change: the

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

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

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

2D transformations and homogeneous coordinates

2D transformations and homogeneous coordinates 2D transformations and homogeneous coordinates Dr Nicolas Holzschuch Universit of Cape Ton e-mail: holzschu@cs.uct.ac.za Map of the lecture Transformations in 2D: vector/matri notation eample: translation,

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

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll Image Warping 9/28/7 Man slides from Alosha Efros + Steve Seitz Computational Photograph Derek Hoiem, Universit of Illinois Photo b Sean Carroll Reminder: Proj 2 due monda Much more difficult than project

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

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017 CS 277: Intro to Computer Vision Multiple Views Prof. Adriana Kovashka Universit of Pittsburgh March 4, 27 Plan for toda Affine and projective image transformations Homographies and image mosaics Stereo

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

Transforms. COMP 575/770 Spring 2013

Transforms. COMP 575/770 Spring 2013 Transforms COMP 575/770 Spring 2013 Transforming Geometry Given any set of points S Could be a 2D shape, a 3D object A transform is a function T that modifies all points in S: T S S T v v S Different transforms

More information

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex Shoemake, Quaternions Tutorial Reading Topics in Articulated Animation 2 Articulated models: rigid parts connected by joints Animation They can be animated by specifying the joint angles (or other display

More information

Name: [20 points] Consider the following OpenGL commands:

Name: [20 points] Consider the following OpenGL commands: Name: 2 1. [20 points] Consider the following OpenGL commands: glmatrimode(gl MODELVIEW); glloadidentit(); glrotatef( 90.0, 0.0, 1.0, 0.0 ); gltranslatef( 2.0, 0.0, 0.0 ); glscalef( 2.0, 1.0, 1.0 ); What

More information

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Parameterizing Rotations Straightforward in 2D A scalar, θ, represents rotation in plane More complicated in 3D Three scalars

More information

1/29/13. Computer Graphics. Transformations. Simple Transformations

1/29/13. Computer Graphics. Transformations. Simple Transformations /29/3 Computer Graphics Transformations Simple Transformations /29/3 Contet 3D Coordinate Sstems Right hand (or counterclockwise) coordinate sstem Left hand coordinate sstem Not used in this class and

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

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective Department of Computing and Information Systems The Lecture outline Introduction Rotation about artibrary axis

More information

More on Transformations. COS 426, Spring 2019 Princeton University

More on Transformations. COS 426, Spring 2019 Princeton University More on Transformations COS 426, Spring 2019 Princeton Universit Agenda Grab-bag of topics related to transformations: General rotations! Euler angles! Rodrigues s rotation formula Maintaining camera transformations!

More information

CS4670: Computer Vision

CS4670: Computer Vision CS467: Computer Vision Noah Snavely Lecture 8: Geometric transformations Szeliski: Chapter 3.6 Reading Announcements Project 2 out today, due Oct. 4 (demo at end of class today) Image alignment Why don

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

Modeling Transformations

Modeling Transformations Modeling Transformations Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Connelly Barnes, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam Finkelstein and David Dobkin Modeling Transformations

More information

4.7 INVERSE TRIGONOMETRIC FUNCTIONS

4.7 INVERSE TRIGONOMETRIC FUNCTIONS Section 4.7 Inverse Trigonometric Functions 4 4.7 INVERSE TRIGONOMETRIC FUNCTIONS NASA What ou should learn Evaluate and graph the inverse sine function. Evaluate and graph the other inverse trigonometric

More information

Coordinate transformations. 5554: Packet 8 1

Coordinate transformations. 5554: Packet 8 1 Coordinate transformations 5554: Packet 8 1 Overview Rigid transformations are the simplest Translation, rotation Preserve sizes and angles Affine transformation is the most general linear case Homogeneous

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

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model

More information

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations Tpic 7: Transfrmatins CITS33 Graphics & Animatin E. Angel and D. Shreiner: Interactive Cmputer Graphics 6E Addisn-Wesle 22 Objectives Intrduce standard transfrmatins Rtatin Translatin Scaling Shear Derive

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 Januar 25. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

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

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

Transformations using matrices

Transformations using matrices Transformations using matrices 6 sllabusref eferenceence Core topic: Matrices and applications In this cha 6A 6B 6C 6D 6E 6F 6G chapter Geometric transformations and matri algebra Linear transformations

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

Computer Graphics. Geometric. Transformations. by Brian Wyvill University of Calgary. Lecture 2 Geometric. Transformations. Lecture 2 Geometric

Computer Graphics. Geometric. Transformations. by Brian Wyvill University of Calgary. Lecture 2 Geometric. Transformations. Lecture 2 Geometric Lecture 2 Geometric Transformations Computer Graphics Lecture 2 Geometric Transformations b Brian Wvill Universit of Calgar ENEL/CPSC. Lecture 2 Geometric Transformations Lecture 2 Geometric Transformations

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

Transformations: 2D Transforms

Transformations: 2D Transforms 1. Translation Transformations: 2D Transforms Relocation of point WRT frame Given P = (x, y), translation T (dx, dy) Then P (x, y ) = T (dx, dy) P, where x = x + dx, y = y + dy Using matrix representation

More information

Orientation & Quaternions

Orientation & Quaternions Orientation & Quaternions Orientation Position and Orientation The position of an object can be represented as a translation of the object from the origin The orientation of an object can be represented

More information

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

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3 Geometric transformations in 3D and coordinate frames Computer Graphics CSE 167 Lecture 3 CSE 167: Computer Graphics 3D points as vectors Geometric transformations in 3D Coordinate frames CSE 167, Winter

More information

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision http://grail.cs.washington.edu/projects/rotoscoping/ Image Warping, mesh, and triangulation CSE399b, Spring 7 Computer Vision Man of the slides from A. Efros. Parametric (global) warping Eamples of parametric

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

[ ] [ ] 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

CS770/870 Spring 2017 Quaternions

CS770/870 Spring 2017 Quaternions CS770/870 Spring 2017 Quaternions Primary resources used in preparing these notes: 1. van Osten, 3D Game Engine Programming: Understanding Quaternions, https://www.3dgep.com/understanding-quaternions 2.

More information

IMAGE-BASED RENDERING AND ANIMATION

IMAGE-BASED RENDERING AND ANIMATION DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION IMAGE-BASED RENDERING AND ANIMATION Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

More information

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics CS56 and Quaternions Piar s Luo Jr. A New Dimension - Time 3 4 Principles of Traditional Specifing Anticipation Suash/Stretch Secondar Action 5 6 C. Gotsman, G. Elber,. Ben-Chen Page CS56 Keframes anual

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

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

CSCI-4530/6530 Advanced Computer Graphics

CSCI-4530/6530 Advanced Computer Graphics Luo Jr. CSCI-453/653 Advanced Computer Graphics http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/s7/ Barb Cutler cutler@cs.rpi.edu MRC 33A Piar Animation Studios, 986 Topics for the Semester Meshes

More information

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture Digital Image Processing Prof. P. K. Biswas Department of Electronics and Electrical Communications Engineering Indian Institute of Technology, Kharagpur Module 02 Lecture Number 10 Basic Transform (Refer

More information

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation Keyframe animation CS4620/5620: Lecture 30 Animation Keyframing is the technique used for pose-to-pose animation User creates key poses just enough to indicate what the motion is supposed to be Interpolate

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