CMUX(3NCARG)
okay bestie, welcome to the CMUX glow-up π
this one's a 3NCARG page out of the NCAR GRAPHICS universe β it's literally the "converts from metacode coordinates to user coordinates" girlie, and she's part of the bigger spps_converters friend group. Let's get into it π
β¨ NAME β¨
spps_converters β a whole squad of functions, and every single one of them takes a coordinate from one NCAR Graphics coordinate system and transforms it into another one. no cap. π¦
The full roster, bestie, all of them:
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.
π STATUS π
Plotter Address Units (PAUs) and Metacode Units (MUs) are not used in NCAR Graphics anymore, bestie, they're retired βπ. So literally every function that has an M or a P as the second or third letter of its name? obsolete. we don't claim them.
The coordinate systems that are actually current and recognized rn:
- GKS world coordinates
- GKS normalized device coordinates
- NCAR Graphics fractional coordinates
- NCAR Graphics user coordinates
if you want the full description of those systems, go read the NCAR Graphics document "NCAR Graphics Fundamentals, UNIX Version" π.
okay but because old codes still exist and we're not gonna leave you confused, here are the definitions of the PAU and MU systems, so you can interpret and convert codes that use them:
- 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. You can set values ofMXandMYby calling the routinesSETIorSETUSV, and get them back by calling the routinesGETSIorGETUSV. πΎ - The metacode coordinates of a point are integers
IMXandIMYbetween0and32767inclusive. The area addressed is a square in a "metacode space" that's 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:
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 living in whatever coordinate system the second letter of the function name says. So when you referenceCFUX,RXis a fractional X coordinate; when you referenceCUFX,RXis a user X coordinate. slay.RYβ an input expression of typeREAL, and it's a Y coordinate in whatever coordinate system the second letter of the function name says. 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, iykyk).
okay now the naming tea, because the letters are not random and this is the whole lore:
- The first letter of the function name is a
Cif the result is of typeREAL, and aKif the result is of typeINTEGER(and theKthing only happens for some of the obsolete ones). This is just the usual FORTRAN convention for implicit typing doing its thing β¨. - The second letter of the function name tells you the coordinate system of the argument.
- The third letter of the function name tells you 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 it's an X or a Y coordinate being converted. obviously. π
π§ C-BINDING DESCRIPTION π§
The C-binding argument description is the same as the FORTRAN argument description. that's it, that's the whole section, we love an efficient queen π
π₯ EXAMPLES π₯
Use the ncargex command to see these relevant examples that 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 look at it bestie, it's right there π
π 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) let you convert between any combination of PAUs, MUs, fractional coordinates, and user coordinates. iconic era, honestly.
But PAUs and MUs are obsolete now, so only four of the conversion functions are still pertinent:
CFUXandCFUYlet you convert the X and Y coordinates of a point from the fractional system to the user system πCUFXandCUFYdo 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. π
π SEE ALSO π
Online: cfux, cfuy, cmfx, cmfy, cmux, cmuy, cpfx, cpyfβ¦ no wait bestie, it's 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, every single letter of it, no crumbs left π«Ά
this was the CMUX page from the NCAR GRAPHICS manual, and the version/date energy on the sign-off is UNIX, March 1993, filed under SPPS_converters(3NCARG) β mwah, periodt π
β¨
π¦ 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