[vtkusers] Centroid of a surface

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Mon Nov 15 15:21:15 EST 2004





Dr Zeto <dr_zeato at yahoo.com> wrote on 13/11/2004 07:09:52:

> Hi,
> I want to compute the centroid of a closed surface.
> Apparently, the mean of the vertices of the
> triangulated mesh does not work. For instance, if the
> surface is that of a horse, we have more triangles
> around the legs and the face, where we need more
> detail. While the rest of the torso has significantly
> fewer triangles. Hence, the centroid computed from the
> above method is biased towards the legs and the face.
>
> Is there a class to remesh the surface, so that the
> size of triangles is the same or about the same
> everywhere? Or how can I approach this problem?

Mathematically: there may be a smarter way (check the literature)... but
can you use lengths of edges connected to each point to weight the centroid
calculation? Or should it be triangle areas?

Using vtk filters:
vtkSmoothPolyDataFilter will adjust cell sizes, but may well degrade the
surface too much to be useful. Perhaps this is what you want? If you really
smooth heavily you could just about erase all features (legs, face) to get
a torso-blob. The centroid of that blob might correspond to a more
'intuitive' centroid for the original surface?!
You could use vtkImplicitModeller (offset=0?), vtkSampleFunction,
vtkContourFilter, to 're-mesh' the surface, (what a hack!) hopefully
getting more equal triangle sizes. This will be slow, and there will still
be unequal triangle sizes, but more 'randomly' distributed over the
surface. You could smooth this. Sounds bizarre, but might work!

  Dave P

> Thanks
> Zeato
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: &lt;http://www.vtk.
> org/Wiki/VTK_FAQ&gt;
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list