|MATLAB Function Reference|
Tetrahedron mesh plot
displays the tetrahedrons defined in the
T as mesh.
T is usually the output of
delaunayn. A row of
T contains indices into
X of the vertices of a tetrahedron.
X is an
n-by-3 matrix, representing
n points in 3 dimension. The tetrahedron colors are defined by the vector
C, which is used as indices into the current colormap.
C = 1:m as the color for the
m tetrahedrons. Each tetrahedron has a different color (modulo the number of colors available in the current colormap).
h = tetramesh(...)
returns a vector of tetrahedron handles. Each element of
h is a handle to the set of patches forming one tetrahedron. You can use these handles to view a particular tetrahedron by turning the patch
allows additional patch property name/property value pairs to be used when displaying the tetrahedrons. For example, the default transparency parameter is set to
0.9. You can overwrite this value by using the property name/property value pair
value is a number between
Patch Properties for information about the available properties.
Generate a 3-dimensional Delaunay tesselation, then use
tetramesh to visualize the tetrahedrons that form the corresponding simplex.
d = [-1 1]; [x,y,z] = meshgrid(d,d,d); % A cube x = [x(:);0]; y = [y(:);0]; z = [z(:);0]; % [x,y,z] are corners of a cube plus the center. X = [x(:) y(:) z(:)]; Tes = delaunayn(X) Tes =
9 1 5 6
3 9 1 5
2 9 1 6
2 3 9 4
2 3 9 1
7 9 5 6
7 3 9 5
8 7 9 6
8 2 9 6
8 2 9 4
8 3 9 4
8 7 3 9tetramesh(Tes,X);camorbit(20,0)