rotation_matrix is a matrix between sizes 2*2 to 3*4 that species the rotation and translation of the
point using usual 3D and 4D geometry.
{eye_x, eye_y, eye_z} denes the eye position (projection).
{3Dxmin, 3Dxmax, 3Dymin, 3Dymax, 3Dzmin, 3Dzmax} is used to perform 3D clipping on the
pretransformed objects.
Each point is rotated and translated through a multiplication by the rotation_matrix. It is then projected on
the view plane using the eye position calculated by the following equation: x=eye_z/z*x-eye_x and
y=eye_z/ z*y-eye_y.
Each triangle is clipped in 3D, if 3D clipping data is provided.
If "N" is specied, the Z coordinates are normalized between 0 and 255 after rotation, providing easier
zClipping.
If zstring is provided, per pixel z clipping happens using the z value string (see the following).
TRIANGLE_P returns a string which contains all the transformed points. If you plan to call TRIANGLE or LINE
multiple times in a row using the same points and transformation, you can do so by replacing the
points_definition with this string and omitting the transformation denition in subsequent calls to
TRIANGLE and LINE.
About zstring:
TRIANGLE_P([G]) returns a string adapted for z clipping.
To use z clipping, call TRIANGLE_P([G]) to create a z clipping string (initialized at 255 for each pixels). You
can then call TRIANGLE_P with appropriate z (0-255) values for each of the triangle vertices and
TRIANGLE_P([G]) will not draw pixels farther than the already drawn pixels. ZString is automatically
updated as appropriate.
Matrix
Some matrix commands take as their argument the matrix variable name on which the command is applied.
Valid names are the global variables M0–M9 or a local variable that contains a matrix. You can also enter a
matrix directly as an argument to the command.
ADDCOL
Syntax: ADDCOL(matrixname, vector, column_number)
Inserts the values in vector into a new column inserted before column_number in the specied matrix.
The number of values in the vector must be the same as the number of rows in the matrix.
ADDROW
Syntax: ADDROW(matrixname, vector, row_number)
Inserts the values in vector into a new row inserted before row_number in the specied matrix. The
number of values in the vector must be the same as the number of columns in the matrix.
DELCOL
Syntax: DELCOL(name ,column_number)
Deletes column column_number from matrix name.
Program commands 601
Komentarze do niniejszej Instrukcji