Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ push_matrix(3G) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vdc_extent(3g)

concat_matrix(3g)

pop_matrix(3g)

PUSH_MATRIX(3G)

NAME

push_matrix − push a matrix onto the top of the matrix stack. 

SYNOPSIS

C SYNTAX

void push_matrix2d(fildes,xform2);
int fildes;
float xform2[3][2];
 void push_matrix3d(fildes,xform3);
int fildes;
float xform3[4][4];

FORTRAN77 SYNTAX

    See Language Dependencies Below
         subroutine push_matrix2d(fildes,xform2)
        integer*4 fildes
        real xform2(2,3)
         subroutine push_matrix3d(fildes,xform3)
        integer*4 fildes
        real xform3(4,4)

PASCAL SYNTAX

type
    two_d_xform    = array [1..3][1..2] of real;
    three_d_xform  = array [1..4][1..4] of real;
 procedure push_matrix2d(fildes:integer;
var xform2:two_d_xform);
 procedure push_matrix3d(fildes:integer;
var xform2:three_d_xform);

HP-UX COMPATIBILITY

Level: HP-UX/STANDARD

Origin: HP

DESCRIPTION

INPUT PARAMETERS

fildes
an integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 
xform2
is a 3x2 (2-Dimensional) matrix.
xform3
is a 4x4 (3-Dimensional) matrix.

DISCUSSION

The current transformation matrix (on top of matrix stack) is pushed to the 2nd matrix on the matrix stack and the matrix parameter, xform2 or xform3 , is concatenated with the vdc-to-device units trnasformation matrix and the result is placed on the top of the matrix stack.  This concatenation step can be avoided by setting vdc equal to device coordinates.(see vdc_extent)
 
The current transformation matrix is used to transform subsequent output primitives.
 
Internally to Starbase, all matrices are maintained in 3D (4x4) form, so push_matrix2d must expand the 2d matrix xform2. 
 
Since the vdc-to-device units transformation matrix is post-conncatenated to the end of this matrix, care should be taken when performing perspective transformations.  A perspective model where the eye is at origin of perspective space is recommended.  Any other model can easily be modified by a single translation step.

LANGUAGE DEPENDENCIES

FORTRAN77
Fortran requires a transposition of array rows and columns due to the manner in which FORTRAN77 stores arrays.

DEFAULTS

After gopen the current transformation matrix is the vdc-to-device units transformation matrix. 

SEE ALSO

vdc_extent(3g), concat_matrix(3g), pop_matrix(3g). 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026