PWRZT(3NCARG)

πŸ’– PWRZT πŸ’–

okay so bestie, we're doing PWRZT today, and it lives in the NCAR GRAPHICS corner of the 3NCARG manuals. it's giving "3-D text but make it a projection" and honestly? iconic. πŸŽ€


✨ NAME ✨

PWRZT draws the projections of character strings that are positioned in a plane parallel to one of the three coordinate planes. that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

CALL PWRZT (U,V,W,CHRS,LCHRS,ISIZE,IDIR,ITOP,ICEN)

✨ C-BINDING SYNOPSIS ✨

#include <ncarg/ncargC.h>

void c_pwrzt (float u, float v, float w, char *chrs, int lchrs,
int isize, int idir, int itop, int icen)

✨ DESCRIPTION ✨

🌸 U,V,W

these are input expressions of type REAL, and they're the U, V, and W coordinates of a point in the user's 3-space β€” like, the anchor point that the character string gets positioned relative to. πŸ“

🌸 CHRS

an input constant or variable of type CHARACTER β€” this is the actual string being drawn. and bestie, it's picky. πŸ’… it may contain:

  • uppercase alphabetic characters
  • the digits 0 through 9
  • a small set of "special" characters: plus, minus, asterisk, slash, left and right parentheses, equals sign, blank, comma, and period

any other characters get treated as blanks. and no, before you ask β€” lowercase alphabetic characters are NOT available. note that especially. 😭

🌸 LCHRS

an input expression of type INTEGER β€” the number of characters in CHRS. simple as that. πŸ”’

🌸 ISIZE

an input expression of type INTEGER that specifies the character width to be used, defined in terms of the width of the plotter frame. and here's the tea: because projected characters vary in width depending on just where they're placed within the box being viewed and where you're viewing that box from, ISIZE is interpreted as specifying the width of a character when that character is positioned and viewed in such a way as to make it as large as it could possibly be β€” i.e. when the character is on the near side of the box and in a plane perpendicular to the line of sight. πŸ‘€

specifically:

  • If between 0 and 3, ISIZE is 1., 1.5, 2., or 3. times a standard width equal to 1/128th of the screen width.
  • If greater than 3, ISIZE is the character width in units of 1/1024th of the plotter frame.

one third of the "width" referred to here is white space. what ISIZE really specifies is the distance between the centers of adjacent characters in a string. characters are digitized to be 7/6 * ISIZE units high and 4/6 * ISIZE units wide, excluding white space. πŸ“

🌸 IDIR

an input expression of type INTEGER β€” the direction the character string gets written in. options are:

  • 1 = +U, -1 = -U
  • 2 = +V, -2 = -V
  • 3 = +W, -3 = -W

🌸 ITOP

an input expression of type INTEGER β€” the direction from the center of the first character to the top of the first character. possible values of ITOP are the same as those of IDIR, above. ⚠️ and this is the one rule you cannot break: ABS(ITOP) must not be equal to ABS(IDIR).

🌸 ICEN

an input expression of type INTEGER β€” the centering option. it says where (U,V,W) sits relative to the string being written, like this:

  • -1 β€” (U,V,W) is the center of the left edge of the first character.
  • 0 β€” (U,V,W) is the center of the entire string.
  • 1 β€” (U,V,W) is the center of the right edge of the last character.

because characters drawn by PWRZT are stroked using the GKS polyline primitive (so they can be projected from 3-D to 2-D), they're drawn in the current polyline color, as determined by the last call to the GKS routine GSPLCI β€” by default, color index 1 is used. line width is determined by the last call to the GKS routine GSLWSC β€” by default, the line width scale factor is 1. 🌈


✨ C-BINDING DESCRIPTION ✨

the C-binding argument descriptions are the same as the FORTRAN argument descriptions. no notes, no changes, same energy. 🫢


✨ EXAMPLES ✨

use the ncargex command to see the following relevant examples:

  • tpwrzt
  • fthex01
  • fthex02
  • fthex03
  • fthex04
  • fthex05

✨ ACCESS ✨

to use PWRZT or c_pwrzt, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. πŸ‘‘


✨ SEE ALSO ✨

Online: threed, curve3, fence3, frst3, line3, perim3, point3, psym3, pwrz, set3, threed, tick3, tick43, vect3, 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 πŸ’– this one's from the UNIX manual, March 1993, filed under PWRZT(3NCARG). slay, go project some characters, and remember: ABS(ITOP) β‰  ABS(IDIR). periodt. πŸ’…βœ¨