PCMPXY(3NCARG)
💖 PCMPXY 💖 — the NCAR Graphics girlies' guide (3NCARG)
ok so bestie, gather round, because this one is a Plotchar function and it's giving "I'm the middleman you never asked for but lowkey need." 🎀
✨ NAME ✨
PCMPXY — this routine is normally not called directly by the user (though it can be, no gatekeeping here 💅). It gets called by each of the routines PCHIQU, PCMEQU, and PCLOQU whenever the user has set the mapping flag 'MA' nonzero, asking for mapping of characters from one X/Y coordinate system to another. ✨
✨ SYNOPSIS ✨
CALL PCMPXY (IMAP,XINP,YINP,XOTP,YOTP)
✨ C-BINDING SYNOPSIS ✨
#include <ncarg/ncargC.h>
void c_pcmpxy (int imap, float xinp, float yinp, float *xotp, float
*yotp)
✨ DESCRIPTION ✨
ok so here's the whole lore, bestie, stay with me 🫶
IMAP— (an input expression of type INTEGER) tells you which mapping is about to happen. Whenever the Plotchar routines callPCMPXY,IMAP = 'MA'. The default version ofPCMPXYrecognizes the following values ofIMAP:IMAP = 0- Type of mapping — None. When
IMAPis zero, the routinePCMPXYis being asked for information about its capabilities with respect to a particular mapping. (it's a vibe check, basically 🔍) XINP— Input: the real equivalent of a possible value ofIMAPabout which information is desired.YINP— Output (real):0.says that the mapping specified byXINPis not available,1.that it is available,2.that its inverse is available, and3.that both it and its inverse are available.
- Type of mapping — None. When
IMAP = 1- Type of mapping — Ezmap projection. 🌍
XINP— Longitude, in degrees.YINP— Latitude, in degrees.
IMAP = 2- Type of mapping — Rho/theta mapping.
XINP— Rho, in user units.YINP— Theta, in degrees.
IMAP = 3- Type of mapping — Projection from an arbitrary parallelogram in 3-space to an image plane. This is implemented using a package which is currently under development and is not yet generally available. 🚧
XINP— A multiplier for a unit vector along one edge of the parallelogram.YINP— A multiplier for a unit vector along an intersecting edge of the parallelogram.
IMAP = 4- Type of mapping — A version of the EZMAP projection that is intended to be used to label specific points on the surface of the globe. When
'MA' = 4, use"0."for each of the argumentsXPOS,YPOS, andANGDin calls toPCHIQUandPCMEQU. Initially, each label is assumed to be placed at the point on the globe with latitude zero and longitude zero and to be written along the equator. Three rotations are then performed to move the label to the point(PLAT,PLON)in such a way that it makes an anglePANGwith the local eastward-pointing vector. Finally, the EZMAP routineMAPTRAis called to project the label as specified by the current state of EZMAP. The desired values ofPANG,PLAT, andPLON(in degrees) are passed toPCMPXYin the labelled common blockPCMP04, which contains just those three variables, in that order. Use thencargexcommand to see the following relevant example:cpex10. 📐 XINP— Longitude, in degrees.YINP— Latitude, in degrees.
- Type of mapping — A version of the EZMAP projection that is intended to be used to label specific points on the surface of the globe. When
IMAP = 100- Type of mapping — The identity mapping, but returns
1.E12outside a specified viewport. Used by the utilityScrolled_titleto do clipping at the edges of the viewport. ✂️ XINP— X coordinate, in the fractional system.YINP— Y coordinate, in the fractional system.
- Type of mapping — The identity mapping, but returns
- other > 0
- Type of mapping — The identity mapping.
XINP— Any real value.YINP— Any real value.
- other < 0
- Type of mapping — An inverse mapping.
XINP— A mapped X coordinate.YINP— A mapped Y coordinate.
- Note: Values of
IMAPless than or equal to zero are not currently used by Plotchar in callingPCMPXY. The scheme described is the same as that used for the routineCPMPXY, in the NCAR Graphics package Conpack. It is possible that, in the future, values ofIMAPless than or equal to zero will occur in calls toPCMPXY, so it is best to be prepared. 👀
XINPandYINP— (input expressions of type REAL) specify the X and Y coordinates of a point to be mapped.
Note: WhenIMAPis less than or equal to zero (which cannot currently happen, but may someday be possible),XINPandYINPare used differently, as shown above.
XOTPandYOTP— (output variables of type REAL) in whichPCMPXYreturns the mapped X and Y coordinates of the point. If the point is not visible under the mapping selected (as, for example, when the orthographic projection of Ezmap is being used and the point to be mapped is on the other side of the globe 🌎),PCMPXYmust return, as a signal that this is the case, whatever special nonzero value has been given to the internal parameter'OR', so that the calling routine can take appropriate action (to properly clip the character being drawn, for example).
Note: WhenIMAPis less than or equal to zero (which cannot currently happen, but may someday be possible),XOTPandYOTPare used differently, as shown in the table above.
✨ C-BINDING DESCRIPTION ✨
The C-binding argument descriptions are the same as the FORTRAN argument descriptions. no crumbs left behind, fr fr 🧚
✨ USAGE ✨
This routine is normally not called directly by the user (though it can be — main character energy, do what you want 💅). It is called by each of the routines PCHIQU, PCMEQU, and PCLOQU when the user has set the mapping flag 'MA' nonzero to request mapping of characters from one X/Y coordinate system to another. A call to PCMPXY has the following form:
CALL PCMPXY (IMAP,XINP,YINP,XOTP,YOTP)
The default version of PCMPXY does several useful mappings; a user version may be supplied to do others. (build your own, iconique ✨)
✨ ACCESS ✨
To use PCMPXY or c_pcmpxy, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. 👑 (order matters, bestie, don't test me)
✨ SEE ALSO ✨
Online: plotchar, pcdlsc, pcgetc, pcgeti, pcgetr, pchiqu, pcloqu, pcmequ, pcpnwi, pcrset, pcsetc, pcseti, pcsetr, ncarg_cbind.
Hardcopy: NCAR Graphics Fundamentals, UNIX Version
✨ COPYRIGHT ✨
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
ok that's the whole page, you ate that 🍓 PCMPXY(3NCARG) from NCAR GRAPHICS, last touched August 1993 on the UNIX side of town — ily, go map some characters 💖✨🎀
📦 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