ncl_srface - Man Page

Draws a perspective picture of a function of two variables with hidden lines removed. The function is approximated by a two-dimensional array of heights.

Synopsis

CALL SRFACE (X,Y,Z,M,MX,NX,NY,S,STEREO)

C-Binding Synopsis

#include <ncarg/ncargC.h>

void c_srface (float *x, float *y, float *z, int *m,
int mx, int nx, int ny, float s[6], float stereo)

Description

X

A linear array NX long containing the X coordinates of the points in the surface approximation.  See "Usage" below.

Y

The linear array NY long containing the Y coordinates of the points in the surface approximation.  See "Usage" below.

Z

An array MX by NY containing the surface to be drawn in NX by NY cells. Z(I,J) = F(X(I),Y(J)).  See "Usage" below.

M

Scratch array at least 2*NX*NY words long.

MX

First dimension of Z.

NX

Number of data values in the X direction (the first subscript direction) in Z to be plotted.  When plotting an entire array, MX=NX.

NY

Number of data values in the Y direction (the second subscript direction) to be plotted.

S

S defines the line of sight. The viewer's eye is at (S(1), S(2), S(3)) and the point looked at is at (S(4), S(5), S(6)). The eye should be outside the block with opposite corners (X(1), Y(1), ZMIN) and (X(NX), Y(NY), ZMAX) and the point looked at should be inside it. For a nice perspective effect, the distance between the eye and the point looked at should be 5 to 10 times the size of the block.

STEREO

Flag to indicate if stereo pairs are to be drawn.  0.0 means no stereo pair (one picture). Non-zero means put out two pictures. The value of STEREO is the relative angle between the eyes. A value of 1.0 produces standard separation. Negative STEREO reverses the left and right figures.

C-Binding Description

The C-binding argument descriptions are the same as the FORTRAN  argument descriptions, with the following exceptions:

z

An array ny by mx.

mx

Second dimension of z.

nx

Number of data values in the y direction (the second subscript direction) in z to be plotted.  When plotting an entire array, mx=nx.

ny

Number of data values in the x direction (the first subscript direction) to be plotted.

Usage

Examples

Use the ncargex command to see the following relevant examples:  srex01, tpwrzs, tsrfac, fsrpwrzs, fsrsrfac.

Access

To use SRFACE or c_srface, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.  

See Also

Online: surface, surface_params, ezsrfc, pwrzs, setr, ncarg_cbind.

Hardcopy: NCAR Graphics Fundamentals, UNIX Version

Info

March 1993 UNIX NCAR GRAPHICS