GEVAL_TRAN_MATRIX(3NCARG)
π NAME π
geval_tran_matrix β Connstruct GKS segment by evaluating a transform matrix
bestie the typo "Connstruct" is literally in the original, we are not touching it, it's canon now π
πΈ DESCRIPTION πΈ
geval_tran_matrix (aka Evaluate transformation matrix) β it constructs a GKS segment transformation matrix starting from a given point, a shift vector, a rotation angle, and X and Y scale factors. That's it, that's the whole vibe β¨
β¨ 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 π (part two, the receipts)
okay so here's every single argument, no skipping, we don't do that here π«Ά
point.xβ (Gfloat, Input) β an X coordinate value for a fixed point to be used for the scaling and rotation parts of the output transformation.point.xis either in world coordinates or normalized device coordinates depending on the setting of the argumentcoord_switchdescribed below.point.yβ (Gfloat, Input) β a Y coordinate value for a fixed point to be used for the scaling and rotation parts of the output transformation.point.yis either in world coordinates or normalized device coordinates depending on the setting of the argumentcoord_switchdescribed below.shift.delta_xβ (Gfloat, Input) β the X component of a shift vector to be used for the scaling part of the output transformation.shift.delta_xis either in world coordinates or normalized device coordinates depending on the setting of the argumentcoord_switchdescribed below.shift.delta_yβ (Gfloat, Input) β the Y component of a shift vector to be used for the scaling part of the output transformation.shift.delta_yis either in world coordinates or normalized device coordinates depending on the setting of the argumentcoord_switchdescribed below.angleβ (Input) β the rotation angle, in radians, to be used for the rotation part of the output transformation. radians bestie, not degrees, do not come at me with degrees πscale.delta_xβ (Gfloat Input) β an X coordinate scale factor to be used in the scaling part of the output transformation.scale.delta_yβ (Gfloat Input) β a Y coordinate scale factor to be used in the scaling part of the output transformation.coord_switchβ (Input) β a coordinate switch to indicate whether the values for the argumentsshiftandscale(described above) are in world coordinates or normalized device coordinates. Possible values include:GCOORD_WCβ World coordinates πGCOORD_NDCβ Normalized device coordinates π
tran_matrixβ (Gfloat, Output) β a 2x3 array that contains the GKS transformation matrix in a form that can be used as input to other GKS functions such asgset_seg_tran.
π USAGE π
If world coordinates are used, the shift vector and the fixed point are transformed by the current normalization transformation. noted. logged. understood.
The order of the transformation operations as built into the output matrix is: scale (relative to the fixed point); rotate (relative to the fixed point); shift. Order matters, bestie, this is not a drill π
Elements tran_matrix[0][2] and tran_matrix[1][2] are in normalized device coordinates and the other elements of tran_matrix are unitless.
π EXAMPLE π
the following code:
pi = 3.1415926;
point.x = point.y = 0.5;
shift.delta_x = 0.25;
shift.delta_y = 0.;
scale.delta_x = 0.5;
scale.delta_y = 1.5;
geval_tran_matrix(&point,&shift,45.*pi/180.,&scale,GCOORD_WC,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 .25 in X and 0. in Y. The input values for the fixed point and shift vector are in world coordintes.
yes, "coordintes" is also in the original. we stan a legacy typo π
π ACCESS π
To use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's the whole access situation, go forth π¦
π¦ SEE ALSO π¦
- Online:
gaccum_tran_matrix(3NCARG),gclose_seg(3NCARG),gcreate_seg(3NCARG),gcopy_seg_ws(3NCARG),gdel_seg(3NCARG),ginq_name_open_seg(3NCARG),ginq_set_seg_names(3NCARG),gset_seg_tran(3NCARG),gks(3NCARG),ncarg_gks_cbind(3NCARG) - Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
okay that's the whole page bestie, you ate that π
β¨ shoutout to the UNIX manual crew, source dated March 1993, filed under GEVAL_TRAN_MATRIX(3NCARG) β iconic, no cap ππ¦π
π¦ 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