Computer Graphics: 3D Transformations

Slides:



Advertisements
Similar presentations
Computer Graphics: 2D Transformations
Advertisements

3D Transformations Assist. Prof. Dr. Ahmet Sayar
Affine Transformations Jim Van Verth NVIDIA Corporation
Points, Vectors, Lines, Spheres and Matrices
Transformations Ed Angel Professor Emeritus of Computer Science
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Three Dimensional Modeling Transformations
Two-Dimensional Geometric Transformations
CMPE 466 COMPUTER GRAPHICS
CMPE 466 COMPUTER GRAPHICS
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
Computer Graphics University of Palestine Dr. Sana’a Wafa Al-Sayegh
Computer Graphics with OpenGL 3e
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
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.
CS 450: Computer Graphics 2D TRANSFORMATIONS
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.
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
2D Transformation of Graphics
Geometric Transformations Jehee Lee Seoul National University.
2D Geometric Transformations
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
Geometric Transformations
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
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.
Transformations of Objects – 3D
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 A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Geometric Transformations
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
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.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
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.
Computer Graphics I, Fall 2010 Transformations.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
3D Geometry and Transformations
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Modeling Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
3D Geometric Transformation
Computer Graphics CC416 Week 15 3D Graphics.
Review: Transformations
3D Transformation.
Computer Graphics 3D Transformations
Review: Transformations
Presentation transcript:

Computer Graphics: 3D Transformations Kocaeli Universitesity Computer Engineering Department Fall 2011

Extending From 2d Approach Methods for geometric transformations in three dimensions are extended from two-dimensional methods by including considerations for the z coordinate. A three-dimensional position, expressed in homogeneous coordinates, is represented as a four-element column vector. Thus , each geometric transformation operator is now 4 by 4 matrix.

Translation

Rotation: z-axis rotation 3D Coordinate-Axis Rotations z-axis rotation (counter-clockwise)

Rotation: x-axis rotation counter-clockwise

Rotation: y-axis rotation counter-clockwise

Scaling Change the coordinates of the object by scaling factors. y x z

Scaling with respect to a Fixed Point Translate to origin, scale, translate back y x y y y x x x z z z z Translate Scale Translate back

Scaling with respect to a Fixed Point

Reflection Reflection over planes, lines or points y y y y x x x x z z

Shear Deform the shape depending on another dimension

Advanced Topics

1. Rotating about an axis that is parallel to one of the coordinates axes Translate the object so that the rotation axis coincides with the parallel coordinate axis Perform the specified rotation about that axis Translate the object so that rotation axis is moved back to its original A coordinate position P is transformed with the sequence

Rotation Around a Parallel Axis Rotating the object around a line parallel to one of the axes: Translate to axis, rotate, translate back. y y y y x x x x z z z z Translate Rotate Translate back

2. Rotation Around an Arbitrary Axis In this case, we also need rotation to align the rotation axis with a selected coordinate axis and then to bring the rotation axis back to its original orientation A rotation axis can be defined with two coordinate position, or one position and direction angles. Now we assume that the rotation axis is defined by two points, and that the direction of rotation is to be counter clockwise when looking along the axis from p2 to p1.

Rotation Around an Arbitrary Axis Translate the object so that the rotation axis passes though the origin Rotate the object so that the rotation axis is aligned with one of the coordinate axes Make the specified rotation Reverse the axis rotation Translate back x z

Rotation Around an Arbitrary Axis

Rotation Around an Arbitrary Axis u is the unit vector along V: First step: Translate P1 to origin: Next step: Align u with the z axis we need two rotations: rotate around x axis to get u onto the xz plane, rotate around y axis to get u aligned with z axis.

Rotation Around an Arbitrary Axis Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis y y y u u u' α α x x x u uz β z z z

Dot product and Cross Product v dot u = vx * ux + vy * uy + vz * uz. That equals also to |v|*|u|*cos(a) if a is the angle between v and u vectors. Dot product is zero if vectors are perpendicular. v x u is a vector that is perpendicular to both vectors you multiply. Its length is |v|*|u|*sin(a), that is an area of parallelogram built on them. If v and u are parallel then the product is the null vector.

Rotation Around an Arbitrary Axis Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis We need cosine and sine of α for rotation u u' α x uz z Projection of u on yz plane

Rotation Around an Arbitrary Axis Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis u β x u''= (a,0,d) z