trisurf¶

steno3d.
trisurf
(...)¶
Create and plot a triangulated Steno3D Surface resource
steno3d.trisurf(triangles, X, Y, Z)
creates a Steno3D Project with a
Surface resource of triangulated faces. The surface is defined by
triangles
, n x 3 matrix of vertex indices, and X
, Y
, and Z
, equalsized
vectors of vertex coordinates.
steno3d.trisurf(triangles, vertices)
creates a Steno3D Project with a
Surface resource defined by triangles
, n x 3 matrix of vertex indices,
and vertices
, m x 3 matrix of spatial coordinates.
steno3d.trisurf(..., color)
creates a Surface resource of the given
color, where color
is a 1x3 RGB color, hex color string, named color
string, or ‘random’.
steno3d.trisurf(..., title1, data1, ..., titleN, dataN)
adds any number
of titled datasets to the Surface resource. title
must be a string and
data
must be an n x 1 or an m x 1 vector, where n is the number of
triangles and m is the number of vertices. If m == n, the data location
will default to triangles (to override this see steno3d.addData()
).
steno3d.trisurf(project, ...)
adds the Surface resource to project
, an
existing Steno3D Project. project
may also be a figure or axes handle
that was created by a Steno3D plotting function.
project = steno3d.trisurf(...)
returns project
, the Steno3D Project that
contains the new Surface resource.
[project, SURFACE] = steno3d.trisurf(...)
returns project
, the Steno3D
Project, and SURFACE
, the new Surface resource.
steno3d.trisurf
is useful in conjunction with MATLAB triangulation
functions like convhull. Unlike the MATLAB builtin trisurf,
steno3d.trisurf
does not currently support triangulation objects, nor
does it support any additional property/value pairs. After creating a
Surface resource with steno3d.trisurf
, properties of the Surface object
can be directly modified.
Example:
x = [0 1 0 0]; y = [0 0 1 0]; z = [0 0 0 1];
tris = convhull(x, y, z);
[myProject, mySurface] = steno3d.trisurf( ...
tris, x, y, z, 'r', 'Face Data', rand(4, 1) ...
);
mySurface.Title = 'Triangulated Surface';
mySurface.Description = 'Convex hull triangles';
myProject.Title = 'Project with one Surface';
myProject.Public = true;
steno3d.upload(myProject);
See more EXAMPLES
See also steno3d.core.Surface, steno3d.upload, steno3d.addData, steno3d.addImage, steno3d.core.Project