THE MATH LECTURE Part I Matrices INTRODUCTION For






































- Slides: 38
THE MATH LECTURE (Part I - Matrices)
INTRODUCTION • For 2 D games, we use a lot of trigonometry • For 3 D games, we use a lot of linear algebra • Most of the time, we don’t have to use calculus • A matrix can: • Translate (move) a vertex • Rotate a vertex • Scale a vertex • Math libraries cover up these details • Learn it anyway!
INTRODUCTION • For 2 D games, we use a lot of trigonometry • For 3 D games, we use a lot of linear algebra • Most of the time, we don’t have to use calculus • A matrix can: • Translate (move) a vertex • Rotate a vertex • Scale a vertex • Math libraries cover up these details • Learn it anyway!
MATRICES •
TRANSPOSING A MATRIX • Transpose
TRANSPOSING A MATRIX • Transpose The Matrix has you…
MATRICES •
MATRICES •
MATRICES •
MATRICES •
MATRICES • Follow the white rabbit…
A FEW SPECIAL MATRICES (USED FOR ROTATION)
MATRIX MULTIPLICATION • Old New point
MATRIX MULTIPLICATION • 0 -1
MATRIX MULTIPLICATION •
MATRIX MULTIPLICATION •
MATRIX MULTIPLICATION • What IS real?
TRANSLATION • It’s a piece of cake, because the 4 th column is the translation!
TRANSLATION •
TRANSLATION •
TRANSLATION •
TRANSLATION •
TRANSLATION • Why, oh why, didn’t I take the blue pill?
TRANSLATION •
SCALING • Trace program: running
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix There is no spoon…
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix ?
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix
MATRIX MULTIPLICATION • What if you want to rotate a point and then translate it? • Need a rotation matrix • Need a translation matrix • Returns a 4 x 4 matrix Old point New point
JEFF WAS HERE