Three-Dimensional Graphics

Slides:



Advertisements
Similar presentations
Computer Graphics 2D & 3D Transformation.
Advertisements

Figure 1 ; Video File. Figure 2 : Anatomical orthogonal coordinate system Z Y +RY : Left Axial Rotation -RY: Right Axial Rotation +RZ : Right Lateral.
Hierarchical Transformation. Summary Alternatively, OpenGL thinks: A transformation updates the coordinate system. For each change, the transformation.
8. 2D Coordinate Operations Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze.
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.
Math for CSTutorial 11 Matrix Multiplication Rule Matrices make linear transformations of vectors.
Transformations Review. Recall: Types of Transformations Translations Reflections Rotations.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Multiplication M1 v1 = v = = M1 M2 = M
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.
3D Geometric Transformation Point in 3D space –Position (x, y, z) –Color (r, g, b) –Normal (Nx, Ny, Nz) Homogenous Coordinates –Position (x,y,z,w) –Usually.
UNIT - 5 3D transformation and viewing. 3D Point  We will consider points as column vectors. Thus, a typical point with coordinates (x, y, z) is represented.
3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. 3D Transformation glVertex3f(x, y,z);
5.2 Three-Dimensional Geometric and Modeling Transformations 2D3D Consideration for the z coordinate.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
1 Computer Graphics Week9 -3D Geometric Transformation.
Animating Rotations and Using Quaternions. What We’ll Talk About Animating Translation Animating 2D Rotation Euler Angle representation 3D Angle problems.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Geometrical Transformations 2 Adapted from Fundamentals of Interactive Computer Graphics, Foley and van Dam, pp , by Geb Thomas.
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.
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Gopi -ICS280F02 - Slide 1 Model Transformations. Gopi -ICS280F02 - Slide 2 Popular Linear Transformations TranslationTranslation ScalingScaling RotationRotation.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
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.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Transformations in 3D Lecture 17 Mon, Oct 6, 2003.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
CSCE 441 Computer Graphics: 2D Transformations
Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
2D Geometry - points and polygons
Transformations Review 4/18/2018 ©Babu 2009.
Modeling Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Geometric Transformations
Camera Position (5.6) we specify the position and orientation of the camera to determine what will be seen. use gluLookAt (eye x, y, z, at x, y, z, up.
2D Transformations By: KanwarjeetSingh
2D Geometric Transformations
Review: Transformations
3D Transformation.
Computer Graphics Lecture 18 3-D Transformations-II Taqdees A
Translation Rotation Scaling
3D Geometric Transformations
Introduction to Computer Graphics CS 445 / 645
Review: Transformations
Lecture 7 Geometric Transformations (Continued)
2D Transformations y y x x y x.
Computer Graphics Transformations
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Chapter IV Spaces and Transforms
Transformations in 3 Dimensions CS /28/2018 Dr. Mark L. Hornick
Three-Dimensional Graphics
Identify Which Combination of Transformations took place
Geometric Transformations
Geometric Objects and Transformations (II)
CSCE441: Computer Graphics 2D/3D Transformations
CS1550 Fundamentals For Computer Graphics Transformations-2
Maintenance Sheet 25 Due Friday Comprehensive Test- Friday
Transformations.
TWO DIMENSIONAL TRANSFORMATION
Transformations Review
Presentation transcript:

Three-Dimensional Graphics A 3D point (x,y,z) – x,y, and Z coordinates We will still use column vectors to represent points Homogeneous coordinates of a 3D point: (x,y,z,1) Transformation will be performed using 4x4 matrix T x y z

Right hand coordinate system X x Y = Z ; Y x Z = X; Z x X = Y; Y y z x +z x Left hand coordinate system Not used in this class and Not in OpenGL Right hand coordinate system

3D transformation Very similar to 2D transformation Translation x’ = x + tx; y’ = y + ty; z’ = z + tz X’ 1 0 0 tx X Y’ 0 1 0 ty Y Z’ 0 0 1 tz Z 1 0 0 0 1 1 = homogeneous coordinates

3D transformation Scaling X’ = X * Sx; Y’ = Y * Sy; Z’ = Z * Sz X’ Sx 0 0 0 X Y’ 0 Sy 0 0 Y Z’ 0 0 Sz 0 Z 1 0 0 0 1 1 =

3D transformation 3D rotation is done around a rotation axis Fundamental rotations – rotate about x, y, or z axes Counter-clockwise rotation is referred to as positive rotation (when you look down negative axis) x y z +

3D transformation Rotation about Z – similar to 2D rotation x’ = x cos(q) – y sin(q) y’ = x sin(q) + y cos(q) z’ = z y x + cos(q) -sin(q) 0 0 sin(q) cos(q) 0 0 0 0 1 0 0 0 0 1 z OpenGL - glRotatef(q, 0,0,1)

3D transformation Rotation about y z’ = z cos(q) – x sin(q) + Rotation about y z’ = z cos(q) – x sin(q) x’ = z sin(q) + x cos(q) y’ = y cos(q) 0 sin(q) 0 0 1 0 0 -sin(q) 0 cos(q) 0 0 0 0 1 z x y + OpenGL - glRotatef(q, 0,1,0)

3D transformation Rotation about x y’ = y cos(q) – z sin(q) + Rotation about x y’ = y cos(q) – z sin(q) z’ = y sin(q) + z cos(q) x’ = x 1 0 0 0 0 cos(q) -sin(q) 0 0 sin(q) cos(q) 0 0 0 0 1 y z x + OpenGL - glRotatef(q, 1,0,0)

3D transformation Arbitrary rotation axis (rx,ry,rz) Text p. 212 explains how to do it We omit the detail here Use OpenGL: glRotatef(angle, rx, ry, rz) x z y (rx, ry, rz)