KMPX(3NCARG)
β¨ NAME β¨
hi bestie π«Ά welcome to KMPX(3NCARG), straight out of the NCAR GRAPHICS corner of the universe. we're in manual section 3NCARG and this page is giving "coordinate converter" energy:
KMPXβ converts from metacode coordinates to plotter address unit coordinates.
that's it, that's the whole flex. periodt. π
and now, the sequel nobody asked for but literally everyone needed β SPPS_converters(3NCARG), also NCAR GRAPHICS π
πΈ NAME πΈ
spps_convertersβ a whole squad of functions, each one transforming a coordinate from one of the NCAR Graphics coordinate systems into another. the complete roster is literally this:CFUX,CFUY,CMFX,CMFY,CMUX,CMUY,CPFX,CPFY,CPUX,CPUY,CUFX,CUFY,KFMX,KFMY,KFPX,KFPY,KMPX,KMPY,KPMX,KPMY,KUMX,KUMY,KUPX, andKUPY.
π STATUS π
okay so here's the tea β
- Plotter Address Units (PAUs) and Metacode Units (MUs) are no longer used in NCAR Graphics; thus, literally every function with either an
Mor aPas the second or third letter of its name is considered obsolete. rip πͺ¦ - the coordinate systems that ARE still recognized rn are GKS world coordinates, GKS normalized device coordinates, NCAR Graphics fractional coordinates, and NCAR Graphics user coordinates. if you want the full descriptions of these, go read the NCAR Graphics document "NCAR Graphics Fundamentals, UNIX Version". π
- the following definitions of the PAU coordinate system and the MU coordinate system are here purely so you can interpret and convert codes that still use PAUs or MUs (iykyk):
- 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 the values ofMXandMYby calling the routinesSETIorSETUSV, and retrieve them 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.
- the plotter coordinates of a point are integers
π 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 πΈ
okay bestie, let's decode the alphabet soup π€
RXβ an input expression of type REAL, and it's an X coordinate living in the coordinate system specified by the second letter of the function name. so in a reference toCFUX,RXis a fractional X coordinate; in a reference toCUFX,RXis a user X coordinate.RYβ an input expression of type REAL, an 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 type INTEGER, 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).- the first letter of the function name is a
Cif the result is of type REAL and aKif the result is of type INTEGER (and theKsituation only happens for some of the obsolete ones). this conforms to the usual FORTRAN convention for implicit typing, slay. π - 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 π
ngl this one's short and sweet: the C-binding argument description is the same as the FORTRAN argument description. copy-paste energy. π«Ά
π₯ EXAMPLES π₯
wanna see it in action? use the ncargex command to peek at the following relevant examples which use coordinate converters: mpex10, cbex10, sfex02, epltch.
and this command right here:
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. iconic.
π ACCESS π
- there were 24 conversion functions in the original set β
12for the X coordinate of a point, and12for the Y coordinate β and they let you convert between any combination of PAUs, MUs, fractional coordinates, and user coordinates. 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, whileCUFXandCUFYdo the opposite. π¦ - to use any of the conversion routines, load the NCAR Graphics libraries
ncarg,ncarg_gks, andncarg_cβ preferably in that order. β
π 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 a wrap bestie π this was KMPX(3NCARG) and SPPS_converters(3NCARG) from NCAR GRAPHICS, on UNIX, dated March 1993 β¨ go forth and convert some coordinates, you absolute legend π
π¦ 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