1SRFACE(3NCARG) NCAR GRAPHICS SRFACE(3NCARG)
2
3
4
6 SRFACE - Draws a perspective picture of a function of two variables
7 with hidden lines removed. The function is approximated by a two-
8 dimensional array of heights.
9
11 CALL SRFACE (X,Y,Z,M,MX,NX,NY,S,STEREO)
12
14 #include <ncarg/ncargC.h>
15
16 void c_srface (float *x, float *y, float *z, int *m,
17 int mx, int nx, int ny, float s[6], float stereo)
18
20 X A linear array NX long containing the X coordinates of the
21 points in the surface approximation. See "USAGE" below.
22
23 Y The linear array NY long containing the Y coordinates of
24 the points in the surface approximation. See "USAGE"
25 below.
26
27 Z An array MX by NY containing the surface to be drawn in NX
28 by NY cells. Z(I,J) = F(X(I),Y(J)). See "USAGE" below.
29
30 M Scratch array at least 2*NX*NY words long.
31
32 MX First dimension of Z.
33
34 NX Number of data values in the X direction (the first
35 subscript direction) in Z to be plotted. When plotting an
36 entire array, MX=NX.
37
38 NY Number of data values in the Y direction (the second
39 subscript direction) to be plotted.
40
41 S S defines the line of sight. The viewer's eye is at (S(1),
42 S(2), S(3)) and the point looked at is at (S(4), S(5),
43 S(6)). The eye should be outside the block with opposite
44 corners (X(1), Y(1), ZMIN) and (X(NX), Y(NY), ZMAX) and the
45 point looked at should be inside it. For a nice perspective
46 effect, the distance between the eye and the point looked
47 at should be 5 to 10 times the size of the block.
48
49 STEREO Flag to indicate if stereo pairs are to be drawn. 0.0
50 means no stereo pair (one picture). Non-zero means put out
51 two pictures. The value of STEREO is the relative angle
52 between the eyes. A value of 1.0 produces standard
53 separation. Negative STEREO reverses the left and right
54 figures.
55
57 The C-binding argument descriptions are the same as the FORTRAN
58 argument descriptions, with the following exceptions:
59
60
61 z An array ny by mx.
62
63 mx Second dimension of z.
64
65 nx Number of data values in the y direction (the second
66 subscript direction) in z to be plotted. When plotting an
67 entire array, mx=nx.
68
69 ny Number of data values in the x direction (the first
70 subscript direction) to be plotted.
71
73 · The range of Z compared with the range of X and Y determines the
74 shape of the picture. They are assumed to be in the same units and
75 not wildly different in magnitude. S is assumed to be in the same
76 units as X, Y, and Z.
77
78
79 · Picture size can be made relative to distance.
80
81
82 · TRN32S can be used to translate from 3 space to 2 space.
83
84
85 · Data with extreme discontinuities may cause visibility errors. If
86 this problem occurs, use a distant eye position away from the +Z
87 axis.
88
89
90 · The default line color is set to color index 1. If the user wishes to
91 change the line color, he can do so by defining color index 1 before
92 calling SRFACE, or by putting the common block SRFINT in his calling
93 program and defining and using color index ISRFMJ (defaulted to 1 in
94 BLOCKDATA).
95
97 Use the ncargex command to see the following relevant examples: srex01,
98 tpwrzs, tsrfac, fsrpwrzs, fsrsrfac.
99
101 To use SRFACE or c_srface, load the NCAR Graphics libraries ncarg,
102 ncarg_gks, and ncarg_c, preferably in that order.
103
105 Online: surface, surface_params, ezsrfc, pwrzs, setr, ncarg_cbind.
106
107 Hardcopy: NCAR Graphics Fundamentals, UNIX Version
108
110 Copyright (C) 1987-2009
111 University Corporation for Atmospheric Research
112 The use of this Software is governed by a License Agreement.
113
114
115
116UNIX March 1993 SRFACE(3NCARG)