Notes about matrix primitives

In class we discussed linear transformations, which should largely be review for most of you. After reviewing the form of the basic matrix primitives, below, do the homework assignment, which is here. That assignment page contains extensive notes and hints about implementation.

3D Transformation Matrices:

Here are the basic 3D matrix primitives (not including perspective):

identity:
1000
0100
0010
0001
translationMatrix(a,b,c):
100a
010b
001c
0001
xRotationMatrix(θ):
1000
0cos(θ)-sin(θ)0
0sin(θ)cos(θ)0
0001
yRotationMatrix(θ):
cos(θ)0sin(θ)0
0100
-sin(θ)0cos(θ)0
0001
zRotationMatrix(θ):
cos(θ)-sin(θ)00
sin(θ)cos(θ)00
0010
0001
scaleMatrix(a,b,c):
a000
0b00
00c0
0001