Graphics Reference
In-Depth Information
N
T
P ¼
0
0
P
¼ MP
(B.36)
0
T
0
N
P
¼
0
(B.37)
0
T
N
MP ¼
0
(B.38)
0
T
¼ N
T
M
1
N
(B.39)
N
T
M
1
MP ¼ N
T
P ¼
0 (B.40)
In order to transform a vector (
a
,
b
,
c
), treat it as a normal vector for a plane passing through the
origin [
a
,
b
,
c
, 0] and post-multiply it by the inverse of the transformation matrix (
Eq. B.39
)
. If it is
desirable to keep all vectors as column vectors, then
Equation B.41
can be used.
T
T
T
N
0
0
T
¼ N
T
M
1
¼ M
1
N
¼ N
(B.41)
B.3.3
Axis-angle rotations
Given an axis of rotation
A ¼
rotation matrix
M
can be formed by
Equation B.42
. This is a more direct way to rotate a point around an
axis, as opposed to implementing the rotation as a series of rotations about the global axes.
2
3
a
x
a
x
a
x
a
y
a
x
a
z
A ¼
4
5
a
y
a
x
a
y
a
y
a
y
a
z
a
z
a
x
a
z
a
x
a
z
a
z
2
4
3
5
0
a
z
a
y
(B.42)
A
¼
a
z
0
a
x
a
z
a
x
0
þ
M ¼ A þ
cos
y I A
sin
yA
0
p
¼ MP
A
P
P
FIGURE B.26
Search WWH ::
Custom Search