1 Computer Graphics Week9 -3D Geometric Transformation.

Slides:



Advertisements
Similar presentations
Computer Graphics: 2D Transformations
Advertisements

Computer Graphics 2D & 3D Transformation.
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Geometric Transformations
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
CMPE 466 COMPUTER GRAPHICS
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
2.1 si SI31 Advanced Computer Graphics AGR Lecture 2 Basic Modelling.
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5.
3D Concepts UNIT 3. 3-D Coordinate Spaces Remember what we mean by a 3-D coordinate space x axis y axis z axis P y z x Right-Hand Reference System.
Computer Graphics with OpenGL 3e
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Graphics Programming Graphics Programming: Transformations.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
1 Computer Graphics Week7 -2D Rotation. 3-Rotation A shape can be rotated about any of the three axes. A rotation about the z-axis will actually rotate.
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
Transformations Dr. Amy Zhang.
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
2D Transformations.
Lecture Notes: Computer Graphics.
Geometric Transformations Jehee Lee Seoul National University.
Lecture 3 Transformations.
Transformations Jehee Lee Seoul National University.
Computer Graphics, KKU. Lecture 51 Transformations Given two frames in an affine space of dimension n, we can find a ( n+1 ) x ( n +1) matrix that.
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
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Viewing CS418 Computer Graphics John C. Hart. Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords.
Computer Graphics 3D Transformations. Translation.
3D Transformations. Translation x’ = x + tx y’ = y + ty z’ = z + tz P = P’ = T = P’ = T. P tx ty tz xyz1xyz1 x’ y’ z’ 1 x y.
Affine Transformation. Affine Transformations In this lecture, we will continue with the discussion of the remaining affine transformations and composite.
Lecture 3 Transformations. 2D Object Transformations The functions used for modifying the size, location, and orientation of objects or of the camera.
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.
Computer Graphics Matrices
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
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.
Geometric Transformations. Transformations Linear transformations Rigid transformations Affine transformations Projective transformations T Global reference.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
1 Geometric Transformations Modelling Transforms By Dr.Ureerat Suksawatchon.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Computer Graphics Overview
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
2D Geometric Transformations
Computer Graphics CC416 Week 15 3D Graphics.
3D Geometric Transformations
Lecture 7 Geometric Transformations (Continued)
Three-Dimensional Graphics
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Three-Dimensional Graphics
Geometric Objects and Transformations (II)
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

1 Computer Graphics Week9 -3D Geometric Transformation

We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations to view our 3D models effectively. Let us look into 3D transformations in more detail. 2

 Just as 2D transformations can be represented by 3 x 3 matrices using homogenous coordinates.  3D transformations can be represented by 4 x 4 matrices.  3D homogenous coordinates are represented as a quadruplet (x, y, z, W).  We discuss the representation of the three most commonly used transformations: translation, scaling, and rotation. 3

1-Translation The translation matrix T(Tx, Ty, Tz) is defined as: so any vertex point: 4

5

2- Scalling Scaling is similarly extended to be defined as: 6

 Recall from Lecture 3 that scaling occurs about a point. This point is called the pivot point. The scaling matrix defined above scales about the origin.  You can define models to have different pivot points by setting the transformation stack appropriately. 7

3-Rotation Rotation matrices are defined uniquely based on the axis of rotation and the pivot point. The axis of rotation is a normalized vector defining the axis in 3D space along which the rotation will occur. 8

(A 3D vector will simply be the triplet (x, y, z) defining the direction of the axis). The 2D rotation we saw earlier is a 3D rotation about the z-axis (the vector (0,0,1)), and the world origin (0,0,0) and is defined as: 9

Similarly the rotation matrix about the x-axis is defined to be: and about the y-axis as: 10

Just as with 2D transforms, 3D transforms can be composed together to provide desired effects. The order in which the transforms are applied is important. Recall from our previous section that the OpenGL commands for matrix operations 11

sets the current matrix to be the 4 x 4 identity matrix. sets the matrix passed in to be the current transformation matrix. multiplies the current matrix by the matrix passed in as the argument. 12

Additionally, OpenGL provides three utility functions for the most commonly used transformations. multiplies the current transformation matrix by the matrix to move an object by (Tx, Ty, Tz) units 13

multiplies the current transformation matrix by a matrix that rotates an object in a counterclockwise direction by theta degrees about the axis defined by the vector (x, y, z). multiplies the current transformation matrix by a matrix that scales an object by the factors, (Sx, Sy, Sz). 14

All three commands are equivalent to producing an appropriate translation, rotation, or scaling matrix and then calling glMultMatrixf0 with that matrix as the argument. For example, Let us apply some transformations to the famous pyramid that we created earlier. 15

We rotate the pyramid about the y-axis and use double buffering to display the rotation as an animation. 16

 In lecture 3, we saw how to map a two- dimensional world onto the two dimensional screen.  The process was a simple mapping of 2D world coordinates onto the 2D viewport of the window.  Model positions are first clipped against the 2D world coordinates and then mapped into the viewport of the window for display. 17