<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">My understanding is that numerical problems occur when there are</div>
</div>
triangles with very acute angles.<br>
<br>
For your HardInput.vtp I suspect that the Delaunay filter is having<br>
trouble around the poles.<br>
<br>
I believe there is a note in the documentation that randomizing the<br>
order of input points often helps.<br>
<br>
To play around with that I sent the output of ParaView's sphere source,<br>
to a clean filter with a tolerance, then to the mask points filter in<br>
random mode. This didn't really randomize the points but it more evenly<br>
distributed them. I was then able to run the delaunay filter without the<br>
warning but with far more points than are in the HardInput.vtp.<br>
<br>
I suspect a better (than random) thing to do would be to divide the<br>
points up into regions and add them to the delaunay triangulation in a<br>
sort of round robin by region way.<br>
<br>
</blockquote></div><br></div><div>Hi Kevin,</div><div><br>Thanks for your suggestions.<br><div><br></div><div>I tried to randomize the point order:</div><div><br></div><div><div> //randomize the points</div><div> std::vector<int> v;</div>
<div> </div><div> //add 10 integers (0 to 9)</div><div> for(vtkIdType i = 0; i < reader->GetOutput()->GetNumberOfPoints(); i++)</div><div> {</div><div> v.push_back(i);</div><div> }</div><div> </div>
<div> std::random_shuffle(v.begin(), v.end());</div><div> </div><div> //create a new point set with the points in the randomized order</div><div> vtkSmartPointer<vtkPoints> shuffledPoints =</div><div> vtkSmartPointer<vtkPoints>::New();</div>
<div> for(int i = 0; i < v.size(); i++)</div><div> {</div><div> shuffledPoints->InsertNextPoint(reader->GetOutput()->GetPoint(v[i]));</div><div> }</div><div> </div><div> vtkSmartPointer<vtkPolyData> shuffledPolyData = </div>
<div> vtkSmartPointer<vtkPolyData>::New();</div><div> shuffledPolyData->SetPoints(shuffledPoints);</div><div><br></div><div>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?</div>
<div><br></div><div>I am actually pretty confused why the result still looks fine even though these warnings, which sound more like errors, are displayed?</div><div><br></div>Thanks,<br><br>David</div></div>