KUMX(3NCARG)
π KUMX β the NCAR Graphics glow-up π
okay bestie, welcome to KUMX, a whole vibe from the NCAR Graphics manual. She's one little function, but she brought her entire friend group, so buckle up π
β¨ NAME β¨
KUMX β converts from user coordinates to metacode coordinates. that's it, that's her whole job, and she does it flawlessly π
but wait, there's more, because this page is actually the home of spps_converters β a whole set of functions, each of which transforms a coordinate from one of the NCAR Graphics coordinate systems to another. the complete list of functions is as follows, no cap:
CFUX, CFUY, CMFX, CMFY, CMUX, CMUY, CPFX, CPFY, CPUX, CPUY, CUFX, CUFY, KFMX, KFMY, KFPX, KFPY, KMPX, KMPY, KPMX, KPMY, KUMX, KUMY, KUPX, and KUPY.
twenty-four icons. a whole girl group π
π¦ STATUS π¦
ngl, here's the tea: Plotter Address Units (PAUs) and Metacode Units (MUs) are no longer used in NCAR Graphics. so every function with either an M or a P as the second or third letter of the function name is considered obsolete. they're the retired members of the group, we still love them, we do not use them π
the current recognized coordinate systems, aka the main characters, are:
- GKS world coordinates
- GKS normalized device coordinates
- NCAR Graphics fractional coordinates
- NCAR Graphics user coordinates
if you want the full lore on these coordinate systems, go read the NCAR Graphics document "NCAR Graphics Fundamentals, UNIX Version". it's giving required reading π
so here's why the obsolete stuff is even documented β the following definitions of the PAU coordinate system and the MU coordinate system are provided for the purpose of interpreting and converting codes which use PAUs or MUs:
- the plotter coordinates of a point are integers
IPXandIPY, whereIPXis between1and2**MXandIPYis between1and2**MY.MXandMYare internal parameters of SPPS; each has a default value of10. values ofMXandMYcan be set by calling the routinesSETIorSETUSVand retrieved by calling the routinesGETSIorGETUSV. - the metacode coordinates of a point are integers
IMXandIMYbetween0and32767inclusive. the area addressed is a square in a"metacode space"that is usually mapped into a square subset of the addressable area of the plotting device. metacode coordinates were used in calls to the routinePLOTITand are returned in calls toFL2INT.
πΈ SYNOPSIS πΈ
current, aka the ones you should actually be using β¨:
X = CFUX (RX), Y = CFUY(RY)
X = CUFX (RX), Y = CUFY(RY)
obsolete, aka the vintage collection π°οΈ:
X = CMUX (IX), Y = CMUY(IY)
X = CPUX (IX), Y = CPUY(IY)
X = CMFX (IX), Y = CMFY(IY)
X = CPFX (IX), Y = CPFY(IY)
I = KFMX (RX), J = KFMY(RY)
I = KUMX (RX), J = KUMY(RY)
I = KFPX (RX), J = KFPY(RY)
I = KUPX (RX), J = KUPY(RY)
I = KPMX (IX), J = KPMY(IY)
I = KMPX (IX), J = KMPY(IY)
π C-BINDING SYNOPSIS π
#include <ncarg/ncargC.h>
float c_cfux (float rx)
float c_cfuy (float ry)
float c_cufx (float rx)
float c_cufy (float ry)
β DESCRIPTION β
okay so let's decode the naming scheme, because it's lowkey a cipher and honestly? iconic π΅οΈββοΈ
RXβ an input expression of typeREAL, and she's an X coordinate in the coordinate system specified by the second letter of the function name. in a reference toCFUX,RXis a fractional X coordinate; in a reference toCUFX,RXis a user X coordinate.RYβ an input expression of typeREAL, and she's a Y coordinate in the coordinate system specified by the second letter of the function name. in a reference toCFUY,RYis a fractional Y coordinate; in a reference toCUFY,RYis a user Y coordinate.IXandIYβ these only show up as arguments in references to some of the obsolete functions, bestie. they represent input expressions of typeINTEGER, specifying the X and Y coordinates of a point in either PAUs or MUs (depending on the second letter of the function name).
and now, the letter-by-letter breakdown, because the way this is structured? obsessed π
- the first letter of the function name is a
Cif the result is of typeREALand aKif the result is of typeINTEGER(the latter only happens for some of the obsolete ones). this conforms to the usual FORTRAN convention for implicit typing. - the second letter of the function name specifies the coordinate system of the argument.
- the third letter of the function name specifies the coordinate system of the functional result. in references to
CFUXandCFUY, the result is in the user system; in references toCUFXandCUFY, the result is in the fractional system. - the fourth letter of the function name is an
Xor aY, depending on whether an X or a Y coordinate is being converted.
π«Ά C-BINDING DESCRIPTION π«Ά
the C-binding argument description is the same as the FORTRAN argument description. no notes, same energy, periodt π
π₯ EXAMPLES π₯
use the ncargex command to see the following relevant examples which use coordinate converters:
mpex10cbex10sfex02epltch
and fr fr, this next bit is handy:
ncargex -n mpex10
that command will load the driver mpex10.f into your current working directory, where you can examine the file using a local editor, or the UNIX more command. go look at it, it's right there, she's waiting for you π₯°
π ACCESS π
there were 24 conversion functions in the original set. these functions (12 for the X coordinate of a point, and 12 for the Y coordinate) allowed one to convert between any combination of PAUs, MUs, fractional coordinates, and user coordinates. a whole era π
but PAUs and MUs are now obsolete, so only four of the conversion functions are still pertinent:
CFUXandCFUYallow one to convert the X and Y coordinates of a point from the fractional system to the user systemCUFXandCUFYdo the opposite
to use any of the conversion routines, load the load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. (yes, the original really does say "load the load" β we're keeping it exactly as-is, no editing the source material, that's the rules π)
π§ SEE ALSO π§
Online: cfux, cfuy, cmfx, cmfy, cmux, cmuy, cpfx, cpfy, cpux, cpuy, cufx, cufy, kfmx, kfmy, kfpx, kfpy, kmpx, kmpy, kpmx, kpmy, kumx, kumy, kupx, kupy, spps, ncarg_cbind
Hardcopy: NCAR Graphics Fundamentals, UNIX Version; 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.
okay that's the whole page, you ate it, you understood it, you're basically a coordinate conversion girlie now π
this was SPPS_converters(3NCARG), from the UNIX manual, dated March 1993 β yeah she's vintage but she's still serving π
bye bestie, love u, go convert some coordinates π¦π
π¦ 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