Lecture 9: Transformations. CITS3003 Graphics & Animation

Size: px
Start display at page:

Download "Lecture 9: Transformations. CITS3003 Graphics & Animation"

Transcription

1 Lecture 9: Transformations CITS33 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 212

2 Objectives Introduce standard transformations Rotation Translation Scaling Shear Derive homogeneous coordinate transformation matrices Learn to build arbitrary transformation matrices from simple transformations 2

3 Recap

4 Recap- Geometric Objects Point Location in space mathematical point has neither a size nor a shape Scalars Real /complex numbers Used to specify quantities obey a set of rules addition and multiplication commutivity and associativity multiplicative and additive inverses

5 Recap-Geometric Objects Vector to allows us to work with directions Is any quantity with direction and magnitude. E.g. Force, velocity etc A vector does not have a fixed location in space.

6 Recap- Homogeneous Coordinates If we define PP = and 1 PP = PP then we can write vv = αα 1 vv 1 + αα 2 vv 2 + αα 3 vv 3 = αα 1 vv 1 + αα 2 vv 2 + αα 3 vv 3 + PP PP = ββ 1 vv 1 + ββ 2 vv 2 + ββ 3 vv 3 + PP = ββ 1 vv 1 + ββ 2 vv 2 + ββ 3 vv PP Thus we obtain the four-dimensional homogeneous coordinate representation vv = αα 1 αα 2 αα 3 T vv = PP = ββ 1 ββ 2 ββ 3 1 T vv 6

7 Recap-Change of Coordinate Frame If (v 1,v 2,v 3,P ) and (u 1,u 2,u 3,Q ) are two frames then how do we express them in terms of each other?

8 Transformations - General

9 Affine Transformations A transformation is a function that takes a point (or vector) and maps it into another point (or vector). o o Q = T(P) for points v = R(u) for vectors In homogeneous coordinate system o o q = f (p), v = f (u),

10 Transformation vs Change of Frame Transformation Change of Frame v = Cu, v = Mu, As long as C is nonsingular, each linear transformation corresponds to a change in frame. Every linear transformation is either: o o a change in the underlying representation, or frame, that yields a new representation of our vertices, or as a transformation of the vertices within the same frame Transform the homogeneous-coordinate representation of the endpoints of a line segment to determine completely a transformed line. p(α) = p+ αd Cp(α) = Cp+αCd

11 Translation Translation is an operation that displaces points by a fixed distance in a given direction.

12 Rotation (2D) Consider a rotation about the origin by θ degrees o radius stays the same, angle increases by θ xx = rr cos (φφ + θθ) yy = rr sin (φφ + θθ) (New point ppp after rotation) xx = xx cos θθ yy sin θθ yy = xx sin θθ + yy cos θθ Recall that sin(a+b) = sina cosb + cosa sinb cos(a+b) = cosa cosb sina sinb xx = rr cos φφ yy = rr sin φφ (Old point p before rotation) 12

13 P 1 =[1,1] Rotation (Example) Rotation angle θθ=π/2 Matrix notation

14 Features of Transformations >> Rotations The fixed point Reinterpretation of 2D Xform to 3D Xform. Counterclockwise is positive. Rotation in the two-dimensional plane z = is equivalent to a three dimensional rotation about the z-axis.

15 Rigid vs non-rigid body Transformations Rigid Body Xform Non-rigid Body Xform

16 Scaling Scaling is an affine non rigid-body transformation by which we can make an object bigger or smaller.

17 Reflection corresponds to negative scale factors s x = -1 s y = 1 original s x = -1 s y = -1 s x = 1 s y = -1 17

18 Transformations in Homogeneous Coordinates

19 Representation High level expression Q = P + αv. Representations in homogeneous coordinates q = p + αv Within a frame, each affine transformation is represented by a 4 4 matrix of the form

20 Translation Translation displaces points to new positions defined by a displacement vector. p = p + d Looking at their homogeneous-coordinate forms Using matrix multiplication form p = Tp, TT = 1 aa xx 1 aa yy 1 aa zz 1 Translation matrix

21 Scaling Expand or contract along each axis (fixed point of origin) xx = ss xx xx yy = ss yy yy zz = ss zz z pp = SSSS SS = SS(ss xx, ss yy, ss zz ) = sx s y s z 1 21

22 Rotation about the z axis Rotation in two dimensions is equivalent to rotation about the zz axis in three dimensions. Rotation about the zz axis in 3D leaves the zz components of all the points unchanged: cos θθ sin θθ RR zz θθ = sin θθ cos θθ 1 1 In homogeneous coordinates pp = RR ZZ (θθ)pp 22

23 Rotation about the z axis (cont.) Consider the example we have xx yyy zz 1 = RR zz (θθ) = xx = rr cos φφ yy = rr sin φφ zz = rr cos φφ cos θθ sin θθ rr sin φφ = sin θθ cos θθ rr cos θθ cos φφ rr sin θθ sin φφ rr sin θθ cos φφ + rr cos θθ sin φφ 1 rr cos φφ rr sin φφ 1 23

24 Rotation about the z axis (cont.) Applying the rule: cos(θθ + φφ) = cos θθ cos φφ sin θθ sin φφ sin θθ + φφ = sin θθ cos φφ + cos θθ sin φφ we get Thus, xx yyy zz 1 = RR zz (θθ) xx = rr cos(θθ + φφ) yy = rr sin(θθ + φφ) zz = rr cos φφ rr sin φφ 1 = rr cos(θθ + φφ) rr sin(θθ + φφ) 1 In general, xx = xx cos θθ yy sin θθ yy = xx sin θθ + yy cos θθ zz = zz 24

25 Rotation about x and y axes Same argument as for rotation about z axis For rotation about x axis, x is unchanged For rotation about y axis, y is unchanged 1 cos θ R = R x (θ) = sin θ -sin θ cos θ 1 Note the negative sign here R = R y (θ) = cos θ - sin θ 1 sin θ cos θ 1 25

26 Rotation (Example 1) P= θθ = pi/4 R z (θθ) = P =

27 EXAMPLE -2

28 Inverses Although we could compute inverse matrices by general formulas, we can use simple geometric observations Translation: TT 1 (dd xx, dd yy, dd zz ) = TT( dd xx, dd yy, dd zz ) Rotation: RR 1 (θθ) = RR( θθ) Holds for any rotation matrix Note that since cos ( θθ) = cos (θθ) and sin ( θθ) = sin (θθ) RR 1 (θθ) = RR T (θθ) Scaling: SS 1 (ss xx, ss yy, ss zz ) = SS(1/ss xx, 1/ss yy, 1/ss zz ) 28

29 Shear It is helpful to add one more basic transformation, the shearing transformation, to the collection of transformation we have learnt Shearing is equivalent to pulling faces in opposite directions 29

30 Shear Matrix Consider a simple shear along the x axis xx = xx + yy cot θθ yy = yy zz = zz => H(θ) = 1 cot 1 θ 1 1 3

31 Concatenation We can form arbitrary affine transformation matrices by multiplying together rotation, translation, and scaling matrices Because the same transformation is applied to many vertices, the cost of forming a matrix MM = AAAAAAAA is not significant compared to the cost of computing MMMM for many vertices pp The difficult part is how to form a desired transformation from the specifications in the application 31

32 Order of Transformations Note that matrix on the right is the first applied Mathematically, the following are equivalent pp = AAAAAAAA = AA(BB(CCCC)) Note many references use row vectors to represent points. For such references: pp T = pp T CC T BB T AA T 32

33 General Rotation About the Origin A rotation angle of θ about an arbitrary axis can be decomposed into the concatenation of rotations about the xx, yy, and zz axes RR(θθ) = RR zz (θθ zz ) RR yy (θθ yy ) RR xx (θθ xx ) θθ xx, θθ yy, and θθ zz are called the Euler angles y θ v Note that rotations do not commute We can use rotations in another order but with different angles z x 33

34 Rotation About a Fixed Point other than the Origin 1. Move the origin to the fixed point 2. Rotate 3. Move the origin back to fixed point back => M = T(p f ) R(θ) T(-p f ) After Step 1 After Step 2 After Step 3 34

35 Rotation About a Fixed Point other than the Origin (cont.) A 2D example: Objective: want to rotate a square 45 degrees about its own centre, pp. y pp y x x Before rotation Output wanted after rotation This is the same as rotating about the zz-axis (pointing out of the page) in 3D. 35

36 Rotation About a Fixed Point other than the Origin (cont.) Our aim is to construct a matrix MM so that when the four vertices of the square are pre-multiplied by we get the desired output. Step 1: apply a translation so that the origin is at pp. y y pp x x MM = TT( pp) 36

37 Rotation About a Fixed Point other than the Origin (cont.) Step 2: apply a 45 degree rotation about the zz-axis at the origin. y y x MM = RR z θθ TT( pp) x 37

38 Rotation About a Fixed Point other than the Origin (cont.) Step 3: move the origin back to where it was before. y x y x MM = TT pp RR z θθ TT( pp) 38

39 Instancing In modeling, we often start with a simple object centered at the origin, oriented with the axis, and at a standard size We apply an instance transformation to its vertices to Scale Orient Locate 39

40 Further Reading Interactive Computer Graphics A Top-Down Approach with Shader-Based OpenGL by Edward Angel and Dave Shreiner, 6 th Ed, 212 Sec 3.7 Affine Transformations (all subsections) Sec 3.8 Translation, Rotation, and Scaling Sec 3.9 Transformations in Homogeneous Coordinates Sec 3.1 Concatenation of Transformations 4

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

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space Basic Elements Geometry is the study of the relationships among objects in an n-dimensional space In computer graphics, we are interested in objects that exist in three dimensions We want a minimum set

More information

Shading II. CITS3003 Graphics & Animation

Shading II. CITS3003 Graphics & Animation Shading II CITS3003 Graphics & Animation Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also

More information

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley Computer Viewing CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing

More information

3D Modelling: Animation Fundamentals & Unit Quaternions

3D Modelling: Animation Fundamentals & Unit Quaternions 3D Modelling: Animation Fundamentals & Unit Quaternions CITS3003 Graphics & Animation Thanks to both Richard McKenna and Marco Gillies for permission to use their slides as a base. Static objects are boring

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

Lesson 24: Matrix Notation Encompasses New Transformations!

Lesson 24: Matrix Notation Encompasses New Transformations! Classwork Example 1 Determine the following: a. 1 0 0 1 3 b. 1 0 7 0 1 1 c. 1 0 3 5 0 1 1 d. 1 0 3 1 0 1 7 6 e. 9 1 0 1 3 1 0 1 f. 1 0 cc aa 0 1 bb dd xx yy 0 g. 1 zz ww 0 1 Date: 1/5/15 S.14 Example Can

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

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York Geometry Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce the elements of geometry -Scalars - Vectors - Points Develop mathematical operations among them in

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

Geometry. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Geometry. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Geometry CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012. 1 Objectives Introduce

More information

Three Main Themes of Computer Graphics

Three Main Themes of Computer Graphics Three Main Themes of Computer Graphics Modeling How do we represent (or model) 3-D objects? How do we construct models for specific objects? Animation How do we represent the motion of objects? How do

More information

CS452/552; EE465/505. Geometry Transformations

CS452/552; EE465/505. Geometry Transformations CS452/552; EE465/505 Geometry Transformations 1-26-15 Outline! Geometry: scalars, points & vectors! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Appendix B: Spaces (vector,

More information

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Transformations CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce standard transformations - Rotation - Translation - Scaling - Shear Derive

More information

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010)

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010) Lecture 4: Transformations and Matrices CSE 40166 Computer Graphics (Fall 2010) Overall Objective Define object in object frame Move object to world/scene frame Bring object into camera/eye frame Instancing!

More information

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

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I Guoying Zhao 1 / 52 Geometry Guoying Zhao 2 / 52 Objectives Introduce the elements of geometry Scalars Vectors Points Develop mathematical operations among

More information

CS 432 Interactive Computer Graphics

CS 432 Interactive Computer Graphics CS 432 Interactive Computer Graphics Lecture 4 3D Viewing Matt Burlick - Drexel University - CS 432 1 Reading Angel Chapters 3-4 Red Book Chapter 5, Appendix E Matt Burlick - Drexel University - CS 432

More information

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations Objectives Transformations CS Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Introduce standard transformations - Rotation - Translation - Scaling - Shear Derive homogeneous

More information

In section 8.1, we began by introducing the sine function using a circle in the coordinate plane:

In section 8.1, we began by introducing the sine function using a circle in the coordinate plane: Chapter 8.: Degrees and Radians, Reference Angles In section 8.1, we began by introducing the sine function using a circle in the coordinate plane: y (3,3) θ x We now return to the coordinate plane, but

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

Computer Graphics Hands-on

Computer Graphics Hands-on Computer Graphics Hands-on Two-Dimensional Transformations Objectives Visualize the fundamental 2D geometric operations translation, rotation about the origin, and scale about the origin Learn how to compose

More information

Today s Agenda. Geometry

Today s Agenda. Geometry Today s Agenda Geometry Geometry Three basic elements Points Scalars Vectors Three type of spaces (Linear) vector space: scalars and vectors Affine space: vector space + points Euclidean space: vector

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

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

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

Lecture 5 2D Transformation

Lecture 5 2D Transformation Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms

More information

CS452/552; EE465/505. Transformations

CS452/552; EE465/505. Transformations CS452/552; EE465/55 Transformations 1-29-15 Outline! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Helpful links: Linear Algebra: Khan Academy Lab1 is posted on github, due:

More information

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

2D transformations: An introduction to the maths behind computer graphics 2D transformations: An introduction to the maths behind computer graphics Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University,

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

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems EECE 478 Linear Algebra and 3D Geometry Learning Objectives Linear algebra in 3D Define scalars, points, vectors, lines, planes Manipulate to test geometric properties Coordinate systems Use homogeneous

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

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

Objectives. Shading II. Distance Terms. The Phong Reflection Model

Objectives. Shading II. Distance Terms. The Phong Reflection Model Shading II Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also known as the modified Phong

More information

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01 UNIT 2 Translation/ Scaling/ Rotation Unit-02/Lecture-01 Translation- (RGPV-2009,10,11,13,14) Translation is to move, or parallel shift, a figure. We use a simple point as a starting point. This is a simple

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

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

Transformations. Prof. George Wolberg Dept. of Computer Science City College of New York

Transformations. Prof. George Wolberg Dept. of Computer Science City College of New York Transforations Prof. George Wolberg Dept. of Coputer Science City College of New York Objectives Introduce standard transforations - Rotations - Translation - Scaling - Shear Derive hoogeneous coordinate

More information

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

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations 3D Mathematics Co-ordinate systems, 3D primitives and affine transformations Coordinate Systems 2 3 Primitive Types and Topologies Primitives Primitive Types and Topologies 4 A primitive is the most basic

More information

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009 Lecture 6 Sections 4.3, 4.6, 4.7 Hampden-Sydney College Wed, Sep 9, 2009 Outline 1 2 3 4 re are three mutually orthogonal axes: the x-axis, the y-axis, and the z-axis. In the standard viewing position,

More information

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Chapter 2 - Basic Mathematics for 3D Computer Graphics Chapter 2 - Basic Mathematics for 3D Computer Graphics Three-Dimensional Geometric Transformations Affine Transformations and Homogeneous Coordinates Combining Transformations Translation t + t Add a vector

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

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

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

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a

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

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

Geometry. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Introduce the elements of geometry - Scalars - Vectors - Points

More information

Monday, 12 November 12. Matrices

Monday, 12 November 12. Matrices Matrices Matrices Matrices are convenient way of storing multiple quantities or functions They are stored in a table like structure where each element will contain a numeric value that can be the result

More information

Last week. Machiraju/Zhang/Möller

Last week. Machiraju/Zhang/Möller Last week Machiraju/Zhang/Möller 1 Overview of a graphics system Output device Input devices Image formed and stored in frame buffer Machiraju/Zhang/Möller 2 Introduction to CG Torsten Möller 3 Ray tracing:

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

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

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

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL 1 Introduction to Computer Graphics with WebGL Ed Angel Transformations General Transformations A transformation maps points to other points and/or vectors to other vectors v=t(u) Q=T(P) 2 Affine Transformations

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

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

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

Quaternion Rotations AUI Course Denbigh Starkey

Quaternion Rotations AUI Course Denbigh Starkey Major points of these notes: Quaternion Rotations AUI Course Denbigh Starkey. What I will and won t be doing. Definition of a quaternion and notation 3 3. Using quaternions to rotate any point around an

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

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

Computer Science 336 Fall 2017 Homework 2

Computer Science 336 Fall 2017 Homework 2 Computer Science 336 Fall 2017 Homework 2 Use the following notation as pseudocode for standard 3D affine transformation matrices. You can refer to these by the names below. There is no need to write out

More information

CSE 167: Introduction to Computer Graphics Lecture #2: Coordinate Transformations

CSE 167: Introduction to Computer Graphics Lecture #2: Coordinate Transformations CSE 167: Introduction to Computer Graphics Lecture #2: Coordinate Transformations Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework #1 due Friday Oct

More information

Section 4.2 Radians, Arc Length, and Area of a Sector

Section 4.2 Radians, Arc Length, and Area of a Sector 1330 - Section 4.2 Radians, Arc Length, and Area of a Sector Two rays that have a common endpoint (vertex) form an angle. One ray is the initial side and the other is the terminal side. We typically will

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

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

Vector Calculus: Understanding the Cross Product

Vector Calculus: Understanding the Cross Product University of Babylon College of Engineering Mechanical Engineering Dept. Subject : Mathematics III Class : 2 nd year - first semester Date: / 10 / 2016 2016 \ 2017 Vector Calculus: Understanding the Cross

More information

Game Engineering CS S-05 Linear Transforms

Game Engineering CS S-05 Linear Transforms Game Engineering CS420-2016S-05 Linear Transforms David Galles Department of Computer Science University of San Francisco 05-0: Matrices as Transforms Recall that Matrices are transforms Transform vectors

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

Introduction to Homogeneous coordinates

Introduction to Homogeneous coordinates Last class we considered smooth translations and rotations of the camera coordinate system and the resulting motions of points in the image projection plane. These two transformations were expressed mathematically

More information

Transformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel

Transformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations David Carr Virtual Environments, Fundamentals Spring 25 Based on Slides by E. Angel Jan-27-5 SMM9, Transformations 1 L Overview

More information

Humanoid Robotics. Projective Geometry, Homogeneous Coordinates. (brief introduction) Maren Bennewitz

Humanoid Robotics. Projective Geometry, Homogeneous Coordinates. (brief introduction) Maren Bennewitz Humanoid Robotics Projective Geometry, Homogeneous Coordinates (brief introduction) Maren Bennewitz Motivation Cameras generate a projected image of the 3D world In Euclidian geometry, the math for describing

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

1 Preview. Dr. Scott Gordon Computer Science Dept. CSUS. Virtual Cameras, Viewing Transformations: CSc-155 Advanced Computer Graphics

1 Preview. Dr. Scott Gordon Computer Science Dept. CSUS. Virtual Cameras, Viewing Transformations: CSc-155 Advanced Computer Graphics CSc-155 Advanced Computer Graphics 1 Preview Dr. Scott Gordon Computer Science Dept. CSUS Course Description Modeling, viewing, and rendering techniques in 3D computer graphics systems. Topics include:

More information

2D Geometric Transformations and Matrices

2D Geometric Transformations and Matrices Background: Objects are drawn and moved in 2D space and 3D space on a computer screen b multipling matrices. Generall speaking, computer animation is achieved as follows b repeating steps 1, 2, and 3 below.

More information

2D TRANSFORMATIONS AND MATRICES

2D TRANSFORMATIONS AND MATRICES 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: x y General Problem: B = T A T represents a generic operator to be applied to the points in A. T is the geometric transformation

More information

Transformations Computer Graphics I Lecture 4

Transformations Computer Graphics I Lecture 4 15-462 Computer Graphics I Lecture 4 Transformations Vector Spaces Affine and Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices January 23, 2003 [Angel, Ch. 4] Frank Pfenning Carnegie

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

Visualizing Quaternions

Visualizing Quaternions Visualizing Quaternions Andrew J. Hanson Computer Science Department Indiana University Siggraph 1 Tutorial 1 GRAND PLAN I: Fundamentals of Quaternions II: Visualizing Quaternion Geometry III: Quaternion

More information

Transforms 1 Christian Miller CS Fall 2011

Transforms 1 Christian Miller CS Fall 2011 Transforms 1 Christian Miller CS 354 - Fall 2011 Transformations What happens if you multiply a square matrix and a vector together? You get a different vector with the same number of coordinates These

More information

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at

More information

GEOMETRIC OBJECTS AND TRANSFORMATIONS I

GEOMETRIC OBJECTS AND TRANSFORMATIONS I Computer UNIT Graphics - 4 and Visualization 6 Hrs GEOMETRIC OBJECTS AND TRANSFORMATIONS I Scalars Points, and vectors Three-dimensional primitives Coordinate systems and frames Modelling a colored cube

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

Image Analysis. Rasmus R. Paulsen DTU Compute. DTU Compute

Image Analysis. Rasmus R. Paulsen DTU Compute.   DTU Compute Rasmus R. Paulsen rapa@dtu.dk http://www.compute.dtu.dk/courses/02502 Plenty of slides adapted from Thomas Moeslunds lectures Lecture 8 Geometric Transformation 2, Technical University of Denmark What

More information

OPTIMAL DESIGN OF A STEPPER-DRIVEN PLANAR LINKAGE USING ENTROPY METHODS

OPTIMAL DESIGN OF A STEPPER-DRIVEN PLANAR LINKAGE USING ENTROPY METHODS Optimal Design of A Stepper-Driven Planar Linkage Using Entropy Methods OPTIMAL DESIGN OF A STEPPER-DRIVEN PLANAR LINKAGE USING ENTROPY METHODS J. C. Musto 1* 1 Mechanical Engineering Department, Milwaukee

More information

Texture Mapping. Michael Kazhdan ( /467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, , 16.6

Texture Mapping. Michael Kazhdan ( /467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, , 16.6 Texture Mapping Michael Kazhdan (61.457/467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, 16.4.5, 16.6 Textures We know how to go from this to this J. Birn Textures But what about this to this? J. Birn Textures How

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

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

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

Lecture 5: Transforms II. Computer Graphics and Imaging UC Berkeley CS184/284A Lecture 5: Transforms II Computer Graphics and Imaging UC Berkeley 3D Transforms 3D Transformations Use homogeneous coordinates again: 3D point = (x, y, z, 1) T 3D vector = (x, y, z, 0) T Use 4 4 matrices

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

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

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

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

CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Friday: homework 1 due at 2pm Upload

More information

CS184: Using Quaternions to Represent Rotation

CS184: Using Quaternions to Represent Rotation Page 1 of 5 CS 184 home page A note on these notes: These notes on quaternions were created as a resource for students taking CS184 at UC Berkeley. I am not doing any research related to quaternions and

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

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

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

Game Engineering: 2D

Game Engineering: 2D Game Engineering: 2D CS420-2010F-07 Objects in 2D David Galles Department of Computer Science University of San Francisco 07-0: Representing Polygons We want to represent a simple polygon Triangle, rectangle,

More information

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

Fundamentals of Computer Animation

Fundamentals of Computer Animation Fundamentals of Computer Animation Quaternions as Orientations () page 1 Multiplying Quaternions q1 = (w1, x1, y1, z1); q = (w, x, y, z); q1 * q = ( w1.w - v1.v, w1.v + w.v1 + v1 X v) where v1 = (x1, y1,

More information

ME5286 Robotics Spring 2015 Quiz 1

ME5286 Robotics Spring 2015 Quiz 1 Page 1 of 7 ME5286 Robotics Spring 2015 Quiz 1 Total Points: 30 You are responsible for following these instructions. Please take a minute and read them completely. 1. Put your name on this page, any other

More information

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

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5) 5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?

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

Transformations Computer Graphics I Lecture 4

Transformations Computer Graphics I Lecture 4 15-462 Computer Graphics I Lecture 4 Transformations Vector Spaces Affine and Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices January 24, 2002 [Angel, Ch. 4] Frank Pfenning Carnegie

More information