Graphics Reference
In-Depth Information
Because the
x
a
,
y
a
,and
z
a
coordinate values are lined up in a row, we refer to this
vector representation as a row vector.
V
a
is the
transpose
of vector
V
a
:
⎡
⎤
x
a
y
a
z
a
⎣
⎦
,
V
a
=
and
V
a
is also a vector. Because the coordinate values are written one on top
another, or in a column, we refer to this representation as a column vector. In
general, the transpose of a row vector is a column vector, and the transpose of the
column vector is the original row vector:
V
a
)
T
(
=
V
a
.
Geometrically, there is no difference between representing a vertex as a column
vector or a row vector. However, as will be discussed in Section 8.5.3, in the case
of transformation, column and row vectors must be treated with care.
8.5.2
A Word about Matrices
The transformation operators we have studied are represented by 4
×
4 matrices
Translation
Vector
M
,where:
⎡
⎤
Scale/Rotate
a
00
a
01
a
02
a
03
⎣
⎦
.
a
00
a
01
a
02
a
03
a
10
a
11
a
12
a
13
M
=
a
10
a
20
a
30
a
10
a
21
a
31
a
12
a
22
a
32
a
13
a
23
a
33
a
20
a
21
a
22
a
23
a
30
a
31
a
32
a
33
We say that this is a matrix with four rows by four columns (or 4
×
4) of elements.
Translation
Vector
Always 1.0
Each of the 16 elements
element at
i
th row
Figure 8.17.
Decompos-
ing the transformation op-
erator: the 4
×
4matrix.
The fourth dimension of
the matrix is introduced to
support translation and ho-
mogeneous coordinate sys-
tem for perspective projec-
tion.
,
≤
≤
,
where 0
i
3
a
ij
=
j
th column
,
where 0
≤
j
≤
3
,
is a floating-point number. Each of the transformation operators we have studied
is simply a 4
4 matrix with different values in these 16 elements. In this topic,
we are not interested in the details of this 4
×
4 matrix. However, it is interesting
to relate the transformation operators we have learned to the internals of a 4
×
×
×
4 matrix.
Figure 8.17 shows that the 4
4 matrix can be partitioned into two
regions:
•
To p - l e f t 3
3region.
This region encodes the scaling and rotation oper-
ations. In addition, we can consider the 0th row/column to be affecting the
×
Search WWH ::
Custom Search