Computer Graphics - Lecture 2
Computer Graphics - Lecture 2
Mathematics: Basics
▪ Transpose denoted by MT
▪ If two square matrices A and B are multiplied to return an identity matrix, i.e.,
AB = I, B is called the inverse of A and is denoted by A-1. By the same token, A
is the inverse of B.
▪ Theorems
▪ (AB)-1 = B-1A-1
▪ (AB)T = BTAT (Revisit Mv and vTMT presented in the previous page.)
Introduction to Computer Graphics with OpenGL ES (J. Han) 2-4
Matrices and Vectors (cont’d)
▪ Consider the coordinates of a 2D or 3D vector, v:
▪ Such a normalized vector is called the unit vector since its length is 1.
▪ It is also orthonormal.
▪ Of course, we can consider non-standard orthonormal bases in 3D space. You
will see soon.
▪ The length of a×b equals the area of the parallelogram that a and b span:
‖a‖‖b‖sinθ.
▪ If a=b, a×b returns the zero vector, often denoted as 0.
▪ The right-hand rule implies that the direction of b×a is opposite to that of a×b,
i.e., b×a = -a×b, but their lengths are the same.
▪ If t is in [-,], p(t) is an infinite line. If [0,], p(t) is a ray, which starts from
p0 and is infinitely extended along the direction vector, p1 - p0 .
▪ When t is restricted to [0,1], p(t) represents the line segment, which
corresponds to the linear interpolation of p0 and p1.
▪ It is a weighted sum of p0 and p1.
▪ Whatever attributes are associated with the end points, they can be linearly
interpolated. Suppose that the endpoints are associated with colors c0 and c1,
respectively, where c0 = (R0, G0, B0) and c1 = (R1, G1, B1). Then, the color c(t)
is defined as follows: