CMSC 335 COMPUTER GRAPHICS LECTURE 4 LINEAR ALGEBRA
CMSC 335 COMPUTER GRAPHICS LECTURE 4 • LINEAR ALGEBRA REVIEW
BASIC GRAPHICS PIPELINE (VIEWING PIPELINE) y y y z x x z Projection Coordinates (Homogeneous) Device Coordinates x Model Coordinates z World Coordinates Camera Coordinates
MECHANISMS CONTROLLING VIEWING PIPELINE • Coordinate or reference frames • Cross products help define them • Transformations between the stages • Matrix multiplications • At different phases of this class, we will reason from different coordinate frames, and it is important for equations (e. g. , lighting) to know which frame you are in • Example: a common bug in lighting is using a light direction in workspace and a normal from model space and a view direction from camera space, yikes!
VECTOR CROSS PRODUCT • Right hand rule – fingers in the direction of the first vector, palm faces the second vector, and your thumb is the direction of the cross product • Uses: • Determining a reference frame or a vector that is perpendicular to the plane defined by two other vectors • Determining the side (right/left) that a vector lies in relation to another (sign of the result)
VECTOR CROSS PRODUCT •
VECTOR CROSS PRODUCT • Why are these important? • Bugs • Algebraic manipulation to a more efficient algorithm
MANAGING COORDINATE FRAMES •
ORTHONORMAL BASIS •
ORTHONORMAL BASES • Easy to "square-up" to remove error • How?
MATRICES • •
MATRIX ADDITION •
MATRIX SCALAR PRODUCT •
MATRIX MULTIPLICATION •
REPRESENTING VECTORS AS MATRICES •
MATRIX MULTIPLICATION •
IDENTITY MATRICES •
MATRIX INVERSION •
TRANSPOSE •
- Slides: 18