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

NAME

6       FX - Given the X and Y coordinates of a point in the grid coordinate
7       system, the function FX returns the X coordinate of the point in user
8       coordinate space.
9
10       FY - Given the X and Y coordinates of a point in the grid coordinate
11       system, the function FY returns the Y coordinate of the point in user
12       coordinate space.
13

STATUS

15       FX and FY are obsolete, and are supported only to provide compatibility
16       with old NCAR Graphics codes. These functions are internally callable
17       from four NCAR Graphics utilities -- the Conrec and Conran families,
18       and Vectors and Streamlines. Since the Conpack utility has replaced
19       Conrec and Conran for the most part, little needs to be said about the
20       use of FX and FY in those utilities.
21
22       For Vectors and Streamlines, however, these routines have been required
23       in order to perform custom mappings of the data coordinate space until
24       Version 3.2, when new mapping routine were developed to deal more
25       robustly with non-linear transformations of vector components. In order
26       to ease the transition for users of the old packages who depend on
27       existing custom mappings using FX and FX, however, both utilities have
28       implemented a number of compatibility levels. By modifying the
29       compatibility mode parameter, CPM, you can choose to map coordinates
30       either using the old FX and FY routines, or using the new Version 3.2
31       routines.
32
33       If you need to create new custom coordinate space mappings, you should
34       use the new mapping methods and not use FX and FY, since the internal
35       support for mappings based on these functions is frozen at the present
36       level. Any improvements in the code will be directed towards users of
37       the new mapping routines only.
38

SYNOPSIS

40       USERX = FX (X,Y)
41       USERY = FY (X,Y)
42

DESCRIPTION

44       X           (REAL, input): The X coordinate of a vector location in the
45                   grid coordinate system.
46
47       Y           (REAL, input) The Y coordinate of a vector location in the
48                   grid coordinate system.
49

USAGE

51       The user does not invoke the functions, FX and FY, directly. Instead
52       the functions are invoked internally by an NCAR Graphics utility in
53       order to convert a position in the grid coordinate system into user
54       coordinates. By default, calls to any of the primary entry points for
55       Vectors and Streamlines utilities that predate Version 3.2 (that is,
56       EZVEC, VELVEC, VELVCT, EZSTRM or STRMLN) use FX and FY to map from grid
57       to user coordinates. However, by appropriately setting the
58       compatibility mode parameter, CPM, the user can choose whether the FX
59       and FY functions or the new mapping routines are invoked when using any
60       of the primary entry points, current or obsolete, supported by Vectors
61       and Streamlines.
62
63       Unlike the Version 3.2 mapping routines, whose input coordinates are in
64       the data coordinate system, FX and FY take input in the grid coordinate
65       system. Therefore, any required conversions into the data coordinate
66       system must be performed within the function prior to the mapping into
67       user coordinates. Vectors and Streamlines both provide common blocks
68       (VVMAP and STMAP, respectively) that may be included by the FX and FY
69       functions to supply the information necessary to perform the conversion
70       into data coordinate space. No pre-defined mappings are supported using
71       FX and FY. The default versions of these functions simply perform an
72       identity mapping from grid to user coordinate space.
73
74       When Vectors employs FX and FY, it (alone) also requires the use of two
75       other functions, called MXF and MYF. Their usage is described below:
76

NAME

78       MXF - MXF is a user modifiable function that, given one end point of a
79       vector in both grid and metacode coordinates, returns the X coordinate
80       of the other end of the vector in metacode coordinates.
81
82       MYF - MYF is a user modifiable function that, given one end point of a
83       vector in both grid and metacode coordinates, returns the Y coordinate
84       of the other end of the vector in metacode coordinates.
85

STATUS

87       Like FX and FY, MXF and MYF are obsolete and should not be employed
88       when creating new custom mapping code.
89

SYNOPSIS

91       METAX = MXF (X,Y,U,V,SFX,SFY,MX,MY)
92       METAY = MYF (X,Y,U,V,SFX,SFY,MX,MY)
93

DESCRIPTION

95       X           (REAL, input): The X coordinate of a vector location in the
96                   grid coordinate system.
97
98       Y           (REAL, input) The Y coordinate of a vector location in the
99                   grid coordinate system.
100
101       U           (REAL, input) The U component of the vector at the data
102                   point specified by arguments X and Y.
103
104       V           (REAL, input) The V component of the vector at the data
105                   point specified by arguments X and Y.
106
107       SFX         (REAL, input) Scale factor used to convert the vector
108                   magnitude to a length in metacode coordinates.
109
110       SFY         (REAL, input) Scale factor used to convert the vector
111                   magnitude to a length in metacode coordinates. In the
112                   current implementation this value is the same as the value
113                   of SFX.
114
115       MX          (INTEGER, input) X coordinate of the vector location in
116                   metacode coordinates.
117
118       MX          (INTEGER, input) Y coordinate of the vector location in
119                   metacode coordinates.
120

USAGE

122       The user does not invoke the functions, MXF and MYF, directly.
123       However, any time the Vectors utility is accessed with the
124       compatibility mode parameter set such that the FX and FY routines are
125       used to map the first endpoint of the vector, the functions MXF and MYF
126       are used to determine the second endpoint.  First FX and FY are invoked
127       to determine the vector location in user coordinates, then this point
128       is converted into metacode coordinates; MXF and MYF are passed the
129       coordinates of the point both in grid space and in metacode space,
130       along with the vector components and a scale factor used to convert the
131       vector magnitude into a length in the metacode coordinate system.
132
133       The default version of MXF simply multiplies the U component of the
134       vector (the component parallel to the X grid axis) by the scale factor,
135       SFX, and adds it to the X coordinate of the first point in metacode
136       coordinates, MX. MYF uses the same scale factor, SFX, but multiplies by
137       the V component and adds to the Y coordinate in metacode coordinates.
138       These values are respectively returned as the function value by each
139       routine. Note that if a mapping is anywhere non-linear, the vector
140       directional angle may change across the transformation, and an
141       iterative differential technique must be employed to map the second
142       endpoint of the vector. When creating a new mapping, the user is
143       strongly urged to use the user-modifiable routine VVUMXY, rather than
144       attempting to work with MXF and MYF.
145

ACCESS

147       To use FX, FY, MXF, and MYF load the NCAR Graphics libraries ncarg,
148       ncarg_gks, and ncarg_c, preferably in that order.
149

SEE ALSO

151       Online: vectors, streamlines, vectors_params, streamlines_params,
152       vvumxy, stuixy, stumta, stumxy.
153
155       Copyright (C) 1987-2007
156       University Corporation for Atmospheric Research
157
158       This documentation is free software; you can redistribute it and/or
159       modify it under the terms of the GNU General Public License as
160       published by the Free Software Foundation; either version 2 of the
161       License, or (at your option) any later version.
162
163       This software is distributed in the hope that it will be useful, but
164       WITHOUT ANY WARRANTY; without even the implied warranty of
165       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
166       General Public License for more details.
167
168       You should have received a copy of the GNU General Public License along
169       with this software; if not, write to the Free Software Foundation,
170       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
171
172
173
174UNIX                              April 1993                        FX(3NCARG)
Impressum