trisurf - Triangular surface plot

Syntax

trisurf(Tri,X,Y,Z)
trisurf(Tri,X,Y,Z,C)
trisurf(...'PropertyName',PropertyValue...)
h = trisurf(...)

Description

trisurf(Tri,X,Y,Z) displays triangles defined in the m-by-3 face matrix Tri as a surface. Each row of Tri defines a single triangular face by indexing into the vectors or matrices that contain the X, Y, and Z vertices.

trisurf(Tri,X,Y,Z,C) specifies color defined by C in the same manner as the surf function. The MATLAB® software performs a linear transformation on this data to obtain colors from the current colormap.

trisurf(...'PropertyName',PropertyValue...) specifies additional patch property names and values for the patch graphics object created by the function.

h = trisurf(...) returns a patch handle.

Example

Create vertex vectors and a face matrix, then create a triangular surface plot.

x = rand(1,50);
y = rand(1,50);
z = peaks(6*x-3,6*x-3);
tri = delaunay(x,y);
trisurf(tri,x,y,z)

See Also

patch, surf, tetramesh, trimesh, triplot, delaunay

Creating Surfaces and Meshes for related functions

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS