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 argumentSWdown 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 likeX0, Y is either in world coordinates or normalized device coordinates depending on the setting of the argumentSWdescribed below. twin behavior fr fr π«ΆDX(Real, Input) β the X component of a shift vector used for the scaling part of the output transformation.DXis either in world coordinates or normalized device coordinates depending on the setting of the argumentSWdescribed 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.DYis either in world coordinates or normalized device coordinates depending on the setting of the argumentSWdescribed 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 forX0,Y0,DX, andDY(all described above) 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) β a 2x3 array holding the GKS transformation matrix, in a form you can feed straight into other GKS functions such asGSSGT. 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)andMOUT(2,3)are in normalized device coordinates, and all the other elements ofMOUTare 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:
- scale the X coordinates by
.5 - scale the Y coordinates by
1.5(relative to the fixed point of(.5,.5)) - rotate by 45 degrees (relative to the fixed point
(.5,.5)) - and shift by
.25in X and0.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 π«Ά
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 πβ¨π
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms