COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Transformations Ed Angel Professor Emeritus of Computer Science
John C. Hart CS 318 Interactive Computer Graphics
3.3. Introduction to Real-time Physics III
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
CMPE 466 COMPUTER GRAPHICS
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
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.
3D Coordinate Systems and Transformations Revision 1
3-D Geometry.
3D orientation.
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
Linear Algebra Review. 6/26/2015Octavia I. Camps2 Why do we need Linear Algebra? We will associate coordinates to –3D points in the scene –2D points in.
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Now Playing: Gong Sigur Rós From Takk... Released September 13, 2005.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Rotation representation and Interpolation
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Rotations and Translations
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
3D Kinematics Consists of two parts 3D rotation 3D translation  The same as 2D 3D rotation is more complicated than 2D rotation (restricted to z- axis)
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
3D Computer Graphics An oh so brief introduction.
Rotations and Translations
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Geometric Transformations
Geometric Objects and Transformation
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
CS 551/645 Fall 2000 Parameterized Rotations, Curves, and Surfaces.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Math Review.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
Lecture 5: Introduction to 3D
This Week WeekTopic Week 1 Coordinate Systems, Basic Functions Week 2 Trigonometry and Vectors (Part 1) Week 3 Vectors (Part 2) Week 4 Vectors (Part 3:
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Computer Graphics I, Fall 2010 Transformations.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Fundamentals of Computer Animation Orientation and Rotation.
REFERENCE: QUATERNIONS/ Ogre Transformations.
Image Warping 2D Geometric Transformations
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Transformations Review 4/18/2018 ©Babu 2009.
Modeling Transformations
Computer Animation Algorithms and Techniques
Review: 3D Transforms Continued
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
3D Kinematics Consists of two parts
Game Design, Development, and Technology
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Computer Graphics Transformations.
FP1 Matrices Transformations
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
(c) University of Wisconsin, CS559
UMBC Graphics for Games
Geometric Objects and Transformations (II)
Image manipulation via matrices
Presentation transcript:

COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 TRANSFORMATION TYPES SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 80 TO EFFECTIVELY PLACE OBJECTS IN A GRAPHICAL ENVIRONMENT, IT IS CONVENIENT TO USE CERTAIN MATRIX TRANSFORMATIONS TO MANIPULATE THEIR POSITION AND ORIENTATION. THE SPECIFIC TYPES OF TRANSFORMATIONS THAT WE USE ARE: SCALING: MULTIPLY EACH DIMENSION BY A CONSTANT FACTOR TRANSLATION: ADD A CONSTANT AMOUNT IN EACH DIMENSION ROTATION: SPIN EACH OBJECT SOME ANGLE AROUND THE ORIGIN CAREFULLY COMBINING THESE THREE TYPES OF TRANSFORMATIONS WILL PERMIT A GRAPHICAL OBJECT TO BE POSITIONED AND ORIENTED IN ANY DESIRED FASHION.

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 ROTATION SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 81 2D ROTATION: (x, y)  (xcos  - ysin , xsin  + ycos  )

AFFINE TRANSFORMATIONS CS 482 – FALL D ROTATION SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 82 PITCH: ROTATION ABOUT X- AXIS YAW: ROTATION ABOUT Y- AXIS ROLL: ROTATION ABOUT Z- AXIS

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 SCALING SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 83 2D SCALING: (x, y) (k 1 x, k 2 y)

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 TRANSLATION SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 84 2D TRANSLATION: (x, y) xx yy (x +  x, y +  y) ANY 2X2 MATRIX REPRESENTING TRANSLATION WOULD REQUIRE NON- CONSTANT VALUES IN THE MATRIX (REQUIRING A SEPARATE MATRIX FOR EACH POINT BEING TRANSLATED!)

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 HOMOGENEOUS COORDINATES SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 85 THE TRANSLATION MATRIX PROBLEM IS REMEDIED BY THE USE OF HOMOGENEOUS COORDINATES, WHICH UTILIZE AN EXTRA COORDINATE (I.E., A “WEIGHT” FACTOR) FOR EVERY 2D POINT. ROTATION TRANSLATION SCALING (NOTE: IN MOST OF OUR WORK, THE WEIGHT FACTOR WILL MERELY BE 1.)

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 COMBINING TRANSFORMATIONS SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 86 Original Image BY APPLYING DIFFERENT TRANSFORMATIONS IN A PARTICULAR ORDER, GRAPHICAL OBJECTS CAN BE MANIPULATED TO FORM COMPLEX VARIATIONS OF THEIR ORIGINAL FORMS. 1.ENLARGE ONE COPY OF THE ORIGINAL IMAGE VIA SCALING, AND THEN TRANSLATE IT TO THE RIGHT. 2.SHRINK ANOTHER COPY OF THE ORIGINAL IMAGE VIA SCALING, ROTATE IT SLIGHTLY COUNTERCLOCKWISE, AND THEN TRANSLATE IT HIGHER AND TO THE RIGHT. 3.SHRINK A THIRD COPY OF THE ORIGINAL IMAGE VIA SCALING, ROTATE IT CLOCKWISE A BIT LESS THAN THE SECOND IMAGE, AND THEN TRANSLATE IT SLIGHTLY HIGHER AND FURTHER TO THE RIGHT.

AFFINE TRANSFORMATIONS CS 482 – FALL 2015 ORDER OF TRANSFORMATIONS SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 87 CARE MUST BE TAKEN WHEN APPLYING TRANSFORMATIONS, SINCE THE RESULTING IMAGE VARIES WITH THE ORDER IN WHICH THE TRANSFORMATIONS ARE APPLIED. R=60  COUNTERCLOCKWISE ROTATION S=150% X-SCALING & 50% Y-SCALING T=TRANSLATION BY (-3,-1) RfirstRfirstSsecondSsecondTthirdTthird SfirstSfirstTsecondTsecondRthirdRthird

QUATERNIONS CS 482 – FALL 2015 SMOOTH ROTATIONS SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 88 TRADITIONALLY, A GRAPHICAL OBJECT’S ORIENTATION HAS BEEN DEFINED VIA “EULER ANGLE” ROTATIONS ABOUT THE THREE COORDINATE AXES (I.E., PITCH, YAW, AND ROLL). HOWEVER, THIS APPROACH CAN RESULT IN “GIMBAL LOCK”, IN WHICH ROTATION ABOUT ONE AXIS EFFECTIVELY OVERRIDES ROTATION ABOUT ANOTHER AXIS. OPENGL USES ROTATION ABOUT A USER-SPECIFIED AXIS, BUT THAT APPROACH CAN RESULT IN INTERPOLATIONS BETWEEN ORIENTATIONS THAT DO NOT APPEAR SMOOTH. A MUCH SMOOTHER APPROACH INVOLVES QUATERNIONS, FOUR-DIMENSIONAL VERSIONS OF COMPLEX NUMBERS THAT CAN ESSENTIALLY BE VIEWED AS A 3D VECTOR, COMBINED WITH A SCALAR.

QUATERNIONS CS 482 – FALL 2015 SPHERICAL LINEAR INTERPOLATION SEPTEMBER 17, 2015: TRANSFORMATIONSPAGE 89 QUATERNIONS MAY BE USED TO CREATE SLERPS, SPHERICAL LINEAR INTERPOLATIONS, WHICH COMPEL THE INTERPOLATED ORIENTATIONS TO BE ALONG THE GREAT CIRCLE OF A SPHERE.  P Q C GIVEN A SPHERE WITH CENTER C AND SURFACE POINTS P AND Q, WHERE THE ANGLE BETWEEN THE CP AND CQ VECTORS IS . THE SLERP EQUATION FOR ALL OF THE POINTS ON THE GREAT CIRCLE OF THE SPHERE JOINING P AND Q IS: