RegionCentroid

RegionCentroid[reg]

gives the centroid of the region reg.

Details and Options

  • RegionCentroid is also known as center of mass, center of gravity, or barycenter.
  • The centroid is effectively given by Integrate[{x1,,xn},{x1,,xn}reg]/RegionMeasure[reg].
  • The centroid is in the region when the region is convex. Otherwise it is typically not in the region.
  • Examples of cases where rows correspond to embedding dimension and columns to geometric dimension:
  • If the region reg consists of a finite number of points, the RegionCentroid gives the mean.
  • A region with infinite RegionMeasure has no RegionCentroid and returns a point with Indeterminate coordinates.
  • RegionCentroid takes an Assumptions option that can be used to specify assumptions on parameters.

Examples

open allclose all

Basic Examples  (2)

Find the centroid of a region:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

The centroid of a Polygon:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Scope  (19)

Applications  (5)

Properties & Relations  (3)

See Also

RegionMeasure  Integrate  Mean  Expectation

Introduced in 2014
(10.0)