Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

delaunay3 - 3-D Delaunay tessellation

delaunay3 will be removed in a future release. Use DelaunayTri instead.

Syntax

T = delaunay3(x,y,z)

Description

T = delaunay3(x,y,z) returns an array T, each row of which contains the indices of the points in (x,y,z) that make up a tetrahedron in the tessellation of (x,y,z). T is a numtes-by-4 array where numtes is the number of facets in the tessellation. x, y, and z are vectors of equal length. If the original data points are collinear or x, y, and z define an insufficient number of points, the triangles cannot be computed and delaunay3 returns an empty matrix.

T = delaunay3(x,y,z,options) specifies a cell array of strings options that were previously used by Qhull. Qhull-specific options are no longer required and are currently ignored.

Visualization

Use tetramesh to plot delaunay3 output. tetramesh displays the tetrahedrons defined in T as mesh. tetramesh uses the default transparency parameter value 'FaceAlpha' = 0.9.

Examples

Example 1

This example generates a 3-dimensional Delaunay tessellation, then uses tetramesh to plot the tetrahedrons that form the corresponding simplex. camorbit rotates the camera position to provide a meaningful view of the figure.

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.
Tes = delaunay3(x,y,z)

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   9

X = [x(:) y(:) z(:)];
tetramesh(Tes,X);camorbit(20,0)

See Also

delaunay, delaunayn

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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