Overview

The use of computers to synthesize and manipulate visual information.

Application

video game, movie, amimations, design, visualization, VR, AR, digital illustration, simulation, GUI, typography…

Course Topics

  • Rasterization: Project geometry primitives (3D triangles / polygons) onto the screen.
  • Curves and Mesh: Present geometry in Computer Graphs.
  • Ray Tracing
  • Animation / Simulation

Not for graphics API, 3D modeling, game engine.

Review of Linear Algebra

Transformations

Transformation: modeling & viewing.

2D Transformation

-> Linear Transforms (scale, reflection, shear, rotation) == Matrices

[xy]=[abcd][xy]\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}

Homogeneous Coordinate

But linear transforms can not represent translation: [xy]=[abcd][xy]+[txty]\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} t_x \\ t_y \end{bmatrix}. This problem is solved by using homogeneous coordinates, which add an extra dimension to the 2D point (x, y) to become (x, y, 1).

  • 2D point: (x,y,1)T(x, y ,1)^T / (x,y,w)T(x,y,w)^T
  • 2D vector: (x,y,0)T(x,y,0)^T

The third coordinate naturally enforces:

  • point - point = vector (1 - 1 = 0)
  • point + vector = point (1 + 0 = 1)
  • vector + vector = vector (0 + 0 = 0)
  • vector translation invariance: multiplying a vector by a translation matrix leaves it unchanged, since tx0+ty0=0t_x \cdot 0 + t_y \cdot 0 = 0.

Affine transformations == linear map + translation: [xy]=[abcd][xy]+[txty]\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} t_x \\ t_y \end{bmatrix}. Using homogeneous coordinate:

[xy1]=[abtxcdty001][xy1]\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = \begin{bmatrix} a & b & t_x \\ c & d & t_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}

Composite Transform