[vtkusers] VtkDelaunay2d Problem
Godofredo
godofredoiii at gmail.com
Thu May 24 03:06:00 EDT 2007
Hi. As I see from your images you seem to be interested in obtaining the
surface of a volume. In that case you should use Delaunay3D. The Delaunay2D
triangulation projects all points on the XY plane (which you can change to
another 2D plane by applying a transform in Delaunay2D filter) so if there
are coincident points in the projection on the XY plane, or points that lie
inside of triangles you want to create it would make poor results (due to
Delaunay algorithm conditions).
You could still use Delaunay2D to make the triangulation of your data but
you would need to do at least two Delaunay2D calls with two transformations
just to make sure that the points projection in XY plane don't have
coincident points or points that lie inside triangles you want to create.
And then you should join those two triangulations. So I really think
vtkDelaunay3D would be a better solution. Hope this helps.
Secolas UA wrote:
>
> Hello All
>
> I want to define a new triangulation for a polydata model, I've tried
> vtkDelaunay2d but the new triangulation is quite wierd!
> Is it possible to make a new triangle mesh? I'll add the code and two
> images, one of the polydata and other of the delaunay model.
> Can anyone help me?
>
> Thanks in Advance
> Ricardo Seco
>
> vtkDelaunay2D *newMesh = vtkDelaunay2D::New();
> vtkPoints *newPoints = vtkPoints::New();
> vtkPolyData *newPoly = vtkPolyData::New();
> newPoints = polyData->GetPoints();
> newPoly->SetPoints(newPoints);
> newMesh->SetInput(newPoly);
> newMesh->Update();
>
> vtkPolyDataMapper *meshMapper = vtkPolyDataMapper::New();
> meshMapper->SetInput(newMesh->GetOutput());
> vtkActor *meshActor = vtkActor::New();
> meshActor->SetMapper(meshMapper);
>
> // Nova janela para rendering
> vtkRenderer *ren3 = vtkRenderer::New();
> vtkRenderWindow *renWin3 = vtkRenderWindow::New();
>
> renWin3->AddRenderer(ren3);
> ren3->SetBackground(1,1,1);
> ren3->AddActor(meshActor);
> renWin3->Render();
>
> vtkRenderWindowInteractor *iren3=vtkRenderWindowInteractor::New();
> iren3->SetRenderWindow(renWin3);
> }
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://www.nabble.com/VtkDelaunay2d-Problem-tf3806911.html#a10778602
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list