3D Coordinate Reflection
Using Matrices As we have seen in
matrix multiplication any* matrix when
multiplied by the unit matrix remains unchanged. The Unit Matrix
The unit matrix can be modified
to change the resulting matrix in predictable way. Each non zero term in the
unit matrix acts on a single specific column of elements in the matrix it is
multiplied with. This can be very usefull if you wish to perform a transformation
on a sepcific set of data within a matrix. For example if you create a matrix
with the x,y,z coordinates of a point in 3D and then multiply it with this
modified unit matrix:
The resulting matrix is identicle accept for the fact that the value of the x
coordinate is now negative.
This has the effect of reflecting that point on the y axis. Modifying
other values in the unit matrix can create reflection about other axis:
Reflection about the x axis
Resulting in the value of the y coordinate becoming negative.
Reflection of z coordinates:
Resulting in the value of the z coordinate becoming negative.
3D
Reflection Using Matrices In Actionscript (points) To learn more about matrices
in flash see the[3D
Matrices Knowledgebase].
*Note: This is true only if the matrix meets
the basic condition that the number of rows of
columns of the first matrix match the number
of rows of the unit matrix.