title: MATLAB: Creating surface from point cloud with Delaunay
body: <p>In MATLAB, I load the following point cloud:</p>
  
  <pre><code>load tetmesh
  </code></pre>
  
  <p>This loads <code>X</code> and <code>tet</code> into the workspace.  I thus perform a scatterplot, and this is what the result looks like:</p>
  
  <pre><code>scatter3(X(:,1), X(:,2), X(:,3))
  </code></pre>
  
  <p><img src="https://i.imgur.com/fiw9t6X.png" alt="blah"></p>
  
  <p>I also invoke <code>trisurf</code> in the following fashion, and it gives me:</p>
  
  <pre><code>trisurf(tet, X(:,1), X(:,2), X(:,3))
  </code></pre>
  
  <p><img src="https://i.imgur.com/nXlYWXd.png" alt="this"></p>
  
  <p>If i don't use <code>tet</code>, and try to build my own connectivity list with Delaunay:</p>
  
  <pre><code>tri = delaunay(X(:,1), X(:,2), X(:,3))
  trisurf(tri, X(:,1), X(:,2), X(:,3))
  </code></pre>
  
  <p>I get this:</p>
  
  <p><img src="https://i.imgur.com/tdo5wjg.png" alt="blah"></p>
  
  <p>This isn't anywhere near the image generated with <code>tet</code>. The tetrahedrons generated also don't fulfill the Delaunay criterion as far as I can tell.</p>
  
  <p>My question is this: Is there a possibility to generate a connectivity list like <code>tet</code> just from <code>X</code>?</p>