TDPARA(3NCARG)

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

✨ TDPARA ✨ (from the NCAR GRAPHICS crew, section 3NCARG)

okay bestie, gather round, because this is the setup routine that makes the whole TDPACK situation pop off πŸ’–


🌸 NAME 🌸

TDPARA β€” it's the initialization routine for TDPACK, and you call it to set the value of certain internal values. that's the whole job. iconic, honestly.


πŸŽ€ SYNOPSIS πŸŽ€

CALL TDPARA (UA00, VA00, WA00, UV10, VV10, WV10, UV01, VV01, WV01)

πŸ’… C-BINDING SYNOPSIS πŸ’…

#include <ncarg/ncargC.h>

void c_tdpara(float ua00, float va00, float wa00, float uv10, float
vv10, float wv10, float uv01, float vv01, float wv01)

πŸ¦‹ DESCRIPTION πŸ¦‹

so, think of this routine as either an initialization routine or just a lil routine that gives you access to certain internal values β€” either framing is valid, no cap. what it actually does is transfer the values of its arguments into TDPACK labelled common blocks so that other TDPACK routines can use them later. 🌈

and those values? they define a "reference parallelogram". every point in the plane where that parallelogram lives can be ID'd by giving its "parallelogram coordinates": a pair of reals, one of which you can think of as an "X" coordinate and the other as a "Y" coordinate. two numbers, one plane, so many possibilities πŸ’œ

here's the cute part: you can call TDPARA wherever you want without stressing about calls to TDINIT, because those two routines do not affect one another. but β€” and this is the plot twist β€” redefining the reference parallelogram changes how each of TDPRPA, TDPRPI, TDGRID, TDLBLA, and TDPLCH behave, because all of them use parallelogram coordinates in some way. 🫢

⚠️ heads up: each of the routines TDGRDS and TDLBLS calls TDPARA to redefine the reference parallelogram, and neither of them restores the original definition when it's done. so if you had a vibe going, it's gone. just so you know.

if a point has parallelogram coordinates (XIPA,YIPA), then its actual 3-space coordinates come from these equations:

U = UA00+XIPA*UV10+YIPA*UV01
V = VA00+XIPA*VV10+YIPA*VV01
W = WA00+XIPA*WV10+YIPA*WV01

the point with parallelogram coordinates (0,0) is in what you might call the "lower left" corner of the parallelogram, and the point with parallelogram coordinates (1,1) is in what you might call the "upper right" corner. and the way that any point of the plane containing the reference parallelogram can be identified using its parallelogram coordinates β€” not just the points inside the parallelogram itself β€” is honestly so generous of it. πŸ’–

ngl, one thing to know: even though the reference parallelogram doesn't have to be rectangular, a non-rectangular one is probably not very useful. in fact, a square one defined by unit vectors is probably best, especially if you're drawing characters in the plane of the reference parallelogram. ✨

let me give you the example, because it eats:

say you want to write the characters "THE U/V PLANE" in that part of the U/V plane where U values are between 0 and 100 and V values are between 0 and 200. probably best to use a reference parallelogram with an origin at (0,0,0), an "X" side with components (1,0,0), and a "Y" side with components (0,1,0). then, in the call to TDPLCH, you can place the character string at parallelogram coordinates (50,100) and use a character size of 1.5. πŸŽ€

but if you instead used a reference parallelogram with an origin at (0,0,0), an "X" side with components (100,0,0), and a "Y" side with components (0,200,0), you could place the character string at parallelogram coordinates (.5,.5) and use a character size of .015 β€” except the characters written would be twice as high as they are wide, which is undesirable. we don't want that. 😭

the arguments of TDPARA are as follows:

  • UA00, VA00, and WA00 β€” (input expressions of type REAL) the coordinates of the "origin" of the parallelogram: the point with parallelogram coordinates (0,0).
  • UV10, VV10, and WV10 β€” (input expressions of type REAL) the U, V, and W components of the vector from the origin of the parallelogram to the point with parallelogram coordinates (1,0).
  • UV01, VV10, and WV01 β€” (input expressions of type REAL) the U, V, and W components of the vector from the origin of the parallelogram to the point with parallelogram coordinates (0,1).

πŸ’œ C-BINDING DESCRIPTION πŸ’œ

the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different syntax, we love consistency 🌸


πŸ‘‘ ACCESS πŸ‘‘

to use TDPARA or c_tdpara, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. yes, the order matters, don't come for me πŸ™ˆ


🌈 SEE ALSO 🌈

Online: tdclrs, tdctri, tddtri, tdgeti, tdgetr, tdgrds, tdgrid, tdgtrs, tdinit, tditri, tdlbla, tdlbls, tdline, tdlnpa, tdmtri, tdotri, tdpack, tdpack_params, tdplch, tdprpa, tdprpi, tdprpt, tdseti, tdsetr, tdsort, tdstri, tdstrs

like, that's the whole friend group right there 🫢


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


and that's the tea, bestie πŸ’… β€” this page came to you from UNIX, dated July 1997, filed under TDPARA(3NCARG). go forth and define your parallelogram. periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from