next up previous contents index
Next: slice3: Plane and Isosurface Up: The Slicing Functions Previous: The Slicing Functions   Contents   Index


slice3mesh: Pseudo-slice for a surface

The function slice3mesh is designed specifically to produce an input argument for pl3surf, although if you want more than one surface in a picture, it can also be fed to pl3tree. It has several distinct calling sequences, which Python can distinguish with its type savvy.

Calling Sequence
...
slice3mesh (z [, color])

Description
z is a two dimensional array of function values, assumed to be on a uniform mesh nx by ny cells (assuming z is nx by ny) nx being the number of cells in the x direction, ny the number in the y direction. color, if specified, is either an nx by ny array of cell-centered values by which the surface is to be colored, or an nx+1 by ny+1 array of vertex-centered values, which will be averaged over each cell to give cell-centered values.

Calling Sequence
...
slice3mesh (nxny, dxdy, x0y0, z [, color])

Description
In this case, slice3mesh accepts the specification for a regular 2D mesh: nxny is the number of cells in the x direction and the y direction; x0y0 are the initial values of x and y; and dxdy are the increments in the two directions. z is the height of a surface above the xy plane and must be dimensioned nx + 1 by ny + 1. color, if specified, is as above.

Calling Sequence
...
slice3mesh (x, y, z [, color])

Description
z is as above, an nx by ny array of function values on a mesh of the same dimensions. There are two choices for x and y: they can both be one-dimensional, dimensioned nx and ny respectively, in which case they represent a mesh whose edges are parallel to the axes; or else they can both be nx by ny, in which case they represent a general quadrilateral mesh.


next up previous contents index
Next: slice3: Plane and Isosurface Up: The Slicing Functions Previous: The Slicing Functions   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19