Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 7.7 Sorting and dichotomy Up: 7 Internal programs Prev: 7.5 Conversions Contents


7.6 Matrix and vector manipulations

Calling subroutines which perform transformations in the three-dimensional space, initiates matrix computations corresponding to the linear application associated with the transformation.

Other subroutines perform clipping computations (see masks and windows). Generally, the user does not deal with these subroutines. However, for certain computations (not necessarily graphical!), it is possible to employ these subroutines of practical interest, advantageously.

It is however necessary to stress certain notions.

The internal procedures in FORTRAN 3D manipulate a real type 4*4 matrix, henceforth called MAT(4, 4), consisting of a 3*3 sub-matrix, representing the rotation, and a vector corresponding to the last column, representing the translation. The lower right-hand corner of this matrix contains a 1. and the three first elements in the last line are zero, as shown below:

 
    MAT(1:3, 1:3)   ---> Rotation                |  R  R  R  T  |
    MAT(1:3,  4 )   ---> Translation             |  R  R  R  T  |
                                                 |  R  R  R  T  |
    MAT(4, 1:4)     --->                         |  0  0  0  1. |

Before performing any matrix operations, MAT must be initialized to a unit matrix. The transformation procedures are then called sequentially, each multiplying the matrix with a matrix corresponding to the transformation. At the end of the operations, the matrix contains the result of all the operations performed.


Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 7.7 Sorting and dichotomy Up: 7 Internal programs Prev: 7.5 Conversions Contents