GACTM(3NCARG) | NCAR GRAPHICS | GACTM(3NCARG) |
gactm - Accumulate (GKS) transformation matrix
GACTM (Accumulate transformation matrix) - Constructs a GKS segment transformation matrix by starting with an existing matrix and composing it with a shift vector, a rotation angle, and X and Y scale factors to create a new transformation matrix. The rotation and scaling are done with respect to a user-defined fixed point.
CALL GACTM(MINP,X0,Y0,DX,DY,PHI,FX,FY,SW,MOUT)
#include <ncarg/gks.h>
void gaccum_tran_matrix(const Gtran_matrix t_matrix, const Gpoint *point, const Gvec *shift, Gdouble angle, const Gvec *scale, Gcoord_switch coord_switch, Gtran_matrix tran_matrix);
If world coordinates are used, the shift vector and the fixed point are transformed by the current normalization transformation.
The order in which the transformations are applied is: input matrix, scale, rotate, and shift.
Elements MOUT(1,3) and MOUT(2,3) are in normalized device coordinates and the other elements of MOUT are unitless.
GACTM can be used to construct more general transformation matrices than GEVTM. The most common usage of GACTM is to change the order in which the operations of scale, rotate, and shift are applied (which is fixed in GEVTM). The example below shows how to construct a transformation matrix that shifts first and then rotates.
Assuming that the input matrix TIN is initially the identity, the following code
PI = 3.1415926
CALL GACTM(TIN,.5,.5,.25,0.,0.,1.,1.,0,TOUT)
DO 20 I=1,2
DO 30 J=1,3
TIN(I,J) = TOUT(I,J)
30 CONTINUE
20 CONTINUE
CALL GACTM(TIN,.5,.5,0.,0.,45.*PI/180.,1.,1.,0,TOUT)
would produce a transformation matrix in TOUT that would shift by (.25,0.) first, and then rotate by 45 degrees.
To use GKS routines, load the NCAR GKS-0A library ncarg_gks.
Online: gevtm, gclsg, gcrsg, gcsgwk, gdsg, gqopsg, gqsgus, gssgt., gaccum_tran_matrix
Hardcopy: "User's Guide for NCAR GKS-0A Graphics"
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
March 1993 | UNIX |