[vtkusers] Delaunay3D Unable to factor linear system?
David Doria
daviddoria+vtk at gmail.com
Mon Apr 19 10:12:34 EDT 2010
>
> My understanding is that numerical problems occur when there are
> triangles with very acute angles.
>
> For your HardInput.vtp I suspect that the Delaunay filter is having
> trouble around the poles.
>
> I believe there is a note in the documentation that randomizing the
> order of input points often helps.
>
> To play around with that I sent the output of ParaView's sphere source,
> to a clean filter with a tolerance, then to the mask points filter in
> random mode. This didn't really randomize the points but it more evenly
> distributed them. I was then able to run the delaunay filter without the
> warning but with far more points than are in the HardInput.vtp.
>
> I suspect a better (than random) thing to do would be to divide the
> points up into regions and add them to the delaunay triangulation in a
> sort of round robin by region way.
>
>
Hi Kevin,
Thanks for your suggestions.
I tried to randomize the point order:
//randomize the points
std::vector<int> v;
//add 10 integers (0 to 9)
for(vtkIdType i = 0; i < reader->GetOutput()->GetNumberOfPoints(); i++)
{
v.push_back(i);
}
std::random_shuffle(v.begin(), v.end());
//create a new point set with the points in the randomized order
vtkSmartPointer<vtkPoints> shuffledPoints =
vtkSmartPointer<vtkPoints>::New();
for(int i = 0; i < v.size(); i++)
{
shuffledPoints->InsertNextPoint(reader->GetOutput()->GetPoint(v[i]));
}
vtkSmartPointer<vtkPolyData> shuffledPolyData =
vtkSmartPointer<vtkPolyData>::New();
shuffledPolyData->SetPoints(shuffledPoints);
but the warnings still occur. I don't understand how the round robin region
adding would be better than this randomized point insertion - is it just
that then you are guaranteed not to insert two points that are close
together?
I am actually pretty confused why the result still looks fine even though
these warnings, which sound more like errors, are displayed?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100419/039569ec/attachment.htm>
More information about the vtkusers
mailing list