GEVTM(3NCARG)

✨ GEVTM(3NCARG) ✨

okay bestie, welcome to GEVTM from the NCAR GRAPHICS manual, section 3NCARG πŸ’– this one is a little Fortran-flavored gem that builds you a GKS segment transformation matrix, and honestly? it's giving math girlboss πŸŽ€


🌸 NAME 🌸

gevtm β€” Evaluate a transform matrix and construct GKS segment πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

GEVTM (that's Evaluate transformation matrix, iykyk) constructs a GKS segment transformation matrix starting from a given point, a shift vector, a rotation angle, and X and Y scale factors. no cap, that's the whole vibe ✨


πŸŽ€ SYNOPSIS πŸŽ€

CALL GEVTM(X0,Y0,DX,DY,PHI,FX,FY,SW,MOUT)

πŸ¦‹ C-BINDING SYNOPSIS πŸ¦‹

#include <ncarg/gks.h>

void geval_tran_matrix(const Gpoint *point, const Gvec *shift, Gdouble
angle, const Gvec *scale, Gcoord_switch coord_switch, Gtran_matrix
tran_matrix);

πŸ’– DESCRIPTION πŸ’– (round two, the arguments, bestie)

okay so this is where we meet the whole squad of parameters. every single one of them, no skipping, periodt πŸ‘‘

  • X0 (Real, Input) β€” the X coordinate value of a fixed point, and this fixed point is what the scaling and rotation parts of your output transformation pivot around πŸ’« X is either in world coordinates or normalized device coordinates depending on how you set the argument SW down below. choose wisely.
  • Y0 (Real, Input) β€” the Y coordinate value for that same fixed point, used for the scaling and rotation parts of the output transformation. just like X0, Y is either in world coordinates or normalized device coordinates depending on the setting of the argument SW described below. twin behavior fr fr 🫢
  • DX (Real, Input) β€” the X component of a shift vector used for the scaling part of the output transformation. DX is either in world coordinates or normalized device coordinates depending on the setting of the argument SW described below. yes it's the same sentence again, the manpage is committed to the bit 😭
  • DY (Real, Input) β€” the Y component of that shift vector, used for the scaling part of the output transformation. DY is either in world coordinates or normalized device coordinates depending on the setting of the argument SW described below. iconic consistency πŸ’…
  • PHI (Real, Input) β€” the rotation angle, in radians, used for the rotation part of the output transformation. radians only, bestie, do not come in here with degrees πŸ™ˆ
  • FX (Real, Input) β€” an X coordinate scale factor used in the scaling part of the output transformation. stretch her out horizontally ✨
  • FY (Real, Input) β€” a Y coordinate scale factor used in the scaling part of the output transformation. and vertically, of course πŸ¦‹
  • SW (Integer, Input) β€” the coordinate switch πŸ‘‘ it tells everyone whether the values for X0, Y0, DX, and DY (all described above) are in world coordinates or normalized device coordinates. SW=0 means world coordinates and SW=1 means normalized device coordinates. that's it, that's the switch πŸŽ€
  • MOUT (Real, Output) β€” a 2x3 array holding the GKS transformation matrix, in a form you can feed straight into other GKS functions such as GSSGT. this is the whole point of the function, she's the main character πŸ’–

πŸ”₯ USAGE πŸ”₯

  • if world coordinates are in play, the shift vector and the fixed point get transformed by the current normalization transformation. so like, they don't stay as-is, the normalization transformation gets its hands on them first ✨
  • the order of transformation operations as built into the output matrix is: scale (relative to the fixed point); rotate (relative to the fixed point); shift. scale, rotate, shift. in that order. memorize it bestie, order matters fr fr πŸ’…
  • elements MOUT(1,3) and MOUT(2,3) are in normalized device coordinates, and all the other elements of MOUT are unitless. yes, the matrix is a mixed bag, that's just how she is 😭

🌈 EXAMPLE 🌈

the following code

PI = 3.1415926
CALL GEVTM(.5,.5,.25,0.,45.*PI/180.,.5,1.5,0,TM)

would produce a transformation matrix in TM that would:

  1. scale the X coordinates by .5
  2. scale the Y coordinates by 1.5 (relative to the fixed point of (.5,.5))
  3. rotate by 45 degrees (relative to the fixed point (.5,.5))
  4. and shift by .25 in X and 0. in Y

and the input values for the fixed point and shift vector are in world coordintes 🌸

ok lowkey that spelling "coordintes" is in the original and we are keeping it, no edits, that's the rule bestie πŸ’–

πŸ’œ ACCESS πŸ’œ

to use GKS routines, load the NCAR GKS-0A library ncarg_gks. that's the whole access situation πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘

  • Online: gactm, gclsg, gcrsg, gcsgwk, gdsg, gqopsg, gqsgus, gssgt., geval_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.


and that's the whole page bestie πŸ’– this was GEVTM from the UNIX manual, dated March 1993, and it lives on as GEVTM(3NCARG) 🌈 slay, go build yourself a transformation matrix, you've got this πŸŽ€βœ¨πŸ’