GACTM(3NCARG)
🎀 GACTM 🎀 (the NCAR one, from the 3NCARG manual, bestie)
✨ NAME ✨
GACTM — short for Accumulate transformation matrix — is the glow-up function that builds you a GKS segment transformation matrix. It takes a matrix you already have and composes it with a shift vector, a rotation angle, and X + Y scale factors, and out pops a brand-new transformation matrix. The rotation and the scaling both happen around a fixed point that you get to define. Iconic behaviour honestly.
✨ SYNOPSIS ✨
CALL GACTM(MINP,X0,Y0,DX,DY,PHI,FX,FY,SW,MOUT)
✨ C-BINDING SYNOPSIS ✨
#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);
✨ DESCRIPTION ✨
okay so here's the whole cast, argument by argument, no skips:
MINP(Real, Input) — a2x3GKS transformation matrix. Your starting point, your blueprint, your before pic.X0(Real, Input) — the X coordinate of the fixed point that the scaling and rotation parts of the output transformation are gonna spin/scale around. This X lives in world coordinates or in normalized device coordinates, and which one depends on theSWargument (scroll down, it's explained).Y0(Real, Input) — the Y coordinate of that same fixed point for the scaling and rotation parts of the output transformation. Y is in world coordinates or normalized device coordinates, again depending on howSWis set (yes, same deal asX0).DX(Real, Input) — the X component of a shift vector used for the scaling part of the output transformation.DXis in world coordinates or normalized device coordinates, depending on the setting ofSWbelow. (Sensing a theme? 🦋)DY(Real, Input) — the Y component of that shift vector, used for the scaling part of the output transformation.DYis in world coordinates or normalized device coordinates, depending on the setting ofSW. You already knew that.PHI(Real, Input) — the rotation angle, in radians, used for the rotation part of the output transformation. Radians, bestie. Not degrees. Do not come at me with degrees.FX(Real, Input) — an X coordinate scale factor used in the scaling part of the output transformation.FY(Real, Input) — a Y coordinate scale factor used in the scaling part of the output transformation.SW(Integer, Input) — the coordinate switch, aka the vibes-check on whetherX0,Y0,DXandDY(all described above, love them) are in world coordinates or normalized device coordinates.SW=0means world coordinates andSW=1means normalized device coordinates. That's it, that's the switch.MOUT(Real, Output) — a2x3array holding the resulting GKS transformation matrix, in a form you can feed straight into other GKS functions likeGSSGT. This matrix gets built by composing the scale, rotate and shift input (all that stuff above) with the original input matrixMINP. Chef's kiss. 👑
✨ USAGE ✨
- If world coordinates are used, the shift vector and the fixed point get transformed by the current normalization transformation. Noted.
- The order in which the transformations are applied is: input matrix, scale, rotate, and shift. Remember this order, it's the whole plot.
- Elements
MOUT(1,3)andMOUT(2,3)are in normalized device coordinates, and every other element ofMOUTis unitless. Yes, a mixed bag. She contains multitudes. GACTMcan be used to construct more general transformation matrices thanGEVTMcan. The most common usage ofGACTMis to change the order in which the operations of scale, rotate and shift are applied — because that order is fixed inGEVTMandGACTMlets you mess with it. The example below shows how to construct a transformation matrix that shifts first and then rotates. Main character energy fr fr.
✨ EXAMPLE ✨
Assuming 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. Obsessed with her.
✨ ACCESS ✨
To use GKS routines, load the NCAR GKS-0A library ncarg_gks. That's the one. 🫶
✨ SEE ALSO ✨
Online: gevtm, gclsg, gcrsg, gcsgwk, gdsg, gqopsg, gqsgus, gssgt., gaccum_tran_matrix
Hardcopy: "User's Guide for NCAR GKS-0A Graphics"
✨ COPYRIGHT ✨
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
💀 obligatory note: this is the GACTM(3NCARG) page, straight outta the UNIX manual, dated March 1993. slay, and also please respect the License Agreement, bestie 💖 ✨ 🎀
📦 where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 · LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 · LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 · LicenseRef-Callaway-BSD
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms