Geometric Transformations Hearn & Baker Chapter 5

Slides:



Advertisements
Similar presentations
Computer Graphics 02/10/09Lecture 41 Computer Graphics Lecture 3 Transformations.
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
1 Computer Graphics Chapter 6 2D Transformations.
CMPE 466 COMPUTER GRAPHICS
Transformations II Week 2, Wed Jan 17
Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation.
Transformations Objectives Understand how transformations work in 2D and 3D Understand the concept of homogenous coordinate system Understand scene graphs.
Course Website: Computer Graphics 3: 2D Transformations.
Computer Graphics with OpenGL 3e
CS 450: Computer Graphics 2D TRANSFORMATIONS
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Transformation & Projection Feng Yu Proseminar Computer Graphics :
Lecture Notes: Computer Graphics.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
2D Geometric Transformations
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Transformations Jehee Lee Seoul National University.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Computer Graphics 3D Transformations. Translation.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
Computer Graphic 2 D Transformation.
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Computer Graphics 2D Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Transforms.
Computer Graphics 3: 2D Transformations
Transformations Objectives
2D Transformations By: KanwarjeetSingh
2D Geometric Transformations
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics Transformations.
2D Transformations with Matrices
Computer Graphics 3: 2D Transformations
Review: Transformations
3D Transformation.
3D Geometric Transformations
2D Transformation.
Computer Graphics Transformations.
Introduction to Computer Graphics CS 445 / 645
Review: Transformations
Computer Graphics Transformations
Lecture 2 Transformations
Line and Character Attributes 2-D Transformation
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
2-D Geometry.
Transformations 3 University of British Columbia
Chapter IV Spaces and Transforms
2D Geometric Transformations
Transformations Ed Angel
Geometric Objects and Transformations (II)
Transformations Ed Angel Professor Emeritus of Computer Science
Geometrical Transformations
Transformation Operators
Isaac Gang University of Mary Hardin-Baylor
Transformations 2 University of British Columbia
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

Geometric Transformations Hearn & Baker Chapter 5 COMPUTER GRAPHICS Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.

OVERVIEW Two dimensional transformations Matrix representations Inverse transformations Three dimensional transformations

Geometric transformation functions Translation Rotation Scaling Reflection Shearing We first discuss the 2D transformations, then we will continue with 3D.

2D Translations P’ P

2D Scaling from the origin. P’ P

2D Rotation about the origin. y  P’(x’,y’) P(x,y) r r x

2D Rotation about the origin. y P’(x’,y’) P(x,y) r  y r  x x

2D Rotation about the origin. y P’(x’,y’) P(x,y) r  y r  x x

2D Rotation about the origin. Substituting for r : Gives us :

2D Rotation about the origin. Rewriting in matrix form gives us :

Transformations. Translation. Scale Rotation P=T + P P=S  P P=R  P We would like all transformations to be multiplications so we can concatenate them  express points in homogenous coordinates.

Homogeneous coordinates Add an extra coordinate, W, to a point. P(x,y,W). Two sets of homogeneous coordinates represent the same point if they are a multiple of each other. (2,5,3) and (4,10,6) represent the same point. At least one component must be non-zero  (0,0,0) is not defined. If W 0 , divide by it to get Cartesian coordinates of point (x/W,y/W,1). If W=0, point is said to be at infinity. V. important

Homogeneous coordinates If we represent (x,y,W) in 3-space, all triples representing the same point describe a line passing through the origin. If we homogenize the point, we get a point of form (x,y,1) homogenised points form a plane at W=1. W P W=1 plane X Y

Translations in homogenised coordinates Transformation matrices for 2D translation are now 3x3.

Concatenation. We perform 2 translations on the same point:

Concatenation. Matrix product is variously referred to as compounding, concatenation, or composition

Concatenation. Matrix product is variously referred to as compounding, concatenation, or composition. This single matrix is called the Coordinate Transformation Matrix or CTM.

Properties of translations. Note : 3. translation matrices are commutative.

Homogeneous form of scale. Recall the (x,y) form of Scale : In homogeneous coordinates :

Concatenation of scales.

Reflection corresponds to negative scale factors sx = -1 sy = 1 original sx = -1 sy = -1 sx = 1 sy = -1

Homogeneous form of rotation. i.e. the inverse is the transpose

Orthogonality of rotation matrices.

Other properties of rotation.

2D Composite Transformations Combine transformations of different type translate, rotate, translate translate, scale, translate translate, reflect, translate Use to rotate or scale an object w.r.t. a point that is not the origin Implement by multiplication of the corresponding homogeneous matrices

reflection in x and y axes reflection in origin

Shx gives the slope of a vertical line after shear, as dx/dy

Example 1 S

Example 1 S

Example 1 T(S)

Example 2 S

Example 2 S

Example 2 T(S)

Summary Shear in x: Shear in y:

Double Shear: not commutative!

Shear Matrix defined by angle, not slope e.g. simple shear along x axis x’ = x + y cot q y’ = y z’ = z H(q) =

3D Transformations. Use homogeneous coordinates, just as in 2D case. Transformations are now 4x4 matrices. We will use a right-handed (world) coordinate system - ( z out of page ). y Note: Convenient to think of display as Being left-handed !! ( z into the screen ) x z (out of page)

Simple extension to the 3D case:

Scale in 3D. Simple extension to the 3D case:

Rotation in 3D Need to specify which axis the rotation is about. z-axis rotation is the same as the 2D case.

Rotation around an axis parallel to x-axis

H&B p271

Rows of upper-left 3x3 submatrix, when rotated by R lie on the x,y and z axes

Scaling an object with this transformation will also move its position relative to the origin - so move it to the origin, scale it, then move it back...