ConvexHullRegion[{p1,p2,…}]
给出点 p1、p2、… 的凸包.
ConvexHullRegion[reg]
给出区域 reg 的凸包.
ConvexHullRegion
ConvexHullRegion[{p1,p2,…}]
给出点 p1、p2、… 的凸包.
ConvexHullRegion[reg]
给出区域 reg 的凸包.
更多信息和选项
- ConvexHullRegion 也被称作凸包络或凸闭包.
- 凸包网格是包含点 pi 的最小的凸集.
- 区域 reg 的凸包是包含了区域 reg 内每条两点间线段的最小集合.
- ConvexHullRegion 和 Region 的选项相同.
范例
打开所有单元 关闭所有单元基本范例 (3)
pts = RandomReal[{-1, 1}, {50, 2}];ℛ = ConvexHullRegion[pts]Region[ℛ, Epilog -> {Black, Point[pts]}]ℛ = Annulus[{0, 0}, {1 / 2, 1}, {0, 3Pi / 2}];ConvexHullRegion[ℛ]{Region[ℛ], Region[%]}mr = ExampleData[{"Geometry3D", "Cow"}, "MeshRegion"]ℛ = ConvexHullRegion[mr];Show[HighlightMesh[ℛ, Style[2, Opacity[0.5]]], mr]范围 (20)
点 (1)
pts = RandomReal[{-1, 1}, {50, 1}];ℛ = ConvexHullRegion[pts]pts = RandomReal[{-1, 1}, {50, 2}];ℛ = ConvexHullRegion[pts]pts = RandomReal[{-1, 1}, {50, 3}];ℛ = ConvexHullRegion[pts]特殊区域 (4)
中包括 Point 的区域:
ConvexHullRegion[Point[{1}]]ℛ = Interval[{1, 2}];
Region[ℛ]ConvexHullRegion[ℛ]Line:
ConvexHullRegion[Line[{{1}, {2}}]]
中包括 Point 的区域:
ℛ = Point[Table[{t, Sin[t]}, {t, 0, 2π, 2π / 10}]];
Region[ℛ]ConvexHullRegion[ℛ]Line:
ℛ = Line[{{1, 0}, {2, 1}, {3, 0}, {4, 1}}];
Region[ℛ]ConvexHullRegion[ℛ]ℛ = Polygon[{{0, 0}, {1, 0}, {0.2, 1}, {0.9, 1}}]ConvexHullRegion[ℛ]ℛ = Circle[{1, 2}, 3];
Region[ℛ]ConvexHullRegion[ℛ]Disk:
ℛ = Disk[{0, 0}, {3, 4}, {1, 1 + 5}];
Region[ℛ]ConvexHullRegion[ℛ]
中包括 Point 的区域:
ℛ = Point[Tuples[Range[2], 3]];
Region[ℛ]ConvexHullRegion[ℛ]Line:
ℛ = Line[{{1, 2, 3}, {6, 5, 4}, {3, 4, 7}}];
Region[ℛ]ConvexHullRegion[ℛ]ℛ = Polygon[Table[{Cos[2π k / 6], Sin[2π k / 6], 0}, {k, 0, 5}], {Range[6]}]ConvexHullRegion[ℛ]r = Prism[{{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}, {{3, 2, 3}, {2, 2, 2}, {4, 2, 2}, {3, 4, 3}, {2, 4, 2}, {4, 4, 2}}}];ℛ = Prism[{{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}, {{3, 2, 3}, {2, 2, 2}, {4, 2, 2}, {3, 4, 3}, {2, 4, 2}, {4, 4, 2}}}];
Region[ℛ]ConvexHullRegion[ℛ]
中包含
中 Simplex 的区域:
ConvexHullRegion[Simplex[{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}]]
中的 Cuboid:
ConvexHullRegion[Cuboid[{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}]]
中的Ball:
ConvexHullRegion[Ball[{1, 2, 3, 4, 5, 6, 7}, 8]]网格区域 (2)
一维空间中的 MeshRegion i
MeshRegion[{{0}, {1}, {5}}, Line[{1, 2, 3}]]ConvexHullRegion[%]MeshRegion[{{0, 0}, {2, 0}, {3, 1}, {2, 3}, {1, 2}}, Polygon[{1, 3, 2, 4, 5}]]ConvexHullRegion[%]MengerMesh[1, 3]ConvexHullRegion[%]一维空间中的 BoundaryMeshRegion:
BoundaryMeshRegion[{{0}, {1}}, Point[{1, 2}]]ConvexHullRegion[%]BoundaryMeshRegion[{{0, 0}, {1, 3}, {0, 1}, {-1, 0}}, Line[{1, 2, 3, 4, 1}]]ConvexHullRegion[%]ℛ = [image];ConvexHullRegion[%]方程式区域 (3)
以 ImplicitRegion 呈现的抛物线区域:
ℛ = ImplicitRegion[x + 3y ≤ 3 && 2x + y ≥ 1, {x, y}];Region[ℛ]ConvexHullRegion[ℛ]表示为 ParametricRegion 的抛物线:
ℛ = ParametricRegion[{t, t^2}, {t}];Region[ℛ]ConvexHullRegion[ℛ]ImplicitRegion 在不同维度上可以有数个分量:
ℛ = ImplicitRegion[x^2 + y^2 ≤ 1∨(x + 1)^2 + y^2 == 1, {x, y}];Region[ℛ]ConvexHullRegion[ℛ]衍生区域 (6)
两个区域的 RegionIntersection:
ℛ = RegionIntersection[Disk[{0, 0}, 1], Disk[{0, 1}, 1]];Region[ℛ]ConvexHullRegion[ℛ]混合维度区域的 RegionUnion:
ℛ = RegionUnion[Circle[{0, 0}, 1], Disk[{2, 0}, 1]];Region[ℛ]ConvexHullRegion[ℛ]一般 BooleanRegion 组合:
ℛ = BooleanRegion[Xor, {Disk[{-1 / 3, 0}, 1], Disk[{1 / 3, 0}, 1]}];
Region[ℛ]ConvexHullRegion[ℛ]ℛ = TransformedRegion[Disk[], {Indexed[#1, 1] + Indexed[#1, 2], Indexed[#1, 1] - Indexed[#1, 2], Indexed[#1, 1] Indexed[#1, 2]}& ];Region[ℛ]ConvexHullRegion[ℛ]ℛ = InverseTransformedRegion[Disk[], {Indexed[#1, 1] + Indexed[#1, 2] + Indexed[#1, 3], Indexed[#1, 1] Indexed[#1, 2]Indexed[#1, 3]}& , 3];Region[%]ConvexHullRegion[ℛ]ℛ = RegionBoundary[Ball[]];ConvexHullRegion[ℛ]地理区域 (2)
带有 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}}}]];ConvexHullRegion[ℛ]含有 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"]];ConvexHullRegion[ℛ]CSG 区域 (1)
二维 CSGRegion:
CSGRegion["Difference", {Disk[], Disk[{0, 0}, 1 / 2]}]ConvexHullRegion[%]CSGRegion["Difference", {Cube[2], Cylinder[{{0, 1, 0}, {0, -1, 0}}, 1 / 2]}]ConvexHullRegion[%]Subdivision 区域 (1)
SubdivisionRegion[[image]]ConvexHullRegion[%]SubdivisionRegion[[image]]ConvexHullRegion[%]选项 (97)
AlignmentPoint (1)
使用
坐标,指定在三维 Inset 中要对其的位置:
Table[Graphics[{Inset[ConvexHullRegion[Triangle[{{0, 0}, {2, -1}, {2, 1}}], AlignmentPoint -> {a, 0}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]Table[Graphics[{Inset[ConvexHullRegion[Triangle[{{0, 0}, {2, -1}, {2, 1}}], AlignmentPoint -> {1 / 2, a}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]AspectRatio (1)
使用数字值的 AspectRatio:
Table[ConvexHullRegion[Triangle[{{0, 0}, {2, -1}, {2, 1}}], AspectRatio -> 1 / k], {k, 1, 3}]Axes (2)
AxesEdge (2)
AxesLabel (2)
AxesOrigin (2)
AxesStyle (2)
Background (1)
BaselinePosition (3)
{x, ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> 50, BaselinePosition -> Center], y}通过使用 Scaled 可将高度的某个分数比例指定为图形的基线:
Table[{x, ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> 50, BaselinePosition -> Scaled[b]]}, {b, {0, 0.5, 1}}]{x, ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> 50, BaselinePosition -> Axis], y}BaseStyle (2)
Boxed (2)
BoxRatios (2)
ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Boxed -> True, BoxRatios -> {1, 2, 3}]ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Boxed -> True, Axes -> True, BoxRatios -> Automatic]BoxStyle (1)
Epilog (1)
FaceGrids (4)
ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Axes -> True, Boxed -> True, FaceGrids -> All]ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Axes -> True, Boxed -> True, FaceGrids -> {{0, 0, 1}, {0, 0, -1}}]ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Axes -> True, Boxed -> True, FaceGrids -> {{0, -1, 0}}]ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Axes -> True, Boxed -> True, FaceGrids -> {{{0, -1, 0}, {{1}, {2 / 3, 4 / 3}}}}]FaceGridsStyle (1)
Frame (2)
FrameLabel (2)
FrameStyle (2)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameStyle -> Directive[Thick, Gray]]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameStyle -> {{Thick, Directive[Thick, Dashed]}, {Blue, Red}}]FrameTicks (3)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> None]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> Automatic]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> {{None, Automatic}, {Automatic, None}}]FrameTicksStyle (2)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicksStyle -> Directive[Orange, 12]]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicksStyle -> {{Black, Blue}, {Red, Green}}]GridLines (3)
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], GridLines -> Automatic]Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Axes -> True, GridLines -> {{.5, 1.5}, {.5, 1.5}}]Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Axes -> True, GridLines -> {{{-1, Orange}, {-.5, Dotted}, {.5, Dotted}, {1, Orange}}, {-1, {-.5, Dotted}, {.5, Dotted}, 1}}]GridLinesStyle (1)
ImageMargins (3)
ImageSize 外围不允许有边距:
Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}]]]Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageMargins -> 20]]Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageMargins -> {{5, 10}, {20, 30}}]]ImagePadding (4)
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImagePadding -> None, Frame -> True, FrameLabel -> {x, y}]Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImagePadding -> All, Frame -> True, FrameLabel -> {x, y}], FrameMargins -> 0]Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImagePadding -> 40, Frame -> True]]Framed[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImagePadding -> {{40, 10}, {20, 5}}, Frame -> True]]ImageSize (3)
Table[Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> s], {s, {Tiny, Small}}]{Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> 100], Region[Triangle[{{0, 2}, {2, 0}, {2, 4}}], ImageSize -> 100]}{Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], ImageSize -> {100, 100}], Region[Triangle[{{0, 2}, {2, 0}, {2, 4}}], ImageSize -> {100, 100}]}LabelStyle (1)
Lighting (4)
Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Lighting -> {{"Ambient", Orange}}]Table[Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Lighting -> {{"Directional", c, {{1.5, 0, 2}, {0, 0, 0}}}}], {c, {Red, Yellow, Blue}}]Table[Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Lighting -> {{"Point", c, {1.5, 0, 3}}}], {c, {Red, Yellow, Blue}}]Table[Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], Lighting -> {{"Spot", c, {{1, 1, 2.5}, {1, 1, 2}}, Pi / 8}}], {c, {Red, Yellow, Blue}}]PlotLabel (2)
在 TraditionalForm 中在图形上方显示标签:
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], PlotLabel -> x ^ 2 + y ^ 2 == 1]使用 Style 和其他排版函数来调整标签显示的方式:
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], PlotLabel -> Style[Framed[x ^ 2 + y ^ 2 == 1], 16, Red, Background -> Yellow]]PlotRange (3)
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, PlotRange -> All]Region[Triangle[{{-1, 0}, {1, -1}, {1, 1}}], PlotRange -> {{-1, 1}, {0, 1}}, Frame -> True]强制以 PlotRange 范围为准进行裁剪:
Region[Triangle[{{-1, 0}, {1, -1}, {1, 1}}], PlotRange -> {{-1, 1}, {0, 1}}, PlotRange -> {{-1, 1}, {0, 1}}, PlotRangeClipping -> True, Frame -> True]PlotRange->s 等价于 PlotRange->{{-s,s},{-s,s}}:
Region[Triangle[{{-2, 0}, {2, -2}, {2, 2}}], Frame -> True, PlotRange -> 1]PlotRangeClipping (2)
允许图形对象超过 PlotRange 的范围:
Region[Triangle[{{-2, 0}, {2, -2}, {2, 2}}], Frame -> True, PlotRange -> 1, PlotRangeClipping -> False]以 PlotRange 范围为准裁剪所有图形对象:
Region[Triangle[{{-2, 0}, {2, -2}, {2, 2}}], Frame -> True, PlotRange -> 1, PlotRangeClipping -> True]PlotRangePadding (3)
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], PlotRangePadding -> 1, Frame -> True]使用 Scaled 坐标进行填充设置:
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], PlotRangePadding -> Scaled[0.1], Frame -> True]Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], PlotRangePadding -> {{0.5, 1}, {0.3, 0.3}}, Frame -> True]PlotRegion (3)
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> False, Background -> LightBlue]Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> False, PlotRegion -> {{0.25, 0.75}, {0.25, 0.75}}, Background -> LightBlue]ImagePadding 也可用于在图形周围添加填充:
Region[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameTicks -> False, ImagePadding -> 30, Background -> LightBlue]PlotTheme (3)
基础主题 (2)
Prolog (1)
bg = Graphics[Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexColors -> {Orange, Orange, White, White}], AspectRatio -> Full];ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Prolog -> Inset[bg, Scaled[{0, 0}], Scaled[{0, 0}]]]ConvexHullRegion[Line[{{0, 0}, {1, 0}, {2, 1 / 2}, {2, -1 / 2}, {1, 0}}], Prolog -> Inset[bg, Scaled[{0, 0}], Scaled[{0, 0}]]]RotateLabel (2)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameLabel -> {None, "y axis"}, RotateLabel -> True]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Frame -> True, FrameLabel -> {None, "y axis"}, RotateLabel -> False]SphericalRegion (2)
Table[ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], SphericalRegion -> True, ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]不使用 SphericalRegion,将每个图像的尺寸尽可能设置到最大:
Table[ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]Ticks (3)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Axes -> True, Ticks -> None]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Axes -> True, Ticks -> Automatic]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Ticks -> {{1, 2, 3}, {1, 3}}, Axes -> True]TicksStyle (2)
ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Ticks -> {{1, 2, 3}, {1, 3}}, Axes -> True, TicksStyle -> Directive[Red, Bold]]ConvexHullRegion[Triangle[{{0, 1}, {2, 0}, {2, 2}}], Axes -> True, TicksStyle -> {Directive[Red, Bold], Directive[Blue, 12]}]ViewAngle (1)
ViewCenter (1)
ViewMatrix (1)
ViewPoint (3)
ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> {Pi, Pi / 2, 2}]{ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> Front],
Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> Top]}{ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> {0, -Infinity, 0}],
Region[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> {0, 0, Infinity}]}ViewProjection (1)
ViewRange (2)
ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> {1, 0, 1.5}, SphericalRegion -> True]ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewPoint -> {1, 0, 1.5}, ViewRange -> {3.5, 7.2}, SphericalRegion -> True]ViewVector (1)
ViewVertical (2)
ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewVertical -> {1, 0, 0}]Table[ConvexHullRegion[Pyramid[{{0, 0, 0}, {2, 0, 0}, {2, 2, 0}, {0, 2, 0}, {1, 1, 2}}], ViewVertical -> v], {v, {{1, 0, 1}, {.5, 0, 1}, {0, -.5, 1}, {0, -1, 1}}}]应用 (3)
Multicolumn[Table[Row[{Region[f, ImageSize -> 30], [image], Region[ConvexHullRegion[f], ImageSize -> 30]}], {f, {...}}], 4, Spacings -> 3]ℛ = DiscretizeGraphics[PolyhedronData["TetrahedronFiveCompound"]]ConvexHullRegion[MeshCoordinates[ℛ]]cowPoints = ExampleData[{"Geometry3D", "Cow"}, "VertexData"];cowvexHull = ConvexHullRegion[cowPoints];cow = ExampleData[{"Geometry3D", "Cow"}, "Graphics3D"];Show[HighlightMesh[cowvexHull, {Style[1, {Brown}], Style[2, Opacity[0.3, Brown]]}], cow]属性和关系 (4)
二维空间中点的 ConvexHullRegion 是一个 Polygon:
pts = RandomReal[1, {10, 2}];ℛ = ConvexHullRegion[pts]{BoundedRegionQ[ℛ], RegionBounds[ℛ]}{RegionDimension[ℛ], RegionEmbeddingDimension[ℛ]}使用 ConvexRegionQ 检查凸包区域的属性:
ConvexHullRegion[[image]]ConvexRegionQ[%]使用 DelaunayMesh 获取凸包内部的德劳内三角:
DelaunayMesh[RandomReal[1, {25, 2}]]使用 TriangulateMesh 可控制内部的三角化:
ℛ = ConvexHullRegion[RandomReal[1, {25, 2}]];{TriangulateMesh[ℛ], TriangulateMesh[ℛ, MaxCellMeasure -> ∞]}可能存在的问题 (1)
无法给出精确结果时,ConvexHullRegion 给出近似结果:
ConvexHullRegion[BooleanRegion[!#1 && #2&, {Cube[{1 / 2, 0, 0}], Ball[]}]]On[General::approx]ConvexHullRegion[BooleanRegion[!#1 && #2&, {Cube[{1 / 2, 0, 0}], Ball[]}]]
相关指南
-
▪
- 衍生的几何区域
文本
Wolfram Research (2020),ConvexHullRegion,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ConvexHullRegion.html.
CMS
Wolfram 语言. 2020. "ConvexHullRegion." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ConvexHullRegion.html.
APA
Wolfram 语言. (2020). ConvexHullRegion. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ConvexHullRegion.html 年
BibTeX
@misc{reference.wolfram_2026_convexhullregion, author="Wolfram Research", title="{ConvexHullRegion}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ConvexHullRegion.html}", note=[Accessed: 10-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_convexhullregion, organization={Wolfram Research}, title={ConvexHullRegion}, year={2020}, url={https://reference.wolfram.com/language/ref/ConvexHullRegion.html}, note=[Accessed: 10-September-2026]}