1. We ll look at: Types of geometrical transformation. Vector and matrix representations
|
|
- Claude Sherman
- 6 years ago
- Views:
Transcription
1 Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations Homogeneous coordinates Using transformations in OpenGL Some hand vector geometr 2
2 Tob Howard 3D Cartesian coordinates A coordinate represents a point in space, measured with respect to an origin and set of X, Y, Z aes Y P(,,z) René Descartes, , inventor of Cartesian coordinates o z X Z 3 Vectors A vector represents a direction in space, with respect to a set of X, Y, Z aes. It has a characteristic length. A vector of length is known as a unit vector Y o V (,,z) X Z 4
3 Tob Howard Coordinates and Vectors Both coordinates and vectors can be represented b a triple of,,z values. In computer graphics we usuall write these in column format: In the previous slides The melon is at Point P! " # $ # $ #% z $ & The spatial relationship between the origin and the melon is described b the vector V 5 Danger: 2 different representations We can write a vector as either a column or a row:! " # $ # $ #% z $ & OpenGL uses column vectors MATLAB uses row vectors Yes, this is confusing! or [ z ] The two representations are equivalent, but a transformation matri used with column vectors is the transpose of the equivalent matri used with row vectors 6
4 Tob Howard Geometrical Transformations We define the shape of a geometric primitive using points We can appl geometrical transformations to points to change them These include translation, scaling and rotation To transform an entire shape, we transform all its individual points 7 Translation Applies a 3D shift (t, t, tz) to all coordinates ' = + t ' = + t z' = z + tz Translate z z 8
5 Tob Howard Scaling Applies a scale factor (s, s, sz) to all coordinates (with respect to the origin) ' =. s ' =. s z' = z. sz Scale z z 9 Rotation (2D) Before we look at 3D, let s look at the 2D case. We want to rotate point P about the origin, b angle θ P (, ) P (,) θ 0
6 Tob Howard Rotation (2D) = RcosΦ = RsinΦ = Rcos(θ+Φ) = RcosΦcosθ - RsinΦsinθ = Rsin(θ+Φ) = RcosΦsinθ + RsinΦcosθ R R P (, ) P (,) Substituting for RcosΦ and RsinΦ gives: = cosθ sinθ = sinθ + cosθ θ Φ Rotation (2D) about a point What if we want to rotate about some other point than the origin? How do we rotate point P about point Q? We break the problem into 3 simpler steps: Translate b (-q,-q) to place Q at the origin Do the rotation b θ Translate back again b (+q, +q) P (, ) θ Q (q,q) This is alwas the wa we do comple transformations see later P (,) 2
7 Tob Howard Rotation (3D) Rotation of P about origin in 2D is the same in 3D, as rotation of P, in the XY plane, about the Z-azis So: = cosθ sinθ = sinθ + cosθ z = z (no change) θ P (, ) P (,) z 3 Rotation (3D) Rotations are relative to an ais, e.g. a rotation b angle θ about the Z ais ' =. cosθ. sinθ ' =. sinθ +. cosθ z' = z Rotate Around Z Ais z z 4
8 Tob Howard Rotation (3D) about a vector In 3D we often want to rotate (or scale) about an arbitrar ais vector This is analogous to the 2D case of rotating (or scaling) about an arbitrar point And we approach it in the same wa: we do it as sequence of steps (which we will describe later) z 5 Representing transformations We ve seen the following equations for representing some transformations: Translation Scale Rotation (about Z) ' = + t ' = + t z' = z + tz ' =. s ' =. s z' = z. sz ' =. cosθ. sinθ ' =. sinθ +. cosθ z' = z The re all different! It would be ver convenient if we could use a single homogeneous (== the same ) representation We use vectors and matrices 6
9 Tob Howard Using matrices: scaling A transformation changes a vector into another vector We can represent this change using a matri Eample, scale (,,z) b (2,3,5): ' ' = z' z Multipl elements row b column: = 2* + 0* + 0*z = 2 = 0* + 3* + 0*z = 3 z = 0* + 0* + 5*z = 5z 7 Using matrices: scaling A transformation changes a vector into another vector We can represent this change using a matri Eample, scale (,,z) b (2,3,5): ' ' = z' z Multipl elements row b column: = 2* + 0* + 0*z = 2 = 0* + 3* + 0*z = 3 z = 0* + 0* + 5*z = 5z 8
10 Tob Howard Using matrices: scaling A transformation changes a vector into another vector We can represent this change using a matri Eample, scale (,,z) b (2,3,5): ' ' = z' z Multipl elements row b column: = 2* + 0* + 0*z = 2 = 0* + 3* + 0*z = 3 z = 0* + 0* + 5*z = 5z 9 Using matrices: scaling A transformation changes a vector into another vector We can represent this change using a matri Eample, scale (,,z) b (2,3,5): ' ' = z' z Multipl elements row b column: = 2* + 0* + 0*z = 2 = 0* + 3* + 0*z = 3 z = 0* + 0* + 5*z = 5z 20
11 Tob Howard Using matrices: rotation (about Z) Eample, rotate (,,z) about Z ais b θ: ' cosθ sinθ 0 ' = sinθ cosθ 0 z' 0 0 z Multipl elements row b column: = cosθ* - sinθ* + 0*z = cosθ - sinθ = sinθ* + cosθ* + 0*z = sinθ + cosθ z = 0* + 0* + *z = z 2 Using matrices: translation Eample, translate (,,z) b (t,t,tz) : '??? ' =??? z'??? z Q: What should we put in the matri? A: We can t do it!! What s the solution then? 22
12 Tob Howard Using matrices: translation To incorporate translation, we have to add an etra row and column to the matri, and an etra term to our coordinates: ʹ 0 0 t ʹ 0 0 t = zʹ 0 0 tz z w ʹ Multipl elements row b column: = * + 0* + 0*z + t*= + t = 0* + * + 0*z + t*= + t z = 0* + 0* + *z + tz*= z + tz w = 0* + 0* + 0*z + *= This ma seem like an arbitrar fi, but it goes deeper. And later we will see a use for the new bottom row of the matri, for doing projection from 3D to 2D. 23 Homogeneous coordinates In order to use a consistent matri representation for all kinds of linear transformations, we ve had to add an etra coordinate, w, to our usual 3D coordinate (,,z). This (,,z,w) form is called homogeneous coordinates But where is this w? Is it in a 4 th spatial dimension? Yes it is! Unfortunatel the mathematical details are beond the scope of this course Usuall, w=, and we just ignore it When it is not, we need to normalise see later, when we cover perspective August Möbius, , inventor of homogeneous coordinates 24
13 Tob Howard Scale matri P! = T P ʹ S ʹ 0 S 0 0 = zʹ 0 0 Sz 0 z z 25 Translation matri P! = T P! ( "! 0 0 T "! " # ( $ # 0 0 T $ # $ # $ = # $ # $ # z( $ # 0 0 Tz $ # z$ # $ # $ # $ & ' & ' & ' z 26
14 Tob Howard Rotation matri (around X ais) P! = T P " ) # " 0 0 0# " # $ ) % $ 0 cosθ sinθ 0 % $ % $ % = $ % $ % $ z) % $ 0 sinθ cosθ 0% $ z% $ % $ % $ % ' ( ' ( ' ( z 27 Rotation matri (around Y ais) P! = T P " ) # " cosθ 0 sinθ 0# " # $ ) % $ % $ % $ % = $ % $ % $ z) % $ sinθ 0 cosθ 0% $ z% $ % $ % $ % ' ( ' ( ' ( z 28
15 Tob Howard Rotation matri (around Z ais) P! = T P # " $ # cosθ sinθ 0 0$ # $ % " & % sinθ cosθ 0 0 & % & % & = % & % & % z" & % 0 0 0& % z& % & % & % & ( ) ( ) ( ) z 29 Matri transformations recap The transformation T changes point P to P Pʹ = T P ʹ a b c d ʹ e f g h = zʹ i j k l z m n o p Where the 6 values a... p in the matri determine what kind of transformation it is 30
16 Tob Howard Composing transformations What if we now appl a transformation T 2 to P? Pʹʹ = T 2 Pʹ Pʹ = T T P 2 We can appl this double transformation to P in one go, if we multipl the matrices T and T 2 together to obtain the composite transformation T C TC = T2 T Pʹʹ = P T C 3 Non-commutativit, or order matters Matri multiplications (and therefore transformations) are in general non-commutative Given two matrices M and M 2, M * M 2 M 2 * M In the left eample, P is first rotated b θ, and then shifted b (T,T). In the right eample, P is first shifted b (T,T) and then rotated b θ. The results are different. Performing transformations in the correct order is crucial. P P T T θ θ T T P P 32
17 Tob Howard Composite transformations, 2D eample How to scale an object about an arbitrar point P, in 2D? We split the operation into three simpler transformations: P P P M : Translate to origin M 2 : Scale about the origin M 3 : Translate back 33 Composite transformations, 2D eample We want to scale an object b (s, s) about an arbitrar 2D point P (p, p). We split this into simpler steps: Step : Construct the translation matri M which shifts the object to the origin, b ( p, p) Step 2: Construct the matri M 2 which scales the object b (s, s) with respect to the origin Step 3: Construct the translation matri M 3 which shifts the object back b (p, p) The composite transformation is M 3 M 2 M Note the ORDER: M first, then M 2 then M 3 The ke to this process is in Step 3, where matri M 3 undoes the effect of matri M 34
18 Tob Howard Undoing a transformation Matri A: shift b (T, T, Tz): Matri B: shift b (-T, -T, -Tz): Matri product of A and B: A and B are called inverses 0 0 T 0 0 T 0 0 Tz T 0 0 T 0 0 Tz So multipling a point P b A, then B, has no effect on P identit matri, I 35 Matri inverses Two matrices A and B are said to be inverses of each other if: A B = I, where I is the identit matri For a matri M, we write its inverse as M - So, M M - = I In other words, if a matri M does some transformation on a point P, M - undoes it, restoring P Given M, there are algorithms for computing M - BUT, not all matrices actuall have an inverse! Eample: how can ou undo a transformation that makes all -coordinates 0? The original information has been destroed 36
19 Tob Howard Non-invertible transformations Eample: this scale transformation will set all -coordinates to 0: This matri has no inverse it is singular. In general, a transformation is singular if it throws awa information 37 Composite transformations, 3D eample We want to rotate b θ about an arbitrar 3D vector A But we onl know how to rotate around the X, Y and Z aes We reduce the problem to a series of transformations Y θ A X Z 38
20 Tob Howard Composite transformations, 3D eample We want to rotate b θ about an arbitrar 3D vector A Y A But we onl know how to rotate around the X, Y and Z aes We reduce the problem to a series of transformations X (let s remove the cow) Z 39 Composite transformations, 3D eample Step : We shift vector A until it passes through the origin. This is transformation M Call this new vector A Y M A A X Z 40
21 Tob Howard Composite transformations, 3D eample So now A is passing through the origin. Step 2: Rotate A about the X-ais until it lies in the XY plane. This is transformation M 2, and it produces the new vector A 2 M 2 Y A X Z 4 Composite transformations, 3D eample So now A 2 is passing through the origin, and it lies in the XY plane. Step 3: Rotate A 2 about the Z ais until it it is coincident with the X-ais. This is transformation M 3, and it produces the new vector A 3 Y A 2 is in the XY plane M 3 A 2 X Z 42
22 Tob Howard Composite transformations, 3D eample So now A 3 is passing through the origin, and it is coincident with the X-ais. Step 4: Perform the desired rotation about the X-ais b θ (which we know how to do). This is transformation M 4 M 4 A 3 Y X Z 43 Composite transformations, 3D eample So that s the rotation done. All we have to do now is to undo the effect of all the other transformations, in reverse order Step 5: appl M 3 - Step 6: appl M 2 - Step 7: appl M - Y θ If we appl all these transformations, in order, we achieve what we want Z 44 X
23 Tob Howard Rotation about an arbitrar 3D ais Summar of the steps we ve gone through:. Construct the matri M which translates A so it passes through the origin. The new vector is A. 2. Construct M 2 which rotates A about the X-ais (although we could use a different ais), mapping it into the XY plane. The new vector is A Construct M 3, which rotates A 2 about the Z-ais, mapping it onto the X-ais. The new vector is A Construct M 4, which applies the required rotation b θ about the X-ais. 5. Construct the inverse matrices, to undo the effects of M 3, M 2 and M. The entire transformation is thus: P = M - M 2 - M 3 - M 4 M 3 M 2 M P 45 Transformations in OpenGL () OpenGL maintains two transformation matrices internall: the modelview matri, used for transforming the geometr ou draw, and specifing the camera the projection matri, used for controlling the wa the camera image is projected onto the screen (see later) Ever 3D point ou ask OpenGL to draw is automaticall transformed b these two matrices before it is drawn (and ou cannot prevent this happening) P drawn = ProjectionMatri ModelviewMatri P specifed For full details, see Chapter 5 of the OpenGL manual. 46
24 Tob Howard Transformations in OpenGL (2) OpenGL provides functions for easil dealing with transformations. Here are some: gltranslatef(t, t, tz) glscalef(s, s, sz) glrotatef(theta, r, r, rz) OpenGL When we call one of these functions, OpenGL creates a corresponding temporar matri TMP, and then multiples the modelview matri b TMP, and then throws awa TMP 47 Transformations in OpenGL (3) An eample. We want to first rotate and then shift the teapot. glmatrimode(gl_modelview); glloadidentit(); // M= identit matri (I) gltranslatef(t, t, tz); // OpenGL computes temp translation matri T, // then sets M= M T, so now M is T glrotatef(theta, 0.0,.0, 0.0); // OpenGL computes temp rotation matri R, // then sets M= M R, so M is now T R glutwireteapot(.0); Notice the order we call the functions in it s the reverse of how we would write it down logicall. 48
25 Tob Howard Transformations in OpenGL (4) What if we want a series of steps, as we saw earlier? Sometimes there are OpenGL functions which come to our rescue. For eample, glrotatef() will convenientl compute a matri for rotation of angle θ about the vector (,, z) which passes through the origin. glrotatef(glfloat theta, GLfloat, GLfloat, GLfloat z); OpenGL Therefore, if we call this transformation R, we can epress our previous rotation-about-arbitrar-vector eample as M - R M There are OpenGL functions for loading our own matri from the modelview or projection matrices, and for multipling them together. But in practice, it s not necessar to use these much. 49 Model and world coordinate sstems Often an object is defined in a local modelling coordinate sstem. E.g. modelling a car wheel with an origin at the wheel centre. Modelling transformations are used to instance multiple copies of an object in the scene, e.g. translate and rotate the wheels onto a car bod The entire car ma then have further transformations applied, like translation to simulate its movement. A global world coordinate sstem is used to specif the position of objects in the entire scene. We ll cover this later in the course 50
26 Tob Howard Reference: Useful vector geometr Vectors provide a ver convenient wa of thinking about man of the manipulations we might want to perform on an object in 3D space In fact, it s the onl sensible wa to work (and essential for rendering, as we shall see later) Understanding a small amount of vector maths goes a long wa in 3D graphics Addition and Subtraction Scalar multiplication Vector normalization Dot product Cross product 5 Vector addition To add two vectors of the same order, add the components = 2 2 z z z + z Wh is this useful? moves a point through space in a known direction 52
27 Tob Howard Vector subtraction To subtract two vectors of the same order, subtract the components = 2 2 z z z z 2 2 z 2 P2 V P z Wh is this useful? represents a line between two points V= P - P2 53 Multiplication b a scalar Multipl the individual components b a scalar C V C C C = z z C Wh is this useful? moves a point along a vector b a given amount V 3 54
28 Tob Howard Vector magnitude Gives the length or size of a vector V = V = + + z z P2 V P If we have a line joining two points, the magnitude of the vector between them represents their distance in 3D space V= P - P2 Distance from P to P2 is V 55 Vector normalization Normalization is the process of taking an arbitrar (but non-zero) vector V, and converting it into a vector ˆV (V-hat) of length, which points in the same direction Calculate the length L of V, and divide its, and z components b this value V = z L= + + z Essential operation in rendering / L ˆ / L V = z/ L 56
29 Tob Howard Vector multiplication There are two was of multipling vectors One results in a scalar value, and is called the dot product (aka inner product ) The other results in a vector, and is called the cross product (aka outer product ) Both are essential operations in 3D graphics 57 The Dot Product is the scalar product of the individual components 2 2 = ( 2) + ( 2) + ( z z2) z z 2 θ V V 2 For normalized vectors, their dot product is the cosine of the angle between them Essential for rendering cosθ = V iv2 58
30 Tob Howard The Cross Product is a vector, defined as follows: V 3 V 2 z2 z 2 2 z2 z 2 = z z V 2 For two normalized vectors, their cross product is a third vector perpendicular to them both (forming a right handed sstem) V = 3 V V 2 59 Vector geometr is essential All these properties of vectors are essential in 3D graphics: for defining and manipulating geometr for specifing and evaluating rendering ˆL ˆN ˆR θ φ ˆV There are man vector manipulation libraries available that hide the underling maths and make vector manipulation eas 60
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 informationCS 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 informationWhat 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 informationCSE328 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 information1/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 informationTransformations 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 informationModeling 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 informationImage 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 informationGLOBAL 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 informationCS559: 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 informationComputer 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 informationTwo 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 informationModeling 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 informationComputer 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 informationDouble Integrals in Polar Coordinates
Double Integrals in Polar Coordinates. A flat plate is in the shape of the region in the first quadrant ling between the circles + and +. The densit of the plate at point, is + kilograms per square meter
More information(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 informationComputer 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 informationCOMP Computer Graphics and Image Processing. 5: Viewing 1: The camera. In part 1 of our study of Viewing, we ll look at ˆʹ U ˆ ʹ F ˆʹ S
COMP27112 Û ˆF Ŝ Computer Graphics and Image Processing ˆʹ U ˆ ʹ F C E 5: iewing 1: The camera ˆʹ S Toby.Howard@manchester.ac.uk 1 Introduction In part 1 of our study of iewing, we ll look at iewing in
More informationIntroduction 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 information3D 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 informationImage 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 informationModeling 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 informationHigh 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 informationLecture 4: Viewing. Topics:
Lecture 4: Viewing Topics: 1. Classical viewing 2. Positioning the camera 3. Perspective and orthogonal projections 4. Perspective and orthogonal projections in OpenGL 5. Perspective and orthogonal projection
More informationCS 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 informationHomogeneous 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 informationName: [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 informationGEOMETRIC 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 informationCSE528 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 informationCS770/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 informationGeometric 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 informationTransformations 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 informationIntroduction 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 informationMEM380 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 informationTo 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 informationTransformations 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[ ] [ ] 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 information6. Modelview Transformations
6. Modelview Transformations Transformation Basics Transformations map coordinates from one frame of reference to another through matri multiplications Basic transformation operations include: - translation
More informationCMSC 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 informationImage 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 informationNotes. 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 informationScene 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 informationDetermining 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 informationInteractive 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 information3D graphics rendering pipeline (1) 3D graphics rendering pipeline (3) 3D graphics rendering pipeline (2) 8/29/11
3D graphics rendering pipeline (1) Geometr Rasteriation 3D Coordinates & Transformations Prof. Aaron Lanterman (Based on slides b Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering
More informationGeometric 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 informationImage 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 informationCOMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard
Computer Graphics and Image Processing a6: Projections Tob.Howard@manchester.ac.uk Introduction In part 2 of our stud of Viewing, we ll look at The theor of geometrical planar projections Classes of projections
More informationCOMP30019 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 information4. 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 informationCS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1
CS 428: Fall 29 Introduction to Computer Graphics Viewing and projective transformations Andrew Nealen, Rutgers, 29 9/23/29 Modeling and viewing transformations Canonical viewing volume Viewport transformation
More information3D Coordinates & Transformations
3D Coordinates & Transformations Prof. Aaron Lanterman (Based on slides b Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering Georgia Institute of Technolog 3D graphics rendering pipeline
More informationEditing 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 informationTo 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 informationTHE INVERSE GRAPH. Finding the equation of the inverse. What is a function? LESSON
LESSON THE INVERSE GRAPH The reflection of a graph in the line = will be the graph of its inverse. f() f () The line = is drawn as the dotted line. Imagine folding the page along the dotted line, the two
More informationImage 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 informationUsing GLU/GLUT Objects. GLU/GLUT Objects. glucylinder() glutwirecone() GLU/GLUT provides very simple object primitives
Using GLU/GLUT Objects GLU/GLUT provides ver simple object primitives glutwirecone gluclinder glutwirecube GLU/GLUT Objects Each glu/glut object has its default sie, position, and orientation You need
More informationModeling Transformations
שיעור 3 גרפיקה ממוחשבת תשס"ח ב ליאור שפירא Modeling Transformations Heavil based on: Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allows
More information3-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 information2D 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 informationWarping, 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 informationImage 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 informationSTRAND I: Geometry and Trigonometry. UNIT 37 Further Transformations: Student Text Contents. Section Reflections. 37.
MEP Jamaica: STRN I UNIT 7 Further Transformations: Student Tet ontents STRN I: Geometr and Trigonometr Unit 7 Further Transformations Student Tet ontents Section 7. Reflections 7. Rotations 7. Translations
More informationMotivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics
Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make
More informationTo Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing
Foundations of Computer Graphics (Fall 0) CS 84, Lecture 5: Viewing http://inst.eecs.berkele.edu/~cs84 To Do Questions/concerns about assignment? Remember it is due Sep. Ask me or TAs re problems Motivation
More informationTopic 2 Transformations of Functions
Week Topic Transformations of Functions Week Topic Transformations of Functions This topic can be a little trick, especiall when one problem has several transformations. We re going to work through each
More information3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. x y z. x y z. glvertex3f(x, y,z);
3D Transformation In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. 3D Transformation glvertex3f(x, y,z); x y z x y z A Right Handle Coordinate System x y z; y z x;
More informationTransformations 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 informationPATTERNS AND ALGEBRA. He opened mathematics to many discoveries and exciting applications.
PATTERNS AND ALGEBRA The famous French philosopher and mathematician René Descartes (596 65) made a great contribution to mathematics in 67 when he published a book linking algebra and geometr for the
More informationChap 7, 2009 Spring Yeong Gil Shin
Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification
More informationName Class Date. subtract 3 from each side. w 5z z 5 2 w p - 9 = = 15 + k = 10m. 10. n =
Reteaching Solving Equations To solve an equation that contains a variable, find all of the values of the variable that make the equation true. Use the equalit properties of real numbers and inverse operations
More informationCOMP30019 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 informationModeling 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 informationTransformations of Functions. 1. Shifting, reflecting, and stretching graphs Symmetry of functions and equations
Chapter Transformations of Functions TOPICS.5.. Shifting, reflecting, and stretching graphs Smmetr of functions and equations TOPIC Horizontal Shifting/ Translation Horizontal Shifting/ Translation Shifting,
More informationLESSON 3.1 INTRODUCTION TO GRAPHING
LESSON 3.1 INTRODUCTION TO GRAPHING LESSON 3.1 INTRODUCTION TO GRAPHING 137 OVERVIEW Here s what ou ll learn in this lesson: Plotting Points a. The -plane b. The -ais and -ais c. The origin d. Ordered
More informationModeling 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 informationTo Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline
Computer Graphics CSE 67 [Win 9], Lecture 5: Viewing Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse67/wi9 To Do Questions/concerns about assignment? Remember it is due tomorrow! (Jan 6). Ask me or
More informationCS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE
CS 45: COMUTER GRAHICS 2D TRANSFORMATIONS SRING 26 DR. MICHAEL J. REALE INTRODUCTION Now that we hae some linear algebra under our resectie belts, we can start ug it in grahics! So far, for each rimitie,
More informationA New Concept on Automatic Parking of an Electric Vehicle
A New Concept on Automatic Parking of an Electric Vehicle C. CAMUS P. COELHO J.C. QUADRADO Instituto Superior de Engenharia de Lisboa Rua Conselheiro Emídio Navarro PORTUGAL Abstract: - A solution to perform
More informationCS 4204 Computer Graphics
CS 424 Computer Graphics 2D Transformations Yong Cao Virginia Tech References: Introduction to Computer Graphics course notes by Doug Bowman Interactive Computer Graphics, Fourth Edition, Ed Angle Transformations
More informationMore 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 informationGraphics 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 informationOverview. By end of the week:
Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric
More information20 Calculus and Structures
0 Calculus and Structures CHAPTER FUNCTIONS Calculus and Structures Copright LESSON FUNCTIONS. FUNCTIONS A function f is a relationship between an input and an output and a set of instructions as to how
More informationImage 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 information2D 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 informationSTRAND J: TRANSFORMATIONS, VECTORS and MATRICES
Mathematics SKE, Strand J UNIT J Further Transformations: Tet STRND J: TRNSFORMTIONS, VETORS and MTRIES J Further Transformations Tet ontents Section J.1 Translations * J. ombined Transformations Mathematics
More informationCoordinate 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 informationReading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional:
Reading Required: Angel, sections 9.1 9.6, 9.8 Optional: Hierarchical Modeling OpenGL rogramming Guide, the Red Book, chapter 3 cse457-07-hierarchical 1 cse457-07-hierarchical 2 Symbols and instances Most
More information2D Transformations. 7 February 2017 Week 5-2D Transformations 1
2D Transformations 7 Februar 27 Week 5-2D Transformations Matri math Is there a difference between possible representations? a c b e d f ae bf ce df a c b d e f ae cf be df a b c d e f ae bf ce df 7 Februar
More informationTransformations. CSCI 420 Computer Graphics Lecture 4
CSCI 420 Computer Graphics Lecture 4 Transformations Jernej Barbic University of Southern California Vector Spaces Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices [Angel, Ch. 4]
More informationComputer 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 information3D Viewing Episode 2
3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the
More information1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1
Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also
More informationCPSC 314, Midterm Exam. 8 March 2010
CPSC, Midterm Eam 8 March 00 Closed book, no electronic devices besides (simple, nongraphing) calculators. Cell phones must be turned off. Place our photo ID face up on our desk. One single-sided sheet
More informationTransformations. which the book introduces in this chapter. If you shift the graph of y 1 x to the left 2 units and up 3 units, the
CHAPTER 8 Transformations Content Summar In Chapter 8, students continue their work with functions, especiall nonlinear functions, through further stud of function graphs. In particular, the consider three
More informationRobot Geometry and Kinematics
CIS 68/MEAM 50 Robot Geometr and Kinematics CIS 68/MEAM 50 Outline Industrial (conventional) robot arms Basic definitions for understanding -D geometr, kinematics Eamples Classification b geometr Relationship
More informationViewing and Projection
Viewing and Projection Sheelagh Carpendale Camera metaphor. choose camera position 2. set up and organie objects 3. choose a lens 4. take the picture View Volumes what gets into the scene perspective view
More informationViewing 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 informationUNIT 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