Graphics Matrices. Today’s Lecture Brought to you by the integer 6 and letter ‘K’; 2D and 3D points Matrices Rotations Translation Putting it all together.

Slides:



Advertisements
Similar presentations
Points, Vectors, Lines, Spheres and Matrices
Advertisements

7.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 7 Introducing SVG Transformations on Elements.
This terms course Last term we both worked on learning 2 things –Processing –The concepts of graphics etc. This term will focus more on the basic concepts.
Computer Graphics Lecture 4 Geometry & Transformations.
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Coordinate Systems Dr. Midori Kitagawa.
Three Dimensional Modeling Transformations
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
Picture Manipulation The manipulation of (already created) pictures. May be applied to vector graphics or bitmaps. We will consider bitmaps and introduce.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
Chapter 4.1 Mathematical Concepts
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
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.
Robotics, Fall 2006 Dr. Jennifer Kay Lecture 1: Coordinate Frames
CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
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.
Using Matrices to Perform Geometric Transformations
Reference: “3D Math Primer for Graphics and Game Development, 2 nd ed.” Chapter 5 Chapter 6.x MATRIX.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices.
Mathematical Fundamentals
Chapter 4.1 Mathematical Concepts
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
And an introduction to matrices COORDINATE SYSTEMS JEFF CHASTINE 1.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
TECH 104 – Technical Graphics Communication Week 13: 3D Modeling Basics.
Computational Biology, Part E Basic Principles of Computer Graphics Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
CSCE 552 Spring 2011 Math By Jijun Tang. Layered.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Multiplying Matrices Dr. Shildneck Fall, Can You Multiply Matrices? ›What do you think has to be true in order to multiply? ›What procedure do you.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Geometric Objects and Transformation
1 Computer Graphics Week9 -3D Geometric Transformation.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
THE REASON YOU MIGHT ACTUALLY WANT TO LEARN THIS STUFF BY CHRISTINE LAUBER Geometry and Matrices Hands On Activity.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
Robot Kinematics: Position Analysis 2.1 INTRODUCTION  Forward Kinematics: to determine where the robot ’ s hand is? (If all joint variables are known)
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
How to Multiply Two Matrices. Steps for Matrix Multiplication 1.Determine whether the matrices are compatible. 2.Determine the dimensions of the product.
8.2 Operations With Matrices
Computer Graphics Matrices
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
Revision on Matrices Finding the order of, Addition, Subtraction and the Inverse of Matices.
3.6 Multiplying Matrices Homework 3-17odd and odd.
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.
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.
Computer Graphics I, Fall 2010 Transformations.
CS 376 Introduction to Computer Graphics 02 / 14 / 2007 Instructor: Michael Eckmann.
Systems of Equations and Matrices Review of Matrix Properties Mitchell.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Matrix Transformations Reference: “3D Math Primer for Graphics and Game Development” – , , , , 9.4
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry "Old Henry And His Old Aunt" Defined using right triangle  x y h.
TECH 104 – Technical Graphics Communication Week 12: 3D Modeling Basics.
13.4 Product of Two Matrices
Math Fundamentals Maths revisit.
Computer Graphics CC416 Week 15 3D Graphics.
WarmUp 2-3 on your calculator or on paper..
With an immediate use for it
Chapters 5/4 part2 understanding transformations working with matrices
D2 Indices and matrices Matrix representation in computer systems:
3.6 Multiply Matrices.
Transformations with Matrices
Presentation transcript:

Graphics Matrices

Today’s Lecture Brought to you by the integer 6 and letter ‘K’; 2D and 3D points Matrices Rotations Translation Putting it all together

Wireframes Most things can be represented graphically by using points (square, pyramid, your face…) Draw lines between points to make up a wireframe Currently the fastest way to build worlds (curves were not allowed - too slow!)

2-Dimensional Coordinates x axis y axis ( +, + ) ( +, - ) ( -, - ) ( -, + )

3-Dimensional Coordinates Have an extra dimension! “Comes out of paper” - to and fro This new dimension is referred to as “z coordinate” Gives the point depth Example coordinate: ( 2, 5, -4)

Right-hand/Left-hand Hold out right hand. Extend Thumb, first and second fingers. This is positive direction (thumb pointing towards your face) Use left hand for Left-hand coordinate system. In this class, we use Right-handed coordinate system! (z comes out of paper with increasing numbers)

What does it look like? X axis Y axis z a x i s

New Representation of Points 2D old way: (x, y) 2D new way: 3D old way: (x, y, z) 3D new way: [ ] x y x y z

An Example of Rotation (45 degrees) Question: how does x value “behave” as it increments from 0 degrees to 360 degrees?

Matrix Multiplication Used to change one point to another Good for rotating and translating! Will multiply the point by a matrix to give us another point A matrix is an n x m set of data (can be numbers or functions) n = number of rows, m = number of columns Sound complex? Let’s see!

What does it look like? (2D Matrix)

How do I multiply? My 2D coordinates are (7, 8) =

The X coordinate Multiply, Add, Multipy, Add…… New x coord is: 3*7 + 4*8

The Y Coordinate New y coord is: 7*1 + 9*8

Now in 3D! Our point is (9, -10, 12) New x coord is: 9 * 1 + (-10) * * 3

New y coordinate New y coord is: 9 * 3 + (-10) * * 5

New z coordinate New z coord is: 9 * 4 + (-10) * * 8

More and More! (larger matrices) (Note: have to do this nine times! Here, we are trying to find the upper left value of the new matrix)

Another Pass (Note: here we find the middle (of the nine calculations). This is where the two boxes intersect!)

Using what you’ve learned Now you can rotate wireframes in 2D and in 3D This stuff really is used (most video games, simulations, VR etc…) We can rotate (say, a cube) about the x, y, and/or z axis (demonstration) Must specify the degree or amount of rotation (45 o, 90 o, 123 o, 450 o, etc…)

An Example of Rotation (45 degrees)

2D rotation Matrix  = number of degrees cos (  ) -sin (  ) sin (  )cos (  )

3D rotations Can rotate in 3D space too! Able to rotate around each axis –x axis –y axis –z axis

Rotations around X axis 1 0 cos (  ) sin (  ) -sin (  )

*Rotations about Y axis* 1 0 cos (  ) sin (  ) -sin (  )

Rotations about Z Axis 1 0 cos (  ) sin (  ) -sin (  )

What about all three? There is a need to rotate about more than one axis at a time Must multiply rotation matrices together first before multiplying new points (multiply z-rotation times x-rotation. Then multiply points with this new matrix)

Animation Algorithm (in psuedo-code) Get original points p of object loop rotate all p points by  to create p ’ redraw lines between all points p ’ increment  end loop // remember to keep original points!