# python example code for vtkPolygon.ComputeCentroid

**URL:** https://discourse.vtk.org/t/python-example-code-for-vtkpolygon-computecentroid/7655
**Category:** Support
**Created:** [January 17, 2022, 11:30am UTC](https://discourse.vtk.org/t/python-example-code-for-vtkpolygon-computecentroid/7655 "2022-01-17T11:30:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dgg820502](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@Dgg820502](https://discourse.vtk.org/u/Dgg820502)
#### Post date: [January 17, 2022, 11:30am UTC](https://discourse.vtk.org/t/python-example-code-for-vtkpolygon-computecentroid/7655/1 "2022-01-17T11:30:41Z")

</div>

I try to get the Centroid data for a input polydata figure.

Please let me know if there is python code for realizing my idea?

Many thanks in advance.

David.
