Simple example using DelaunayTri. First create a set of points
N = 1000;
theta = 2*pi*rand(N, 1);
phi = acos(2*rand(N, 1) - 1);
x = cos(theta).*sin(phi);
y = sin(theta).*sin(phi);
z = cos(phi);
Mesh the volume using DelaunayTri
Tfull = DelaunayTri(x, y, z);
Find the triangulation on the boundary using freeBoundary
[T, X] = Tfull.freeBoundary();
trisurf(T, X(:, 1), X(:, 2), X(:, 3))
axis equal
Best Answer