STUIXY(3NCARG)
β¨ STUIXY β¨
okay bestie, gather round π this is a page from the NCAR GRAPHICS manual, and it's all about STUIXY β a lil routine whose whole job is inversely mapping a single point on the streamline from user coordinate space into data coordinate space. yes it's giving math girlie. yes you're gonna slay it. π¦
πΈ NAME πΈ
STUIXY</purgent> β inversely maps a single point on the streamline from user to data coordinate space. no cap, that's literally the whole thing. π
π SYNOPSIS π
CALL STUIXY (XUS,YUS,XDA,YDA,IST)
one line. five arguments. main character energy. β¨
π DESCRIPTION π
okay so here's the cast of characters, bestie, and yes every single one of them matters:
XUS(REAL, input) β the X coordinate of a point in the user coordinate system. π«ΆYUS(REAL, input) β the Y coordinate of a point in the user coordinate system. matching set, obsessed. πXDA(REAL, output) β the X coordinate of that point, but now in the data coordinate system. glow-up complete.YDA(REAL, output) β the Y coordinate of that point, also in the data coordinate system. β¨IST(REAL, output) β the status of the mapping operation, and listen closely because this one's important:0means success π- negative values mean the mapping failed π
- positive values are reserved and should not be used by the implementor of a mapping routine. like, don't. periodt. π
π« USAGE π«
so STUIXY is a user-modifiable routine β it exists to support custom mappings of the data coordinate space. and here's the tea: you don't invoke it directly. nope. instead, whenever the parameter MAP specifies a mapping that Streamlines doesn't handle internally (aka whenever MAP is set to a value other than 0, 1, or 2), Streamlines calls STUIXY once for each incremental step in the creation of a streamline. it's just doing its lil job behind the scenes, iykyk. π
the default version of STUIXY simply performs an identity mapping. boring but valid. β¨
now, to implement a custom mapping, you gotta:
- pick a unique mapping code β a positive integer greater than 2. π
- modify each of the three routines β
STUMXY,STUIXY, andSTUMTAβ so they recognize and respond consistently to the chosen code.
in the standard distribution of NCAR Graphics, those three routines all live together in a single file, stumxy.f. β¨ and here's who does what:
STUMXYmaps a point from data to user coordinate space.STUIXYinversely maps a point from user to data coordinate space. (that's our girl!! π)STUMTAfinds the tangent angle of the streamline at a point in NDC space β and yeah, that one is likely to be the most difficult to implement. π sending strength bestie.
STUIXY also has access to a common block called STMAP, which holds a bunch of variables used to record the current transformation state. and because it wants to accommodate a whole variety of mapping implementations, STMAP provides more information than is normally required. generous queen. π
β οΈ consider the values stored in STMAP as strictly read-only. do not touch. hands off. π
one essential member of this common block is IMAP, which contains the value currently assigned to the MAP parameter. π«Ά
in STUIXY, if you're the implementor of a custom mapping, you need to add code of the form:
IF (IMAP .EQ. <chosen_map_code>) THEN
...map XUS to XDA
...map YUS to YDA
...if error, set IST to a negative value
RETURN
ENDIF
also note: after the return from STUIXY, Streamlines checks to make sure that XDA and YDA are within the current boundaries of the data coordinate system. so don't be out here returning chaos. π
when you're implementing a custom mapping, you may wish to look at the coding of the pre-defined mappings in the file stmpxy.f:
0β identity mapping1β Ezmap projections2β polar coordinate mapping
and for these mappings, the subroutine STIMXY is the equivalent of STUIXY β it has an identical interface and may serve as a model for your implementation. study her, she ate. π₯
π ACCESS π
to use STUIXY, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order. order matters bestie, don't fight it. β¨
π¦ SEE ALSO π¦
Online: stgetc, stgeti, stgetr, stinit, stream, streamlines, streamlines_params, strset, stsetc, stseti, stsetr, stumsl, stumta, stumxy, 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.
and that's the whole page bestie, you understood it perfectly, I'm so proud of you πβ¨ππ¦πΈπ π«Ά
this lil masterpiece comes from the UNIX edition, dated April 1993, filed under STUIXY(3NCARG) β mwah, go map something iconic. π
π¦ 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