`plfsurf3d`: Plot shaded 3-d surface plot
Prev | Chapter 18. The Specialized C/C++ API for PLplot | Next

#### `plfsurf3d`: Plot shaded 3-d surface plot

`plfsurf3d (` | x ,
| y ,
| zops ,
| zp ,
| nx ,
| ny ,
| opt ,
| clevel ,
| nlevel `)`;

Plots a three-dimensional shaded surface plot within the environment set up by `plw3d`. The surface is defined by the two-dimensional function data accessed via the ``zp`` generic pointer argument. How the data in ``zp`` is formatted is determined by the ``zops`` pointer to a struct containing the "get" function that reads that data. The following functions in PLplot core will return an appropriate function pointer: `plf2ops_c()` should be used when ``zp`` is of type `PLFLT_MATRIX` and `plf2ops_grid_c()`, `plf2ops_grid_row_major()`, and `plf2ops_grid_col_major()` should be used when the matrix of two-dimensional function data are organized within a `PLfGrid2` structure as respectively two-dimensional row-major data, one-dimensional row-major data, and one-dimensional column-major data. The ``nx``, ``ny`` ``opt`` ``clevel`` and ``nlevel`` parameters are used in the same way as `plsurf3d`.

`x` (``PLFLT_VECTOR``, input)

  A vector containing the x coordinates at which the function is evaluated.

`y` (``PLFLT_VECTOR``, input)

  A vector containing the y coordinates at which the function is evaluated.

`zops` (``PLF2OPS``, input)

  Pointer to a `plf2ops_t` struct that contains (amongst other function pointers) a pointer to a "get" function that is used to evaluate the 2D function data required by plfsurf3d.

`zp` (``PLPointer``, input)

  Pointer to the two-dimensional function data in the format required by the "get" function that is (indirectly) pointed to by `zops`. The various possibilities have been discussed above, and examples of such use are given in `examples/c/x08c.c`.

`nx` (``PLINT``, input)

  Number of ``x`` values at which function is evaluated.

`ny` (``PLINT``, input)

  Number of ``y`` values at which function is evaluated.

`opt` (``PLINT``, input)

  Determines the way in which the surface is represented. To specify more than one option just add the options, e.g. FACETED + SURF_CONT

  - ``opt`=FACETED` : Network of lines is drawn connecting points at which function is defined.

  - ``opt`=BASE_CONT` : A contour plot is drawn at the base XY plane using parameters `nlevel` and `clevel`.

  - ``opt`=SURF_CONT` : A contour plot is drawn at the surface plane using parameters `nlevel` and `clevel`.

  - ``opt`=DRAW_SIDES` : draws a curtain between the base XY plane and the borders of the plotted function.

  - ``opt`=MAG_COLOR` : the surface is colored according to the value of Z; if `MAG_COLOR` is not used, then the surface is colored according to the intensity of the reflected light in the surface from a light source whose position is set using `pllightsource`.

`clevel` (``PLFLT_VECTOR``, input)

  A vector containing the contour levels.

`nlevel` (``PLINT``, input)

  Number of elements in the `clevel` vector.

This function is optionally used in C example 8.

Prev | Up | Next
`plFree2dGrid`: Free the memory associated with a PLFLT matrix allocated using `plAlloc2dGrid` | Home | `plgfile`: Get output file handle