Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk

Slides:



Advertisements
Similar presentations
3D Transformations Assist. Prof. Dr. Ahmet Sayar
Advertisements

Computer Graphics: 3D Transformations
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Gursharan Singh Tatla TRANSFORMATIONS Gursharan Singh Tatla Gursharan Singh Tatla.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Three Dimensional Modeling Transformations
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
1 Computer Graphics Chapter 6 2D Transformations.
Chapter 5 Geometric Transformations
Two-Dimensional Geometric Transformations
CMPE 466 COMPUTER GRAPHICS
CMPE 466 COMPUTER GRAPHICS
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Computer Graphics University of Palestine Dr. Sana’a Wafa Al-Sayegh
Computer Graphics with OpenGL 3e
CAP4730: Computational Structures in Computer Graphics
Mathematical Fundamentals
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
5.2 Three-Dimensional Geometric and Modeling Transformations 2D3D Consideration for the z coordinate.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Transformation of Graphics
Kinematics of Robot Manipulator
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
2D Transformation of Graphics
Lecture Notes: Computer Graphics.
Geometric Transformations Jehee Lee Seoul National University.
2D Geometric Transformations
Part7: Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Geometric Transformations
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Geometric Objects and Transformation
Computer Graphics 3D Transformations. Translation.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS D Geometric Transformations Graphics Systems.
January 19, y X Z Translations Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions.
3-D Geometric Transformations
3D Geometric Transformation
3D Geometric Transformation
Lecture 5: Introduction to 3D
Affine Geometry.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Homogeneous Coordinates and Matrix Representations Cartesian coordinate (x, y, z) Homogeneous coordinate (x h, y h, z h, h) Usually h = 1. But there are.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
CSCE 441 Computer Graphics: 2D Transformations
3D Geometry and Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
3D Geometric Transformation
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3D Transformations
Geometric Transformations for Computer Graphics
TWO DIMENSIONAL TRANSFORMATION
Translation in Homogeneous Coordinates
Presentation transcript:

Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk

Two Dimensional Geometric Transformations

Basic Transformations Translation P P'P' x y

Basic Transformations Rotation x y θ φ P′=(x′,y′) r

Rotation (Cont.) Basic Transformations

Scaling x y Basic Transformations

3x3 Matrix Representations We can combine the multiplicative and translational terms for 2D transformations into a single matrix representation by expanding the 2x2 matrix representations to 3x3 matrices. This allows us to express all transformation equations as matrix multiplications.

Homogeneous Coordinates We represent each Cartesian coordinate position (x,y) with the homogeneous coordinate triple where

Homogeneous Coordinates(cont.) Thus, a general homogeneous coordinate representation can also be written as For 2D transformations we choose h=1. Each 2D position is represented with homogeneous coordinates

Translation in homogeneous coordinates

Rotation in homogeneous coordinates

Scaling in homogeneous coordinates

Composite Transformations:Translation If two successive translation are applied to a point P, then the final transformed location P' is calculated as

Composite Transformations:Rotation

Composite Transformations:Scalings

General Pivot Point Rotation Steps: -Translate the object so that the pivot point is moved to the coordinate origin. -Rotate the object about the origin. -Translate the object so that the pivot point is returned to its original position.

General Pivot Point Rotation(Cont.)

General Fixed Point Scaling Steps: -Translate the object so that the fixed point coincides with the coordinate origin. -Scale the object about the origin. -Translate the object so that the pivot point is returned to its original position.

General Fixed Point Scaling (x r, y r )

General Fixed Point Scaling

Concatenation Properties Matrix multiplication is associative Transformation product is not commutative

OTHER TRANSFORMATIONS Reflection About x-axis About y-axis x y

OTHER TRANSFORMATIONS x y Reflection about the origin

OTHER TRANSFORMATIONS Reflection about the line y=x. x y y = x 2 3

OTHER TRANSFORMATIONS Shear x-direction shear xx yy

TRANSFORMATION BETWEEN COORDINATE SYSTEMS Individual objects may be defined in their local cartesian reference system. The local coordinates must be transformed to position the objects within the scene coordinate system.

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) Steps for coordinate transformation -Translate so that the origin (x 0, y 0 ) of the x′-y′ system is moved to the origin of the x-y system. -Rotate the x′ axis on to the axis x.

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) y x x′ y′ θ x0x0 y0y0 0

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) y x x′ x0x0 y0y0 0 y′ θ

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) y x x′ x0x0 y0y0 0 y′

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.)

An alternative method: - Specify a vector V that indicates the direction for the positive y′ axis. Let - Obtain the unit vector u=(u x,u y ) along the x′ axis by rotating v 90 0 clockwise.

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) - Elements of any rotation matrix can be expressed as elements of orhogonal unit vectors. That is, the rotation matrix can be written as

TRANSFORMATION BETWEEN COORDINATE SYSTEMS(Cont.) y x x′ y′ x0x0 y0y0 0 V

Three Dimensional Geometric Transformations

P=(x,y,z) x 3D Translation P′=(x′,y′,z′) y z

3D Translation

3D Rotation(z-axis) z-axis rotation P=(x,y,z) x y z

3D Rotation(z-axis)

x-axis rotation P=(x,y,z) x y z 3D Rotation(x-axis)

y-axis rotation P=(x,y,z) x y z 3D Rotation(y-axis)

General 3D Rotation Rotation about an axis that is parallel to x-axes. -Translate object so that the rotation axis coincides with the parallel coordinate axis. -Perform specified rotation about the axis. -Translate the object so that the rotation axis is moved back to its original position.

Rotation about an axis that is parallel to x-axes. Rotation axis x y z

General 3D Rotation Rotation about an axis that is not parallel to one of the coordinate axes. -Translate object so that the rotation axis passes through the coordinate origin. -Rotate object so that the axis of rotation coincides with one of the coordinate axes. -Perform the specified rotation about that coordinate axis -Apply inverse rotations to bring the rotation axis back to its original orientation. -Apply the inverse translation to brig the rotation axis back to its original position.

Rotation about an axis that is not parallel to one of the coordinate axes. Rotation axis x y z P2P2 P1P1 Initial Position

Rotation about an axis that is not parallel to one of the coordinate axes. x y z P2P2 P1P1 Translate P 1 to the origin

Rotation about an axis that is not parallel to one of the coordinate axes. x y z P2P2 P1P1 Rotate P 2 onto the z-axis and rotate the object around it.

Rotation about an axis that is not parallel to one of the coordinate axes. x y z P2P2 P1P1 Rotate the axis to the original orientation

Rotation about an axis that is not parallel to one of the coordinate axes. x y z P2P2 P1P1 Translate the rotation axis to the original position

Rotation about an axis that is not parallel to one of the coordinate axes. An axis vector is defined by two points as A unit vector is defined as

Rotation about an axis that is not parallel to one of the coordinate axes. The first step is to set up the translation matrix

Rotation about an axis that is not parallel to one of the coordinate axes. The next step is to put the rotation axis on the z-axis. x y z u

Rotation about an axis that is not parallel to one of the coordinate axes. First, we rotate about the x-axis to transform u into the x-z plane. x y z u α

Rotation about an axis that is not parallel to one of the coordinate axes. First, we rotate about the x-axis to transform u into the x-z plane. x y z u α u′u′ U z =(0,0,1) α

Rotation about an axis that is not parallel to one of the coordinate axes. We can define the sine of α from the cross product of u and u′.

Rotation about an axis that is not parallel to one of the coordinate axes. The rotation matrix is

Rotation about an axis that is not parallel to one of the coordinate axes. x y z u β

Rotation about an axis that is not parallel to one of the coordinate x-axes.