1KUPX(3NCARG) NCAR GRAPHICS KUPX(3NCARG)
2
3
4
6 KUPX - Converts from user coordinates to plotter address unit coordi‐
7 nates.
8
9
10
11SPPS_converters(3NCARG) NCAR GRAPHICS SPPS_converters(3NCARG)
12
13
14
16 spps_converters - A set of functions, each of which transforms a
17 coordinate from one of the NCAR Graphics coordinate systems to another.
18 The complete list of functions is as follows: CFUX, CFUY, CMFX, CMFY,
19 CMUX, CMUY, CPFX, CPFY, CPUX, CPUY, CUFX, CUFY, KFMX, KFMY, KFPX, KFPY,
20 KMPX, KMPY, KPMX, KPMY, KUMX, KUMY, KUPX, and KUPY.
21
23 Plotter Address Units (PAUs) and Metacode Units (MUs) are no longer
24 used in NCAR Graphics; thus, all functions with either an M or a P as
25 the second or third letter of the function name are considered
26 obsolete.
27
28 The current recognized coordinate systems are GKS world coordinates,
29 GKS normalized device coordinates, NCAR Graphics fractional
30 coordinates, and NCAR Graphics user coordinates. See the NCAR Graphics
31 document "NCAR Graphics Fundamentals, UNIX Version" for descriptions of
32 these coordinate systems.
33
34 The following definitions of the PAU coordinate system and the MU
35 coordinate system are provided for the purpose of interpreting and
36 converting codes which use PAUs or MUs:
37
38 The plotter coordinates of a point are integers IPX and IPY, where IPX
39 is between 1 and 2**MX and IPY is between 1 and 2**MY. MX and MY are
40 internal parameters of SPPS; each has a default value of 10. Values of
41 MX and MY can be set by calling the routines SETI or SETUSV and
42 retrieved by calling the routines GETSI or GETUSV.
43
44 The metacode coordinates of a point are integers IMX and IMY between 0
45 and 32767 inclusive. The area addressed is a square in a "metacode
46 space" that is usually mapped into a square subset of the addressable
47 area of the plotting device. Metacode coordinates were used in calls
48 to the routine PLOTIT and are returned in calls to FL2INT.
49
51 Current:
52 X = CFUX (RX), Y = CFUY(RY)
53 X = CUFX (RX), Y = CUFY(RY)
54
55 Obsolete:
56 X = CMUX (IX), Y = CMUY(IY)
57 X = CPUX (IX), Y = CPUY(IY)
58 X = CMFX (IX), Y = CMFY(IY)
59 X = CPFX (IX), Y = CPFY(IY)
60 I = KFMX (RX), J = KFMY(RY)
61 I = KUMX (RX), J = KUMY(RY)
62 I = KFPX (RX), J = KFPY(RY)
63 I = KUPX (RX), J = KUPY(RY)
64 I = KPMX (IX), J = KPMY(IY)
65 I = KMPX (IX), J = KMPY(IY)
66
68 #include <ncarg/ncargC.h>
69
70 float c_cfux (float rx)
71
72 float c_cfuy (float ry)
73
74 float c_cufx (float rx)
75
76 float c_cufy (float ry)
77
79 RX (an input expression of type REAL) is an X coordinate in
80 the coordinate system specified by the second letter of the
81 function name. In a reference to CFUX, RX is a fractional
82 X coordinate; in a reference to CUFX, RX is a user X
83 coordinate.
84
85 RY (an input expression of type REAL) is a Y coordinate in the
86 coordinate system specified by the second letter of the
87 function name. In a reference to CFUY, RY is a fractional
88 Y coordinate; in a reference to CUFY, RY is a user Y
89 coordinate.
90
91 IX and IY occur as arguments only in references to some of the obsolete
92 functions; they represent input expressions of type INTEGER, specifying
93 the X and Y coordinates of a point in either PAUs or MUs (depending on
94 the second letter of the function name).
95
96 The first letter of the function name is a C if the result is of type
97 REAL and a K if the result is of type INTEGER (the latter only happens
98 for some of the obsolete ones). This conforms to the usual FORTRAN
99 convention for implicit typing.
100
101 The second letter of the function name specifies the coordinate system
102 of the argument.
103
104 The third letter of the function name specifies the coordinate system
105 of the functional result. In references to CFUX and CFUY, the result
106 is in the user system; in references to CUFX and CUFY, the result is in
107 the fractional system.
108
109 The fourth letter of the function name is an X or a Y, depending on
110 whether an X or a Y coordinate is being converted.
111
113 The C-binding argument description is the same as the FORTRAN argument
114 description.
115
117 Use the ncargex command to see the following relevant examples which
118 use coordinate converters: mpex10, cbex10, sfex02, epltch.
119
120 The command "ncargex -n mpex10" will load the driver mpex10.f into your
121 current working directory where you can examine the file using a local
122 editor, or the UNIX more command.
123
125 There were 24 conversion functions in the original set. These
126 functions (12 for the X coordinate of a point, and 12 for the Y
127 coordinate), allowed one to convert between any combination of PAUs,
128 MUs, fractional coordinates, and user coordinates. PAUs and MUs are
129 now obsolete; thus, only four of the conversion functions are still
130 pertinent: CFUX and CFUY allow one to convert the X and Y coordinates
131 of a point from the fractional system to the user system, while CUFX
132 and CUFY do the opposite.
133
134 To use any of the conversion routines, load the load the NCAR Graphics
135 libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
136
138 Online: cfux, cfuy, cmfx, cmfy, cmux, cmuy, cpfx, cpfy, cpux, cpuy,
139 cufx, cufy, kfmx, kfmy, kfpx, kfpy, kmpx, kmpy, kpmx, kpmy, kumx, kumy,
140 kupx, kupy, spps, ncarg_cbind
141
142 Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for
143 NCAR GKS-0A Graphics
144
146 Copyright (C) 1987-2009
147 University Corporation for Atmospheric Research
148
149 The use of this Software is governed by a License Agreement.
150
151
152
153UNIX March 1993 SPPS_converters(3NCARG)