STUIXY(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ 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:
    • 0 means 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:

  1. pick a unique mapping code β€” a positive integer greater than 2. πŸ‘‘
  2. modify each of the three routines β€” STUMXY, STUIXY, and STUMTA β€” 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:

  • STUMXY maps a point from data to user coordinate space.
  • STUIXY inversely maps a point from user to data coordinate space. (that's our girl!! πŸŽ€)
  • STUMTA finds 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 mapping
  • 1 β€” Ezmap projections
  • 2 β€” 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 (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