Re: Question

From: Andy Mai (mai AT unknown)
Date: Sat Mar 13 1999 - 08:54:17 MST


On Sat, 13 Mar 1999, njyzh wrote:

> I think this problem is simple but I could not find any documentation
> about it, i.e. what do these functions "cfux" "cfuy" "cpux" "cpuy"
> "wtstr" do?

From the man pages:

% man spps_converters

SPPS_converters(3NCARG) NCAR GRAPHICS SPPS_converters(3NCARG)

NNNNAAAAMMMMEEEE
     spps_converters - A set of functions, each of which
     transforms a coordinate from one of the NCAR Graphics
     coordinate systems to another. The complete list of
     functions is as follows: CFUX, CFUY, CMFX, CMFY, CMUX,
     CMUY, CPFX, CPFY, CPUX, CPUY, CUFX, CUFY, KFMX, KFMY, KFPX,
     KFPY, KMPX, KMPY, KPMX, KPMY, KUMX, KUMY, KUPX, and KUPY.

SSSSTTTTAAAATTTTUUUUSSSS
     Plotter Address Units (PAUs) and Metacode Units (MUs) are no
     longer used in NCAR Graphics; thus, all functions with
     either an M or a P as the second or third letter of the
     function name are considered obsolete.

     The current recognized coordinate systems are GKS world
     coordinates, GKS normalized device coordinates, NCAR
     Graphics fractional coordinates, and NCAR Graphics user
     coordinates. See the NCAR Graphics document "NCAR Graphics
     Fundamentals, UNIX Version" for descriptions of these
     coordinate systems.

     The following definitions of the PAU coordinate system and
     the MU coordinate system are provided for the purpose of
     interpreting and converting codes which use PAUs or MUs:

     The plotter coordinates of a point are integers IPX and IPY,
     where IPX is between 1 and 2**MX and IPY is between 1 and
     2**MY. MX and MY are internal parameters of SPPS; each has
     a default value of 10. Values of MX and MY can be set by
     calling the routines SETI or SETUSV and retrieved by calling
     the routines GETSI or GETUSV.

     The metacode coordinates of a point are integers IMX and IMY
     between 0 and 32767 inclusive. The area addressed is a
     square in a "metacode space" that is usually mapped into a
     square subset of the addressable area of the plotting
     device. Metacode coordinates were used in calls to the
     routine PLOTIT and are returned in calls to FL2INT.

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     Current:
     X = CFUX (RX), Y = CFUY(RY)
     X = CUFX (RX), Y = CUFY(RY)

     Obsolete:
     X = CMUX (IX), Y = CMUY(IY)
     X = CPUX (IX), Y = CPUY(IY)
     X = CMFX (IX), Y = CMFY(IY)
     X = CPFX (IX), Y = CPFY(IY)
     I = KFMX (RX), J = KFMY(RY)
     I = KUMX (RX), J = KUMY(RY)
     I = KFPX (RX), J = KFPY(RY)
     I = KUPX (RX), J = KUPY(RY)
     I = KPMX (IX), J = KPMY(IY)
     I = KMPX (IX), J = KMPY(IY)

CCCC----BBBBIIIINNNNDDDDIIIINNNNGGGG SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     #include <ncarg/ncargC.h>

     float c_cfux (float rx)

     float c_cfuy (float ry)

     float c_cufx (float rx)

     float c_cufy (float ry)

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     RX (an input expression of type REAL) is an X
                 coordinate in the coordinate system specified by
                 the second letter of the function name. In a
                 reference to CFUX, RX is a fractional X
                 coordinate; in a reference to CUFX, RX is a user
                 X coordinate.

     RY (an input expression of type REAL) is a Y
                 coordinate in the coordinate system specified by
                 the second letter of the function name. In a
                 reference to CFUY, RY is a fractional Y
                 coordinate; in a reference to CUFY, RY is a user
                 Y coordinate.

     IX and IY occur as arguments only in references to some of
     the obsolete functions; they represent input expressions of
     type INTEGER, specifying the X and Y coordinates of a point
     in either PAUs or MUs (depending on the second letter of the
     function name).

     The first letter of the function name is a C if the result
     is of type REAL and a K if the result is of type INTEGER
     (the latter only happens for some of the obsolete ones).
     This conforms to the usual FORTRAN convention for implicit
     typing.

     The second letter of the function name specifies the
     coordinate system of the argument.

     The third letter of the function name specifies the
     coordinate system of the functional result. In references
     to CFUX and CFUY, the result is in the user system; in
     references to CUFX and CUFY, the result is in the fractional
     system.

     The fourth letter of the function name is an X or a Y,
     depending on whether an X or a Y coordinate is being
     converted.

CCCC----BBBBIIIINNNNDDDDIIIINNNNGGGG DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     The C-binding argument description is the same as the
     FORTRAN argument description.

EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
     Use the ncargex command to see the following relevant
     examples which use coordinate converters: mpex10, cbex01,
     sfex02, epltch.

     The command "ncargex -n mpex10" will load the driver
     mpex10.f into your current working directory where you can
     examine the file using a local editor, or the UNIX more
     command.

AAAACCCCCCCCEEEESSSSSSSS
     There were 24 conversion functions in the original set.
     These functions (12 for the X coordinate of a point, and 12
     for the Y coordinate), allowed one to convert between any
     combination of PAUs, MUs, fractional coordinates, and user
     coordinates. PAUs and MUs are now obsolete; thus, only four
     of the conversion functions are still pertinent: CFUX and
     CFUY allow one to convert the X and Y coordinates of a point
     from the fractional system to the user system, while CUFX
     and CUFY do the opposite.

     To use one of these conversion routines, load the NCAR
     Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably
     in that order.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     Online: cfux, cfuy, cmfx, cmfy, cmux, cmuy, cpfx, cpfy,
     cpux, cpuy, cufx, cufy, kfmx, kfmy, kfpx, kfpy, kmpx, kmpy,
     kpmx, kpmy, kumx, kumy, kupx, kupy, spps, ncarg_cbind

     Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's
     Guide for NCAR GKS-0A Graphics

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

% man wtstr

WTSTR(3NCARG) NCAR GRAPHICS WTSTR(3NCARG)

NNNNAAAAMMMMEEEE
     WTSTR - draws a specified text string at a specified
     position in the user coordinate system. The call has
     arguments specifying the size, orientation, and centering of
     the string.

SSSSTTTTAAAATTTTUUUUSSSS
     WTSTR specifies character sizes in Plotter Address Units
     (PAUs), which are no longer used in NCAR Graphics; thus,
     WTSTR is considered an obsolete routine.

     The current recognized coordinate systems are GKS world
     coordinates, GKS normalized device coordinates, NCAR
     Graphics fractional coordinates, and NCAR Graphics user
     coordinates. See the NCAR Graphics document "NCAR Graphics
     Fundamentals, UNIX Version" for a description of these
     coordinate systems.

     WTSTR continues to be provided for compatibility of early
     NCAR Graphics codes. If you are writing new code, we
     suggest that you use the more general text writing routines
     of the Plotchar utility: PLCHLQ, PLCHMQ, and PLCHHQ.

     The following definition of the PAU Coordinate System is
     included for the purpose of interpreting and converting PAU
     codes:

     The plotter coordinates of a point are integers IPX and IPY,
     where IPX is between 1 and 2**MX and IPY is between 1 and
     2**MY. MX and MY are internal parameters of SPPS; each has
     the default value 10. Values of MX and MY can be set by the
     routine SETI and retrieved by the routine GETSI.

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     CALL WTSTR(PX,PY,CH,IS,IO,IC)

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     PX (an input expression of type REAL) defines the X
                 user coordinate where the text string is to be
                 drawn.

     PY (an input expression of type REAL) defines the Y
                 user coordinate where the text string is to be
                 drawn.

     CH (an input constant or variable of type
                 CHARACTER) is the text string to be drawn.

     IS (an input expression of type INTEGER) specifies
                 the character width in plotter address units
                 (PAUs).

     IO (an input expression of type INTEGER) specifies
                 the rotation angle of the text string. IO is
                 measured in degrees counter-clockwise from a
                 horizontal orientation.

     IC (an input expression of type INTEGER) specifies
                 the centering option, as follows:

                 <0 (PX,PY) will be in the vertical center of
                     the left edge of the leftmost character in
                     the original horizontal string.

                 =0 (PX,PY) will be in the center of the text
                     extent rectangle.

>0 (PX,PY) will be in the vertical center of
                     the right edge of the rightmost character in
                     the original horizontal string.

     A call to WTSTR causes the SPPS polyline buffer to be
     flushed and leaves the "pen" (for subsequent calls to
     FRSTPT, VECTOR, PLOTIF, and PLOTIT) at the location (PX,PY).

AAAACCCCCCCCEEEESSSSSSSS
     To use WTSTR, load the NCAR Graphics libraries ncarg,
     ncarg_gks, and ncarg_c, preferably in that order.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     Online: gtx, gstxal, gstxp, gstxfp, gschh, gschsp, gschup,
     gschxp, gscr, gstxci, spps, plotchar, plchhq, plchmq,
     plchlq, pwrit, plotif, seti, getsi

     Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's
     Guide for NCAR GKS-0A Graphics

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

Andy Mai
Phone: 303-497-1391
Email: mai AT unknown



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:40:36 MDT