next up previous contents index
Next: Get Viewer's Coordinates: get3_xy Up: Useful Functions for Developers Previous: Get Normals to Polygon   Contents   Index


Get Centroids of Polygon Set: get3_centroid

Calling Sequence
...
  
get3_centroid(xyz [, nxyz])
Description
Return 3D centroids for polygons with vertices XYZ. If NXYZ is specified, XYZ should be sum(nxyz)-by-3, with NXYZ being the list of numbers of vertices for each polygon (as for the plfp function; see page [*]). If NXYZ is not specified, XYZ should be a quadrilateral mesh, ni-by-nj-by-3 (as for the plf function; see page [*]). In the first case, the return value is len(NXYZ) in length; in the second case, the return value is (ni-1)-by-(nj-1)-by-3.

The centroids are constructed as the mean value of all vertices of each polygon.



Michiel Jan Laurens de Hoon 2003-04-19