KFMX(3NCARG)
π NAME π
okay bestie, welcome to KFMX(3NCARG) β this one converts from fractional coordinates to metacode coordinates. slay. π
but also, this page is basically the whole group chat, because it's the spps_converters page: a 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 literally:
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.
that's the whole squad. no cap. π
β¨ STATUS β¨
okay so Plotter Address Units (PAUs) and Metacode Units (MUs) are no longer used in NCAR Graphics. meaning: every function with either an M or a P as the second or third letter of the function name is considered obsolete. it's giving legacy code, bestie. π«
the currently recognized coordinate systems 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 the textbook, fr fr. π
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 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 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 typeREAL, and it'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). π
now, the naming scheme. it's actually so iconic once you see it:
the first letter of the function name is a C if the result is of type REAL and a K if the result is of type INTEGER (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. so in references to CFUX and CFUY, the result is in the user system; in references to CUFX and CUFY, the result is in the fractional system.
the fourth letter of the function name is an X or a Y, 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. that's it. matching energy, periodt. π«Ά
π₯ 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 look at it, 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) allowed one to convert between any combination of PAUs, MUs, fractional coordinates, and user coordinates. the range. the versatility. π
but PAUs and MUs are now obsolete; thus, only four of the conversion functions are still pertinent:
CFUXandCFUYβ allow one to convert the X and Y coordinates of a point from the fractional system to the user systemCUFXandCUFYβ do 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 says "load the load the" β we keep the lore exactly as it is, no edits. π)
ok but fr, mind that library order.ncarg, thenncarg_gks, thenncarg_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.
okay that's the whole thing, you ate. this was the KFMX(3NCARG) page living inside the SPPS_converters(3NCARG) page from NCAR Graphics, dated March 1993 β yes it's vintage, yes it still serves. love that for us. bye bestie, 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