<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"><<a href="mailto:abhishek@meddiff.com" target="_blank">abhishek@meddiff.com</a>></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 <<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>><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<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();<br>
polydata->SetPoints(orgPoints);<br>
<br>
// create geometry.<br>
vtkSmartPointer<vtkVertexGlyphFilter> glyphFilter =<br>
vtkSmartPointer<vtkVertexGlyphFilter>::New();<br>
glyphFilter->SetInputConnection(polydata->GetProducerPort());<br>
glyphFilter->Update();<br>
glyphFilter->GetOutput()->Print(cout);<br>
<br>
<br>
<br>
//delunay<br>
// Create the convex hull of the pointcloud<br>
vtkSmartPointer<vtkDelaunay2D> delaunay = vtkSmartPointer< vtkDelaunay2D<br>
>::New();<br>
delaunay->SetInput(glyphFilter->GetOutput());<br>
delaunay->SetTolerance(0.01);<br>
delaunay->Update();<br>
<br>
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceFilter =<br>
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();<br>
surfaceFilter->SetInputConnection(delaunay->GetOutputPort());<br>
surfaceFilter->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>