<div dir="ltr"><div><div><div>I do not think you can unless you can manually specify connections.<br></div>vtkDelaunay will create a convex polygon.<br></div>This is unique.<br><br></div><div>Points inside means that original polygon was not convex an there is multiple possible solution.<br>
<br></div><div>Just look at the points below<br><br> *              *<br></div><div>        *<br><br>*              *<br><br></div><div>There are at least 4 different  polygons you can create depending on how you connect internal point.<br>
</div><div><br><br></div><div>Regards,<br></div><div>    Alex<br></div><div></div><div><br></div><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 26, 2013 at 1:22 AM, abhishek <span dir="ltr">&lt;<a href="mailto:abhishek@meddiff.com" target="_blank">abhishek@meddiff.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello user,<br>
<br>
I want to create a surface from a group of unorganized 2-D points.<br>
<br>
As seen in the attached figure, I am able to generate a surface but some<br>
points(in red) are inside the surface.<br>
<br>
surface.png &lt;<a href="http://vtk.1045678.n5.nabble.com/file/n5722255/surface.png" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5722255/surface.png</a>&gt;<br>
<br>
How can I create surface such that all points lie on the edge and not<br>
inside?<br>
<br>
This is what my code looks like:<br>
// Add the grid points to a polydata object<br>
vtkSmartPointer&lt;vtkPolyData&gt; polydata = vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>
polydata-&gt;SetPoints(orgPoints);<br>
<br>
// create geometry.<br>
vtkSmartPointer&lt;vtkVertexGlyphFilter&gt; glyphFilter =<br>
vtkSmartPointer&lt;vtkVertexGlyphFilter&gt;::New();<br>
glyphFilter-&gt;SetInputConnection(polydata-&gt;GetProducerPort());<br>
glyphFilter-&gt;Update();<br>
glyphFilter-&gt;GetOutput()-&gt;Print(cout);<br>
<br>
<br>
<br>
//delunay<br>
// Create the convex hull of the pointcloud<br>
vtkSmartPointer&lt;vtkDelaunay2D&gt; delaunay = vtkSmartPointer&lt; vtkDelaunay2D<br>
&gt;::New();<br>
delaunay-&gt;SetInput(glyphFilter-&gt;GetOutput());<br>
delaunay-&gt;SetTolerance(0.01);<br>
delaunay-&gt;Update();<br>
<br>
vtkSmartPointer&lt;vtkDataSetSurfaceFilter&gt; surfaceFilter =<br>
vtkSmartPointer&lt;vtkDataSetSurfaceFilter&gt;::New();<br>
surfaceFilter-&gt;SetInputConnection(delaunay-&gt;GetOutputPort());<br>
surfaceFilter-&gt;Update();<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-create-a-surface-from-a-group-of-unorganized-2-D-points-tp5722255.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-create-a-surface-from-a-group-of-unorganized-2-D-points-tp5722255.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>