RegionMoment[reg,{i1,i2,…,in}]
计算区域 reg 的多项式矩
.
RegionMoment
RegionMoment[reg,{i1,i2,…,in}]
计算区域 reg 的多项式矩
.
更多信息和选项
- RegionMoment 使用 Assumptions 选项,可用以指定参数上的假定.
范例
打开所有单元 关闭所有单元基本范例 (2)
范围 (12)
特色区域 (1)
公式区域 (2)
表示为 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}]圆盘的矩表示为 ParametricRegion:
RegionMoment[ParametricRegion[{r Cos[θ], r Sin[θ]}, {{r, 0, 1}, {θ, 0, 2π}}], {2, 2}]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}]网格区域 (2)
二维空间中,MeshRegion 的矩:
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}]reg = ConvexHullMesh[RandomReal[1, {10, 2}]]RegionMoment[reg, {1, 2}]reg = ConvexHullMesh[RandomReal[1, {30, 3}]]RegionMoment[reg, {1, 2, 3}]导出区域 (3)
reg = RegionIntersection[Disk[{0, 0}, 1], Disk[{0, 1}, 1]];Region[reg]RegionMoment[reg, {0, 0}]reg = TransformedRegion[Disk[{0, 0}, 1], ShearingTransform[Pi / 3, {1, 0}, {0, 1}]];Region[reg]RegionMoment[reg, {0, 2}]RegionBoundary 的矩:
reg = RegionBoundary[Simplex[2]];Region[reg]RegionMoment[reg, {1, 2}]地理区域 (2)
Polygon 与 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}]Polygon 与 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 区域 (1)
二维空间中 CSGRegion 的矩:
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}]细分区域 (1)
二维空间中 SubdivisionRegion 的矩:
reg = SubdivisionRegion[Rectangle[]]RegionMoment[reg, {0, 0}]reg = SubdivisionRegion[Tetrahedron[]]RegionMoment[reg, {0, 0, 0}]应用 (3)
使用零阶 RegionMoment 求牛的曲面面积:
cow = \!\(\*Graphics3DBox[«7»]\);RegionMoment[cow, {0, 0, 0}](RegionMoment[cow, #]& /@ IdentityMatrix[3]) / RegionMoment[cow, {0, 0, 0}]使用 RegionMeasure 和 RegionCentroid 验证结果:
RegionMeasure[cow]RegionCentroid[cow]reg = ExampleData[{"Geometry3D", "VikingLander"}, "MeshRegion"]变换区域,以使得 RegionCentroid 位于原点:
creg = TransformedRegion[reg, TranslationTransform[-RegionCentroid[reg]]];计算二阶矩的矩阵,并且通过除以 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]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]Show[Graphics3D[{Opacity[0.3], sph /. %}], cow]属性和关系 (8)
曲线的零阶矩等于 ArcLength:
RegionMoment[Line[{{0, 0}, {1, 1}}], {0, 0}] == ArcLength[Line[{{0, 0}, {1, 1}}]]曲面的零阶矩等于 Area:
RegionMoment[Disk[], {0, 0}] == Area[Disk[]]立体的零阶矩等于 Volume:
RegionMoment[Cylinder[], {0, 0, 0}] == Volume[Cylinder[]]任何区域的零阶矩等价于 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 是一阶矩除以零矩:
{m00, m10, m01} = {RegionMoment[Rectangle[], {0, 0}], RegionMoment[Rectangle[], {1, 0}], RegionMoment[Rectangle[], {0, 1}]}{m10, m01} / m00RegionCentroid[Rectangle[]]MomentOfInertia 可以计算惯性矩阵的矩,其中原点为
,并且包括多个区域矩:
ℛ = 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 计算
:
RegionMoment[Rectangle[{a, c}, {b, d}], {2, 3}] / Area[Rectangle[{a, c}, {b, d}]]Simplify[%% - %, a < b && c < d]CentralMoment 对于 PDF
和中心
计算
:
CentralMoment[UniformDistribution[{{1, 2}, {3, 4}}], {2, 2}]centered = TransformedRegion[Rectangle[{1, 3}, {2, 4}], TranslationTransform[-RegionCentroid[Rectangle[{1, 3}, {2, 4}]]]]//Simplify在前面的例子中,RegionMoment 假定使用均匀分布:
RegionMoment[centered, {2, 2}] / Area[Rectangle[{1, 3}, {2, 4}]]文本
Wolfram Research (2016),RegionMoment,Wolfram 语言函数,https://reference.wolfram.com/language/ref/RegionMoment.html.
CMS
Wolfram 语言. 2016. "RegionMoment." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/RegionMoment.html.
APA
Wolfram 语言. (2016). RegionMoment. Wolfram 语言与系统参考资料中心. 追溯自 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: 24-November-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: 24-November-2026]}