UMBC Graphics for Games

Slides:



Advertisements
Similar presentations
Complex Representation of Harmonic Oscillations. The imaginary number i is defined by i 2 = -1. Any complex number can be written as z = x + i y where.
Advertisements

Lecture 3: orientation Computer Animation.
John C. Hart CS 318 Interactive Computer Graphics
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
Orientation & Quaternions
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
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
Quaternions CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Rotation representation and Interpolation
Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Technical Background.
CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Lecture 21 Representing Rotations.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Computer Graphics 3D Transformations. 3D Translation Remembering 2D transformations -> 3x3 matrices, take a wild guess what happens to 3D transformations.
MATH – High School Common Core Vs Kansas Standards.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
2IV60 Computer Graphics Basic Math for CG
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.1: 3D Geometry Jürgen Sturm Technische Universität München.
Geometric Intuition Randy Gaul. Vectors, Points and Basis Matrices Rotation Matrices Dot product and how it’s useful Cross product and how it’s useful.
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Visualizing Orientation using Quaternions Gideon Ariel; Rudolf Buijs; Ann Penny; Sun Chung.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
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)
Mathematical Topics Review of some concepts:  trigonometry  aliasing  coordinate systems  homogeneous coordinates  matrices, quaternions.
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Computer Graphics Bing-Yu Chen National Taiwan University.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16.
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.
Maths and Technologies for Games Quaternions CO3303 Week 1.
Advanced Computer Graphics Spring 2014
Animating Rotations and Using Quaternions. What We’ll Talk About Animating Translation Animating 2D Rotation Euler Angle representation 3D Angle problems.
Rotation and Orientation: Fundamentals Jehee Lee Seoul National University.
Matthew Christian. About Me Introduction to Linear Algebra Vectors Matrices Quaternions Links.
CS 551/645 Fall 2000 Parameterized Rotations, Curves, and Surfaces.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Math Review.
Comparing Two Motions Jehee Lee Seoul National University.
3D Game Engine Design 1 3D Game Engine Design Ch D MAP LAB.
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:
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
1 Dr. Scott Schaefer Quaternions and Complex Numbers.
Quaternionic Splines of Paths Robert Shuttleworth Youngstown State University Professor George Francis, Director illiMath2001 NSF VIGRE REU UIUC-NCSA.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Advanced Math.
Fundamentals of Computer Animation Orientation and Rotation.
REFERENCE: QUATERNIONS/ Ogre Transformations.
Transformations Review 4/18/2018 ©Babu 2009.
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
3D Kinematics Consists of two parts
3D Geometric Transformation
3D Geometric Transformations
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Rotation representation and Interpolation
CS-378: Game Technology Lecture #2: Transformations Prof. Okan Arikan
12CDE 12C: Vectors in the Plane 12D: The Magnitude of a Vector
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Game Programming Algorithms and Techniques
Rotation and Orientation: Fundamentals
Presentation transcript:

UMBC Graphics for Games Quaternion Rotation UMBC Graphics for Games

Representing Rotation

Rotation Matrices Rotation can be expressed as an orthogonal matrix Every orthogonal matrix is a rotation and/or mirroring New X axis New Y axis New Z axis

Rotation Matrices Rotation can be expressed as an orthogonal matrix Every orthogonal matrix is a rotation and/or mirroring Fits with other transformation matrices Translation, Scaling, Reflection, Perspective Interpolations between rotation matrices are not rotations Interpolates endpoint positions

Euler Angles Rotate around series of axes Subject to gimbal lock Roll, Pitch, Yaw Intuitive, pitch/yaw form common for first person controllers Yaw = turn left/right Pitch = look up/down Roll = rotate around view Subject to gimbal lock First axis lines up with last axis, lose ability to rotate freely Interpolates along lines of longitude/latitude Can be weird near poles

Quaternions Extension of complex numbers Interpolations on great circle Related Geometric Algebra also works Though not as popular in games

Complex Numbers

Imaginary number i Define imaginary number i where Complex number has real and imaginary components Interpret as points on the 2D plane Conjugate: negate the imaginary part

Complex Arithmetic Addition: add components Multiplication Component algebra: Multiply magnitudes, add angles:

Complex Transformations Point Translation = addition Scale = multiply by real scalar Rotate = multiply by unit-length complex (magnitude = 1) Component form is identical to matrix rotation

Basic Rotations Pure imaginary = rotation by 90

Quaternions

Quaternion basics First created by Hamilton in 1843 for physics rotations Define orthogonal imaginary axes Multiplication order matters, positive in ijk order

Quaternion Math Like complex has real + imaginary, quaternion is real + vector Conjugate negates vector part Addition by component

Quaternion Multiplication By component Vector form

Quaternion Transformations Point is pure quaternion Translation = addition of pure quaternion Scale = multiply by real scalar Rotation = sandwiched multiply by unit quaternion and conjugate Where For one point, algebraically optimized version with cross products For more points, cheaper to convert to matrix

Basic Rotations Rotation Rotate by 0º Rotate by 180º around vector

Interpolation Interpolate along great circle between two vectors / quaternions Normalized Linear Interpolation (NLERP) Cheap, but speeds up in the middle Spherical Linear Interpolation (SLERP) Interpolate in equal-angular steps