CMPE 466 COMPUTER GRAPHICS

Slides:



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

Computer Graphics: 3D Transformations
Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN Author: Prof. Farid. Amirouche University of Illinois-Chicago.
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Three Dimensional Viewing
1 Computer Graphics Chapter 8 3D Transformations.
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
Three Dimensional Modeling Transformations
CMPE 466 COMPUTER GRAPHICS Chapter 8 2D Viewing Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth Edition by Donald Hearn,
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
CMPE 466 COMPUTER GRAPHICS
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
CMPE 466 COMPUTER GRAPHICS
Computer Graphics with OpenGL 3e
Screw Rotation and Other Rotational Forms
2IV60 Computer graphics set 4:3D transformations and hierarchical modeling Jack van Wijk TU/e.
Mathematical Fundamentals
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
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
2D Transformation of Graphics
Geometric Transformations Jehee Lee Seoul National University.
Rotations and Translations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Geometric Transformations
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Transformations of Objects – 3D
1 Computer Graphics Week9 -3D Geometric Transformation.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Computer Graphics 3D Transformations. Translation.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
Three-Dimensional Viewing Hearn & Baker Chapter 7
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
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.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
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.
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.
3D Transformations 2D coordinates3D coordinates x y x y z x z y Right-handed coordinate system:
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Computer Graphics Lecture 16 Fasih ur Rehman. Last Class Homogeneous transformations Types of Transformations – Linear Transformations – Affine Transformations.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Geometric Transformations
3D Geometric Transformation
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3D Transformations
2D Viewing Pipeline.
Mobile Robot Kinematics
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Geometric Objects and Transformations (II)
CSCE441: Computer Graphics 2D/3D Transformations
Presentation transcript:

CMPE 466 COMPUTER GRAPHICS Chapter 9 3D Geometric Transformations Instructor: D. Arifler Material based on - Computer Graphics with OpenGL®, Fourth Edition by Donald Hearn, M. Pauline Baker, and Warren R. Carithers Fundamentals of Computer Graphics, Third Edition by by Peter Shirley and Steve Marschner Computer Graphics by F. S. Hill

3D translation Figure 9-1 Moving a coordinate position with translation vector T = (tx , ty , tz ) .

3D rotation Figure 9-3 Positive rotations about a coordinate axis are counterclockwise, when looking along the positive half of the axis toward the origin.

3D z-axis rotation Figure 9-4 Rotation of an object about the z axis.

Rotations To obtain rotations about other two axes x  y  z  x E.g. x-axis rotation E.g. y-axis rotation

General 3D rotations Figure 9-8 Sequence of transformations for rotating an object about an axis that is parallel to the x axis.

Arbitrary rotations Figure 9-9 Five transformation steps for obtaining a composite matrix for rotation about an arbitrary axis, with the rotation axis projected onto the z axis.

Arbitrary rotations Figure 9-10 An axis of rotation (dashed line) defined with points P1 and P2. The direction for the unit axis vector u is determined by the specified rotation direction.

Rotations Figure 9-11 Translation of the rotation axis to the coordinate origin.

Rotations Figure 9-12 Unit vector u is rotated about the x axis to bring it into the xz plane (a), then it is rotated around the y axis to align it with the z axis (b).

Rotations Two steps for putting the rotation axis onto the z-axis Rotate about the x-axis Rotate about the y-axis Figure 9-13 Rotation of u around the x axis into the xz plane is accomplished by rotating u' (the projection of u in the yz plane) through angle α onto the z axis.

Rotations Projection of u in the yz plane Cosine of the rotation angle where Similarly, sine of rotation angle can be determined from the cross-product

Rotations Equating the right sides where |u’|=d Then,

Rotations Next, swing the unit vector in the xz plane counter-clockwise around the y-axis onto the positive z-axis Figure 9-14 Rotation of unit vector u'' (vector u after rotation into the xz plane) about the y axis. Positive rotation angle β aligns u'' with vector uz .

Rotations and so that Therefore

Rotations Together with

In general Figure 9-15 Local coordinate system for a rotation axis defined by unit vector u.

Quaternions Scalar part and vector part Think of it as a higher-order complex number Rotation about any axis passing through the coordinate origin is accomplished by first setting up a unit quaternion where u is a unit vector along the selected rotation axis and θ is the specified rotation angle Any point P in quaternion notation is P=(0, p) where p=(x, y, z)

Quaternions The rotation of the point P is carried out with quaternion operation where This produces P’=(0, p’) where Many computer graphics systems use efficient hardware implementations of these vector calculations to perform rapid three-dimensional object rotations. Noting that v=(a, b, c), we obtain the elements for the composite rotation matrix. We then have

Quaternions Using With u=(ux, uy, uz), we finally have About an arbitrarily placed rotation axis: Quaternions require less storage space than 4 × 4 matrices, and it is simpler to write quaternion procedures for transformation sequences. This is particularly important in animations, which often require complicated motion sequences and motion interpolations between two given positions of an object.

3D scaling Figure 9-17 Doubling the size of an object with transformation 9-41 also moves the object farther from the origin.

3D scaling Figure 9-18 A sequence of transformations for scaling an object relative to a selected fixed point, using Equation 9-41.

Composite 3D transformation example

Transformations between 3D coordinate systems Figure 9-21 An x'y'z' coordinate system defined within an x y z system. A scene description is transferred to the new coordinate reference using a transformation sequence that superimposes the x‘y‘z' frame on the xyz axes.