1PCMPXY(3NCARG)                   NCAR GRAPHICS                  PCMPXY(3NCARG)
2
3
4

NAME

6       PCMPXY - This routine is normally not called directly by the user
7       (though it can be). It is called by each of the routines PCHIQU,
8       PCMEQU, and PCLOQU when the user has set the mapping flag ´MA´ nonzero
9       to request mapping of characters from one X/Y coordinate system to
10       another.
11

SYNOPSIS

13       CALL PCMPXY (IMAP,XINP,YINP,XOTP,YOTP)
14

C-BINDING SYNOPSIS

16       #include <ncarg/ncargC.h>
17       void c_pcmpxy (int imap, float xinp, float yinp, float *xotp, float
18       *yotp)
19

DESCRIPTION

21       IMAP        (an input expression of type INTEGER) specifies which
22                   mapping is to be done. Whenever Plotchar routines call
23                   PCMPXY, IMAP = ´MA´. The default version of PCMPXY
24                   recognizes the following values of IMAP:
25
26                   IMAP = 0
27
28                          Type of mapping
29                             None. When IMAP is zero, the routine PCMPXY is
30                             being asked for information about its
31                             capabilities with respect to a particular
32                             mapping.
33
34                          XINP
35                             Input: the real equivalent of a possible value of
36                             IMAP about which information is desired.
37
38                          YINP
39                             Output (real): 0. says that the mapping specified
40                             by XINP is not available, 1.  that it is
41                             available, 2. that its inverse is available, and
42                             3. that both it and its inverse are available.
43
44                   IMAP = 1
45
46                          Type of mapping
47                             Ezmap projection.
48
49                          XINP
50                             Longitude, in degrees.
51
52                          YINP
53                             Latitude, in degrees.
54
55                   IMAP = 2
56
57                          Type of mapping
58                             Rho/theta mapping.
59
60                          XINP
61                             Rho, in user units.
62
63                          YINP
64                             Theta, in degrees.
65
66                   IMAP = 3
67
68                          Type of mapping
69                             Projection from an arbitrary parallelogram in
70                             3-space to an image plane. This is implemented
71                             using a package which is currently under
72                             development and is not yet generally available.
73
74                          XINP
75                             A multiplier for a unit vector along one edge of
76                             the parallelogram.
77
78                          YINP
79                             A multiplier for a unit vector along an
80                             intersecting edge of the parallelogram.
81
82                   IMAP = 4
83
84                          Type of mapping
85                             A version of the EZMAP projection that is
86                             intended to be used to label specific points on
87                             the surface of the globe.  When 'MA' = 4, use
88                             "0." for each of the arguments XPOS, YPOS, and
89                             ANGD in calls to PCHIQU and PCMEQU.  Initially,
90                             each label is assumed to be placed at the point
91                             on the globe with latitude zero and longitude
92                             zero and to be written along the equator.  Three
93                             rotations are then performed to move the label to
94                             the point (PLAT,PLON) in such a way that it makes
95                             an angle PANG with the local eastward-pointing
96                             vector.  Finally, the EZMAP routine MAPTRA is
97                             called to project the label as specified by the
98                             current state of EZMAP.  The desired values of
99                             PANG, PLAT, and PLON (in degrees) are passed to
100                             PCMPXY in the labelled common block PCMP04, which
101                             contains just those three variables, in that
102                             order.  Use the ncargex command to see the
103                             following relevant example: cpex10.
104
105                          XINP
106                             Longitude, in degrees.
107
108                          YINP
109                             Latitude, in degrees.
110
111                   IMAP = 100
112
113                          Type of mapping
114                             The identity mapping, but returns 1.E12 outside a
115                             specified viewport. Used by the utility
116                             Scrolled_title to do clipping at the edges of the
117                             viewport.
118
119                          XINP
120                             X coordinate, in the fractional system.
121
122                          YINP
123                             Y coordinate, in the fractional system.
124
125                   other > 0
126
127                          Type of mapping
128                             The identity mapping.
129
130                          XINP
131                             Any real value.
132
133                          YINP
134                             Any real value.
135
136                   other < 0
137
138                          Type of mapping
139                             An inverse mapping.
140
141                          XINP
142                             A mapped X coordinate.
143
144                          YINP
145                             A mapped Y coordinate.
146
147                   Note: Values of IMAP less than or equal to zero are not
148                   currently used by Plotchar in calling PCMPXY. The scheme
149                   described is the same as that used for the routine CPMPXY,
150                   in the NCAR Graphics package Conpack. It is possible that,
151                   in the future, values of IMAP less than or equal to zero
152                   will occur in calls to PCMPXY, so it is best to be
153                   prepared.
154
155       XINP and YINP
156                   (input expressions of type REAL) specify the X and Y
157                   coordinates of a point to be mapped.
158
159                   Note: When IMAP is less than or equal to zero (which cannot
160                   currently happen, but may someday be possible), XINP and
161                   YINP are used differently, as shown above.
162
163       XOTP and YOTP
164                   (output variables of type REAL) in which PCMPXY returns the
165                   mapped X and Y coordinates of the point.  If the point is
166                   not visible under the mapping selected (as, for example,
167                   when the orthographic projection of Ezmap is being used and
168                   the point to be mapped is on the other side of the globe),
169                   PCMPXY must return, as a signal that this is the case,
170                   whatever special nonzero value has been given to the
171                   internal parameter ´OR´, so that the calling routine can
172                   take appropriate action (to properly clip the character
173                   being drawn, for example).
174
175                   Note: When IMAP is less than or equal to zero (which cannot
176                   currently happen, but may someday be possible), XOTP and
177                   YOTP are used differently, as shown in the table above.
178

C-BINDING DESCRIPTION

180       The C-binding argument descriptions are the same as the FORTRAN
181       argument descriptions.
182

USAGE

184       This routine is normally not called directly by the user (though it can
185       be). It is called by each of the routines PCHIQU, PCMEQU, and PCLOQU
186       when the user has set the mapping flag ´MA´ nonzero to request mapping
187       of characters from one X/Y coordinate system to another. A call to
188       PCMPXY has the following form:
189
190            CALL PCMPXY (IMAP,XINP,YINP,XOTP,YOTP)
191
192       The default version of PCMPXY does several useful mappings; a user
193       version may be supplied to do others.
194

ACCESS

196       To use PCMPXY or c_pcmpxy, load the NCAR Graphics libraries ncarg,
197       ncarg_gks, and ncarg_c, preferably in that order.
198

SEE ALSO

200       Online: plotchar, pcdlsc, pcgetc, pcgeti, pcgetr, pchiqu, pcloqu,
201       pcmequ, pcpnwi, pcrset, pcsetc, pcseti, pcsetr, ncarg_cbind.
202
203       Hardcopy: NCAR Graphics Fundamentals, UNIX Version
204
206       Copyright (C) 1987-2007
207       University Corporation for Atmospheric Research
208
209       This documentation is free software; you can redistribute it and/or
210       modify it under the terms of the GNU General Public License as
211       published by the Free Software Foundation; either version 2 of the
212       License, or (at your option) any later version.
213
214       This software is distributed in the hope that it will be useful, but
215       WITHOUT ANY WARRANTY; without even the implied warranty of
216       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
217       General Public License for more details.
218
219       You should have received a copy of the GNU General Public License along
220       with this software; if not, write to the Free Software Foundation,
221       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
222
223
224
225UNIX                              August 1993                   PCMPXY(3NCARG)
Impressum