%% 3-D Convex Hull
% Create a matrix of 3-D points and compute the convex hull and its volume.

P = rand(10,3);
[k,vol] = convhulln(P);

% Plot the convex hull.

trisurf(k,P(:,1),P(:,2),P(:,3),'FaceColor','cyan')

% Display the volume of the convex hull.

vol

% Copyright 2019 The MathWorks, Inc.