KUMY(3NCARG)
π KUMY β the 3NCARG glow-up π
okay bestie, so this is the KUMY page from the NCAR Graphics manual (3NCARG, the whole family reunion of converter functions) and honestly? it's giving β¨coordinate transformationβ¨ and we're gonna get through it together.
πΈ NAME πΈ
KUMY β literally just converts from user coordinates to metacode coordinates. that's the whole job. no cap.
π¦ NAME (the sequel, aka spps_converters) π¦
spps_converters is a whole squad of functions, and each one transforms a coordinate from one NCAR Graphics coordinate system to another. the full roster, alphabetically, no one left out:
CFUX, CFUY, CMFX, CMFY, CMUX, CMUY, CPFX, CPFY, CPUX, CPUY, CUFX, CUFY, KFMX, KFMY, KFPX, KFPY, KMPX, KMPY, KPMX, KPMY, KUMX, KUMY, KUPX, KUPY.
twenty-four icons. that's it, that's the list. π
β οΈ STATUS β οΈ
okay so listen. Plotter Address Units (PAUs) and Metacode Units (MUs) are no longer used in NCAR Graphics. so every single function with either anMor aPas the second or third letter of the name? obsolete, bestie. retired. living in the past. π
The coordinate systems we actually recognize these days are:
- GKS world coordinates
- GKS normalized device coordinates
- NCAR Graphics fractional coordinates
- NCAR Graphics user coordinates
if you want the full lore on those, go read the NCAR Graphics document "NCAR Graphics Fundamentals, UNIX Version". it's the source material, iykyk. π
now, for the purpose of interpreting and converting codes that still use PAUs or MUs, here are the definitions, preserved for the archives:
The plotter coordinates of a point are integers IPX and IPY, where IPX is between 1 and 2**MX and IPY is between 1 and 2**MY. MX and MY are internal parameters of SPPS; each has a default value of 10. Values of MX and MY can be set by calling the routines SETI or SETUSV and retrieved by calling the routines GETSI or GETUSV. π«Ά
The metacode coordinates of a point are integers IMX and IMY between 0 and 32767 inclusive. 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 routine PLOTIT and are returned in calls to FL2INT. π
β¨ SYNOPSIS β¨
Current:
X = CFUX (RX), Y = CFUY(RY)
X = CUFX (RX), Y = CUFY(RY)
Obsolete:
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 π
RXβ an input expression of typeREAL, and it's an X coordinate in whatever coordinate system the second letter of the function name says. so in a reference toCFUX,RXis a fractional X coordinate; in a reference toCUFX,RXis a user X coordinate. same letter, different vibe. π«RYβ an input expression of typeREAL, 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. they're input expressions of typeINTEGER, specifying the X and Y coordinates of a point in either PAUs or MUs (which one depends on the second letter of the function name).
now the naming scheme, because bestie this is genuinely elegant and i'm obsessed:
- The first letter of the function name is a
Cif the result is of typeREALand aKif the result is of typeINTEGER(and that only happens for some of the obsolete ones). this conforms to the usual FORTRAN convention for implicit typing. slay, honestly. - 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. (yes the letters swap, yes that's the point π ) - 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. copy-paste energy, but make it official.
π EXAMPLES π
Use the ncargex command to see the following relevant examples which use coordinate converters: mpex10, cbex10, sfex02, epltch.
The command "ncargex -n mpex10" 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 peek at it, it's cute. π
π₯ 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. absolute versatility era.
But PAUs and MUs are now obsolete, so only four of the conversion functions are still pertinent: CFUX and CFUY allow one to convert the X and Y coordinates of a point from the fractional system to the user system, while CUFX and CUFY do the opposite. four survivors. main character energy, honestly. β
To use any of the conversion routines, load the NCAR Graphics librariesncarg,ncarg_gks, andncarg_c, preferably in that order. order matters, bestie, don't fight it. π§
π 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.
and that's the whole page, bestie π this came from the UNIX release, dated March 1993, under the SPPS_converters(3NCARG) banner β and yes, KUMY(3NCARG) is the title up top, NCAR GRAPHICS is the family it runs with. take care of your coordinates and they'll take care of you π¦β¨
π¦ 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