johnson
johnson

Reputation: 4415

MATLAB: Creating surface from point cloud with Delaunay

In MATLAB, I load the following point cloud:

load tetmesh

This loads X and tet into the workspace. I thus perform a scatterplot, and this is what the result looks like:

scatter3(X(:,1), X(:,2), X(:,3))

blah

I also invoke trisurf in the following fashion, and it gives me:

trisurf(tet, X(:,1), X(:,2), X(:,3))

this

If i don't use tet, and try to build my own connectivity list with Delaunay:

tri = delaunay(X(:,1), X(:,2), X(:,3))
trisurf(tri, X(:,1), X(:,2), X(:,3))

I get this:

blah

This isn't anywhere near the image generated with tet. The tetrahedrons generated also don't fulfill the Delaunay criterion as far as I can tell.

My question is this: Is there a possibility to generate a connectivity list like tet just from X?

Upvotes: 3

Views: 14271

Answers (2)

WDC
WDC

Reputation: 344

Try:

load tetmesh
coeff = 1;
tri = triangulation(boundary(X, coeff), X);
trisurf(tri); colormap(jet);

Three different values of coeff are shown below:

coeff 1 coeff 0.5 coeff 0.1

Upvotes: 1

Darren Engwirda
Darren Engwirda

Reputation: 7015

The Delaunay triangulation of a point-set is guaranteed to fill its convex hull by definition. As such, the output shown is exactly as expected. Additionally, all elements in the tessellation will satisfy the Delaunay 'empty-sphere' criterion.

The process of reconstructing a surface given a set of points is known as surface reconstruction. Such a problem is not typically well-posed, with a variety of non-unique reconstructions typically possible for a given point-set. A number of heuristic approaches have been developed, and a package such a CGAL may be useful to you in this regard.

Upvotes: 4

Related Questions