RegionMoment[reg,{i1,i2,…,in}]
computes the polynomial moment
for the region reg.
RegionMoment
RegionMoment[reg,{i1,i2,…,in}]
computes the polynomial moment
for the region reg.
Details and Options
- RegionMoment takes an Assumptions option that can used to specify assumptions on parameters.
Examples
open all close allBasic Examples (2)
Find the polynomial moment
over a ball:
RegionMoment[Ball[], {2, 2, 4}]Find same moment with parameters in the region:
RegionMoment[Ball[{0, 0, 0}, r], {2, 2, 4}]Find the moments of different powers:
Table[RegionMoment[Disk[], {n, n}], {n, 0, 10}]Scope (12)
Special Regions (1)
Formula Regions (2)
Moment of a disk represented as an ImplicitRegion:
RegionMoment[ImplicitRegion[x^2 + y^2 ≤ 1, {x, y}], {2, 2}]RegionMoment[ImplicitRegion[x^2 + y^2 ≤ 1, {x, y, {z, 0, 2}}], {0, 2, 4}]The moment of a disk represented as a ParametricRegion:
RegionMoment[ParametricRegion[{r Cos[θ], r Sin[θ]}, {{r, 0, 1}, {θ, 0, 2π}}], {2, 2}]Using a rational parametrization of a disk:
RegionMoment[ParametricRegion[{r(1 - t^2/1 + t^2), r(2t/1 + t^2)}, {t, {r, 0, 1}}], {2, 2}]RegionMoment[ParametricRegion[{r Cos[θ], r Sin[θ], z}, {{r, 0, 1}, {θ, 0, 2π}, {z, 0, 2}}], {0, 2, 4}]Mesh Regions (2)
Moment of a MeshRegion in 2D:
reg = DelaunayMesh[RandomReal[1, {10, 2}]]RegionMoment[reg, {1, 2}]reg = MeshRegion[{{0, 0}, {1, 0}, {2, -1}, {2, 1}}, {Line[{{1, 2, 3, 4, 2}}]}]RegionMoment[reg, {1, 2}]reg = DelaunayMesh[RandomReal[1, {20, 3}]]RegionMoment[reg, {1, 2, 3}]The moment of a BoundaryMeshRegion:
reg = ConvexHullMesh[RandomReal[1, {10, 2}]]RegionMoment[reg, {1, 2}]reg = ConvexHullMesh[RandomReal[1, {30, 3}]]RegionMoment[reg, {1, 2, 3}]Derived Regions (3)
Moment of a RegionIntersection:
reg = RegionIntersection[Disk[{0, 0}, 1], Disk[{0, 1}, 1]];Region[reg]RegionMoment[reg, {0, 0}]Moment of a TransformedRegion:
reg = TransformedRegion[Disk[{0, 0}, 1], ShearingTransform[Pi / 3, {1, 0}, {0, 1}]];Region[reg]RegionMoment[reg, {0, 2}]The moment of a RegionBoundary:
reg = RegionBoundary[Simplex[2]];Region[reg]RegionMoment[reg, {1, 2}]Geographic Regions (2)
The moment of a polygon with GeoPosition:
ℛ = Polygon[GeoPosition[{{{40.083441, -88.235716}, {40.083607, -88.257488}, {40.082603, -88.257149},
{40.076136999999996, -88.25740499999999}, {40.076178, -88.270888}, {40.076516, -88.271558},
{40.083686, -88.271512}, {40.083659999999995, -88.267046}, ... 33323}, {40.098112, -88.228687},
{40.095216, -88.228627}, {40.095179, -88.238547}, {40.094480999999995, -88.238546},
{40.094508999999995, -88.23267}, {40.094106, -88.232556}, {40.090666999999996, -88.232477},
{40.090741, -88.235745}}}]];RegionMoment[ℛ, {1, 2, 3}]The moment of a polygon with GeoGridPosition:
ℛ = Polygon[GeoGridPosition[{{{-0.9950503945490105, 1.2366760550756015},
{-0.9952074890903578, 1.2369207053693891}, {-0.9952196732768064, 1.2369073327446167},
{-0.9953160063787643, 1.236848436956935}, {-0.9954141759436825, 1.2369993898475449},
{-0. ... 197645333103}, {-0.9949098578570917, 1.2368130881428654},
{-0.9948663952535768, 1.2367477711687371}, {-0.9948714472169538, 1.2367426500757825},
{-0.9949211061652593, 1.2367089232486177}, {-0.9949439717990124, 1.236746107097628}}}, "Bonne"]];RegionMoment[ℛ, {1, 2}]CSG Regions (1)
The moment of a CSGRegion in 2D:
reg = CSGRegion["Difference", {Disk[], Disk[{1 / 2, 1 / 2}]}]RegionMoment[reg, {0, 0}]reg = CSGRegion["Difference", {Cube[2], Cylinder[{{1, 1, 1}, {1, -1, 1}}]}]RegionMoment[reg, {0, 0, 0}]Subdivision Regions (1)
The moment of a SubdivisionRegion in 2D:
reg = SubdivisionRegion[Rectangle[]]RegionMoment[reg, {0, 0}]reg = SubdivisionRegion[Tetrahedron[]]RegionMoment[reg, {0, 0, 0}]Applications (3)
Find the surface area of a cow using the zero-order RegionMoment:
cow = \!\(\*Graphics3DBox[«7»]\);RegionMoment[cow, {0, 0, 0}]Find its centroid using the first-order moments for each of the axes:
(RegionMoment[cow, #]& /@ IdentityMatrix[3]) / RegionMoment[cow, {0, 0, 0}]Verify the results using RegionMeasure and RegionCentroid:
RegionMeasure[cow]RegionCentroid[cow]Find the covariance matrix of a constant-density distribution defined by a region:
reg = ExampleData[{"Geometry3D", "VikingLander"}, "MeshRegion"]Transform the region so that its RegionCentroid is at the origin:
creg = TransformedRegion[reg, TranslationTransform[-RegionCentroid[reg]]];Compute the matrix of second-order moments and normalize it by dividing by RegionMeasure:
cfs = {{{2, 0, 0}, {1, 1, 0}, {1, 0, 1}}, {{1, 1, 0}, {0, 2, 0}, {0, 1, 1}}, {{1, 0, 1}, {0, 1, 1}, {0, 0, 2}}};Map[RegionMoment[creg, #]&, cfs, {2}] / RegionMeasure[creg]Find a sphere that shares the first four moments with the cow surface:
cow = \!\(\*Graphics3DBox[«7»]\);
sph = Sphere[{a, b, c}, r];eqns = And@@Table[RegionMoment[sph, ord] == RegionMoment[cow, ord], {ord, {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}]FindInstance[eqns, {a, b, c, r}, Reals]The sphere has the same surface area and centroid as the cow:
Show[Graphics3D[{Opacity[0.3], sph /. %}], cow]Properties & Relations (8)
Zero-order moment for curves is equivalent to ArcLength:
RegionMoment[Line[{{0, 0}, {1, 1}}], {0, 0}] == ArcLength[Line[{{0, 0}, {1, 1}}]]Zero-order moment for surfaces is equivalent to Area:
RegionMoment[Disk[], {0, 0}] == Area[Disk[]]Zero-order moment for volumes is equivalent to Volume:
RegionMoment[Cylinder[], {0, 0, 0}] == Volume[Cylinder[]]The zero-order moment for any region is equivalent to the RegionMeasure:
{RegionMoment[Line[{{0, 0}, {1, 1}}], {0, 0}] == RegionMeasure[Line[{{0, 0}, {1, 1}}]],
RegionMoment[Disk[], {0, 0}] == RegionMeasure[Disk[]],
RegionMoment[Cylinder[], {0, 0, 0}] == RegionMeasure[Cylinder[]]}RegionCentroid is the first moments divided by the zero moment:
{m00, m10, m01} = {RegionMoment[Rectangle[], {0, 0}], RegionMoment[Rectangle[], {1, 0}], RegionMoment[Rectangle[], {0, 1}]}{m10, m01} / m00RegionCentroid[Rectangle[]]MomentOfInertia can compute the moment of inertia matrix wrt to the origin
consisting of multiple region moments:
ℛ = Cylinder[];{{RegionMoment[ℛ, {0, 2, 0}] + RegionMoment[ℛ, {0, 0, 2}], -RegionMoment[ℛ, {1, 1, 0}], -RegionMoment[ℛ, {1, 0, 1}]},
{-RegionMoment[ℛ, {1, 1, 0}], RegionMoment[ℛ, {2, 0, 0}] + RegionMoment[ℛ, {0, 0, 2}], -RegionMoment[ℛ, {0, 1, 1}]},
{-RegionMoment[ℛ, {1, 0, 1}], -RegionMoment[ℛ, {0, 1, 1}], RegionMoment[ℛ, {2, 0, 0}] + RegionMoment[ℛ, {0, 2, 0}]}}MomentOfInertia[ℛ, {0, 0, 0}]Moment[UniformDistribution[{{a, b}, {c, d}}], {2, 3}]RegionMoment computes
corresponding to a uniform density:
RegionMoment[Rectangle[{a, c}, {b, d}], {2, 3}] / Area[Rectangle[{a, c}, {b, d}]]Simplify[%% - %, a < b && c < d]CentralMoment computes
for a PDF
and centroid
:
CentralMoment[UniformDistribution[{{1, 2}, {3, 4}}], {2, 2}]After centering the region, this becomes a standard moment:
centered = TransformedRegion[Rectangle[{1, 3}, {2, 4}], TranslationTransform[-RegionCentroid[Rectangle[{1, 3}, {2, 4}]]]]//SimplifyAs in the previous example, RegionMoment assumes uniform distribution:
RegionMoment[centered, {2, 2}] / Area[Rectangle[{1, 3}, {2, 4}]]Related Guides
History
Text
Wolfram Research (2016), RegionMoment, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionMoment.html.
CMS
Wolfram Language. 2016. "RegionMoment." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionMoment.html.
APA
Wolfram Language. (2016). RegionMoment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionMoment.html
BibTeX
@misc{reference.wolfram_2026_regionmoment, author="Wolfram Research", title="{RegionMoment}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/RegionMoment.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_regionmoment, organization={Wolfram Research}, title={RegionMoment}, year={2016}, url={https://reference.wolfram.com/language/ref/RegionMoment.html}, note=[Accessed: 13-June-2026]}