PWRZT(3NCARG)
π PWRZT π β the tea on drawing 3-D character strings (from the NCAR GRAPHICS manual, bestie)
β¨ 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 job. It's giving text, but make it 3-D. π¦
β οΈ okay so, a little lore dump, don't skip it: at one time, a Threed routine calledPSYM3was supported. It has long been considered obsolete. If you callPSYM3, you will get an error message telling you to usePWRZTinstead and execution will be terminated. π So likeβ¦ don't.
As nearly as we can determine, the statement
CALL PSYM3 (U,V,W,ICHAR,ISIZE,IDIR,ITOP,IUP)
may be replaced by the statements
IF (IUP.EQ.2) CALL VECT3 (U,V,W)
CALL PWRZT (U,V,W,ICHAR,1,ISIZE,IDIR,ITOP,0)
(Old manuals seem to indicate that the fifth argument in the call to PSYM3 may have been a real called SIZE, rather than an integer called ISIZE; it is not clear whether this was a misprint or not. π§ we simply do not know, and we are not going to pretend we do.)
The function of PSYM3 was to plot a symbol at the projection of a particular point; this can now be done with PWRZT. If the eighth argument in the second and following of a series of calls to PSYM3 had the value 2, straight-line segments were drawn connecting the projections of the points; this is better done with a single call to CURVE3, or by calling FRST3 for the first point and VECT3 for each of the other points. glow up achieved β¨
β¨ 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 β¨
okay bestie, here's the full roster of arguments, no skips, no cuts, we go through every single one π
U,V,Wβ (input expressions of typeREAL) these are the U, V, and W coordinates of a point, in the user's 3-space, relative to which the character string is to be positioned. πCHRSβ (an input constant or variable of typeCHARACTER) is the character string to be drawn. It may contain uppercase alphabetic characters, the digits0through9, and a small set of "special" characters (plus, minus, asterisk, slash, left and right parentheses, equals sign, blank, comma, and period). Other characters are treated as blanks. (Note especially that lowercase alphabetic characters are not available. π yes really, no lowercase, we're in our uppercase era only, no cap)LCHRSβ (an input expression of typeINTEGER) is the number of characters inCHRS. π’ISIZEβ (an input expression of typeINTEGER) specifies the character width to be used, defined in terms of the width of the plotter frame. Because projected characters vary in width depending on just where they are placed within the box being viewed and the position from which that box is viewed,ISIZEis 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 β when the character is on the near side of the box and in a plane perpendicular to the line of sight. π Specifically:- If between
0and3,ISIZEis1.,1.5,2., or3.times a standard width equal to1/128thof the screen width. - If greater than
3,ISIZEis the character width in units of1/1024thof the plotter frame.
- If between
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. π the math is mathing, trust.
IDIRβ (an input expression of typeINTEGER) is the direction in which the character string is to be written, as follows:
1 = +U -1 = -U
2 = +V -2 = -V
3 = +W -3 = -W
ITOPβ (an input expression of typeINTEGER) is the direction from the center of the first character to the top of the first character; possible values ofITOPare the same as those ofIDIR, above.ABS(ITOP)must not be equal toABS(IDIR). π¨ like, do not do that, that's the vibe check you will fail.ICENβ (an input expression of typeINTEGER) is the centering option, specifying where(U,V,W)is relative to the string written, as follows:-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 that they can be projected from 3-D to 2-D), they are 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. twins! identical! π«Ά
β¨ EXAMPLES β¨
Use the ncargex command to see the following relevant example: tpwrzt. go look at it, it's iconic, it ate π₯
β¨ ACCESS β¨
To use PWRZT or c_pwrzt, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. order matters bestie, do not freestyle it π
β¨ SEE ALSO β¨
Online: threed, curve3, fence3, frst3, line3, perim3, point3, psym3, pwrz, set3, threed, tick3, tick43, vect3, ncarg_cbind. the whole friend group π
(yes threed shows up twice, it's just that popular, leave it alone π)
β¨ 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, no crumbs left π this one came straight out of the UNIX manual, March 1993, filed under PWRZT(3NCARG) β yeah it's vintage, it's retro, it's lowkey a classic, and it's still slaying. periodt. ππΈ
π¦ 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