Linear Algebra and Computer Graphics
Computer Graphics (CG) are pictures and figures created by using computers.
CG technique has been applied to diverse fields including architecture, video game, and medicine.
Drawing 2D and 3D figures on a computer screen often requires coordinate transformations.
This is why linear algebra (especially vectors and matrices) plays very important roles.
Preparation 1: Projective Geometry
coordinates in 2D space are
defined by x and y
w = 3
w = 1
Extra dimension, w, is added.
3D space with w
coordinates in projective space
homogeneous coordinates are
defined by x, y, and w
Homogeneous Coordinate Transformation
What if I want to apply both rotation and translation at the same time?
Instead of using 2D vectors, we are going to use 3D homogeneous vectors.
(w = 1)
The order of applying transformations influences the result.
This is because matrix multiplication is not commutative.
Transformations are applied from right to left.
Perspective Projection (3D object projected onto 2D)
We need to convert 3D coordinates to 2D ones to display them on the computer screen.
Computer Graphics (CG) often uses perspective projection.
Matrices in Computer Graphics
Explaining Homogeneous Coordinates & Projective Geometry
OpenGL Tutorial - Tutorial 3