RegionConvert[reg,form]
将区域表示 reg 转换为指定的形式.
RegionConvert
RegionConvert[reg,form]
将区域表示 reg 转换为指定的形式.
更多信息
- RegionConvert 将产生一个等价于 expr 的表达式.
- RegionConvert 通常用于比较具有不同表示的区域或获得适合不同函数的表示,例如最优化问题需要区域约束的隐式形式,而区域上的积分则需要区域的参数形式.
- 以下形式可用于区域表示之间的转换:
-
"Implicit" 隐式表示 "Mesh" 网格表示 "Parametric" 参数化表示 "Spline" 样条表示
范例
打开所有单元 关闭所有单元基本范例 (2)
范围 (11)
特殊区域 (5)
将 Rectangle 转换为隐式形式:
RegionConvert[Rectangle[{1, 2}, {10, 8}], "Implicit"]RegionConvert[Rectangle[{1, 2}, {10, 8}], "Parametric"]Region[Rectangle[{1, 2}, {10, 8}]]将 DiskSegment 转换为隐式形式:
RegionConvert[DiskSegment[{0, 0}, 1, {0, 3Pi / 2}], "Implicit"]RegionConvert[DiskSegment[{0, 0}, 1, {0, 3Pi / 2}], "Parametric"]Region[DiskSegment[{0, 0}, 1, {0, 3Pi / 2}]]将 CapsuleShape 转换为隐式形式:
RegionConvert[CapsuleShape[], "Implicit"]RegionConvert[CapsuleShape[], "Parametric"]Region[CapsuleShape[]]将 Hyperplane 转换为隐式形式:
RegionConvert[Hyperplane[{-1, -1, 1}, {1, 2, 3}], "Implicit"]RegionConvert[Hyperplane[{-1, -1, 1}, {1, 2, 3}], "Parametric"]Region[Hyperplane[{-1, -1, 1}, {1, 2, 3}]]用 B 样条曲面表示 Sphere:
bs = RegionConvert[Sphere[], "Spline"]cpts = First[bs];
Show[Graphics3D[{PointSize[Medium], Red, Map[Point, cpts], Gray, Line[cpts], Line[Transpose[cpts]]}], Graphics3D[bs]]公式区域 (2)
将 ImplicitRegion 对象转换为隐式形式:
ℛ = ImplicitRegion[(x - 5)^2 + (y - 1)^2 ≤ 1, {x, y}];RegionConvert[ℛ, "Implicit"]将 ParametricRegion 对象转换为隐式形式:
ℛ = ParametricRegion[{Cos[θ], Sin[θ]}, {{θ, 0, 2π}}];RegionConvert[ℛ, "Implicit"]网格区域 (2)
将 MeshRegion 对象转换为隐式形式:
ℛ = ConvexHullMesh[RandomReal[1, {50, 2}]]RegionConvert[ℛ, "Implicit"]ℛ = MeshRegion[{{0, 0}, {1, 0}, {0, 1}, {1, 1}, {2, 1}, {2, 0}}, Polygon[{{1, 2, 3}, {4, 5, 6}}]]RegionConvert[ℛ, "Implicit"]将 BoundaryMeshRegion 对象转换为隐式形式:
ℛ = BoundaryMeshRegion[{{0, 0, 0}, {4, 0, 0}, {0, 4, 0}, {0, 0, 4}}, Polygon[{{1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {1, 3, 4}}]]RegionConvert[ℛ, "Implicit"]ℛ = BoundaryMeshRegion[{{0, -1}, {-1, 0}, {0, 0}, {1, 0}, {0, 1}, {-1 / 2, 1 / 2}, {-1, 1 / 2}, {-1 / 2, 1}}, Line[{1, 3, 2, 1}], Line[{3, 4, 5, 3}], Line[{6, 7, 8, 6}]]RegionConvert[ℛ, "Implicit"]派生区域 (2)
将 BooleanRegion 对象转换为隐式形式:
ℛ = BooleanRegion[Or, {Disk[{1, 1}, 1], Disk[{0, 0}, 1]}];RegionConvert[ℛ, "Implicit"]Region[%]将 TransformedRegion 对象转换为隐式形式:
ℛ = TransformedRegion[Rectangle[], RotationTransform[π / 4]];RegionConvert[ℛ, "Implicit"]Region[%]应用 (3)
RegionConvert[Annulus[], "Implicit"]NIntegrate[Boole[(1/4) ≤ x ^ 2 + y ^ 2 ≤ 1], {x, -1, 1}, {y, -1, 1}]N[Area[Annulus[]]]RegionConvert[Ball[], "Implicit"]NIntegrate[Boole[x^2 + y^2 + z^2 ≤ 1], {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]N[Volume[Ball[]]]ℛ = RegionConvert[Icosahedron[], "Implicit"];prj = Reduce[Subscript[∃, z]{x, y, z}∈ℛ, Reals];RegionPlot[prj, {x, -1, 1}, {y, -1, 1}]属性和关系 (3)
使用 CanonicalizePolygon 将区域表示转换为多边形形式:
CanonicalizePolygon[Triangle[]]使用 CanonicalizePolyhedron 将区域表示转换为多面体形式:
CanonicalizePolyhedron[Dodecahedron[]]使用 DiscretizeRegion 将区域转换为网格:
DiscretizeRegion[Triangle[], MaxCellMeasure -> Infinity]相关指南
-
▪
- 几何计算
文本
Wolfram Research (2021),RegionConvert,Wolfram 语言函数,https://reference.wolfram.com/language/ref/RegionConvert.html (更新于 2024 年).
CMS
Wolfram 语言. 2021. "RegionConvert." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2024. https://reference.wolfram.com/language/ref/RegionConvert.html.
APA
Wolfram 语言. (2021). RegionConvert. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/RegionConvert.html 年
BibTeX
@misc{reference.wolfram_2026_regionconvert, author="Wolfram Research", title="{RegionConvert}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/RegionConvert.html}", note=[Accessed: 06-December-2026]}
BibLaTeX
@online{reference.wolfram_2026_regionconvert, organization={Wolfram Research}, title={RegionConvert}, year={2024}, url={https://reference.wolfram.com/language/ref/RegionConvert.html}, note=[Accessed: 06-December-2026]}