HalfPlane
更多信息
- HalfPlane 亦称为二维半空间.
- HalfPlane 可被用作几何区域及图形基元.
- HalfPlane 表示一个平面区域
、或者
. - HalfPlane 可用在 Graphics 和 Graphics3D 中.
- 渲染时,HalfPlane 会被 PlotRange 裁剪.
- 在图形中,点 p、pi 和矢量 v 可以是 Scaled 和 Dynamic 表达式.
- 有些指令,比如 FaceForm、 EdgeForm、 Opacity 和着色会影响图形渲染.
- FaceForm[front,back] 可用于对三维中正面和背面的指定不同样式. 正面由右手边规则定义且方向从 {p1,w,p2} 到 {p,v,w}.
范例
打开所有单元 关闭所有单元基本范例 (4)
二维 HalfPlane:
Graphics[HalfPlane[{{0, 0}, {1, 0}}, {0, 1}], Frame -> True]Graphics3D[HalfPlane[{{0, 0, 0}, {1, 0, 0}}, {0, 1, 1}]]ℛ = HalfPlane[{0, 0}, {1, -1}, {1, 1}];{Graphics[{Pink, ℛ}], Graphics[{EdgeForm[Thick], Pink, ℛ}], Graphics[{EdgeForm[Dashed], Pink, ℛ}], Graphics[{EdgeForm[Directive[Thick, Dashed, Blue]], Pink, ℛ}]}半平面的面积 Area 为无穷大:
Area[HalfPlane[{{0, 0}, {1, 0}}, {0, 1}]]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];{RegionMember[ℛ, {1, 1}], RegionMember[ℛ, {1, -1}]}范围 (18)
图形 (8)
规范 (3)
ill = Graphics[{PointSize[Medium], Point[{{0, 0}}], Arrowheads[Medium], Thick, Arrow[{{0, 0}, {1, 0}}], Arrow[{{0, 0}, {0, 1}}]}];Show[Graphics[{Pink, HalfPlane[{0, 0}, {1, 0}, {0, 1}]}, PlotRange -> {{-1, 2}, {-1, 2}}, Frame -> True], ill]ill = Graphics[{PointSize[Medium], Point[{{0, 0}, {1, 0}}], Arrowheads[Medium], Thick, Arrow[{{0, 0}, {0, 1}}]}];Show[Graphics[{Pink, HalfPlane[{{0, 0}, {1, 0}}, {0, 1}]}, PlotRange -> {{-1, 2}, {-1, 2}}, Frame -> True], ill]ill = Graphics3D[{PointSize[Medium], Point[{{0, 1, 3}}], Arrowheads[Medium], Thick, Arrow[{{0, 1, 3}, {1, 0, 1}}], Arrow[{{0, 1, 3}, {1, 2, 3}}]}, PlotRange -> {{-1, 2}, {-1, 3}, {0, 4}}, Axes -> True];Show[ill, Graphics3D[HalfPlane[{0, 1, 3}, {1, -1, -2}, {1, 1, 0}]]]ill = Graphics3D[{PointSize[Medium], Point[{{0, 1, 3}, {1, 0, 1}}], Arrowheads[Medium], Thick, Arrow[{{0, 1, 3}, {1, 2, 3}}]}, PlotRange -> {{-1, 2}, {-1, 3}, {0, 4}}, Axes -> True];Show[ill, Graphics3D[HalfPlane[{{0, 1, 3}, {1, 0, 1}}, {1, 1, 0}]]]Table[Graphics[HalfPlane[{0, 0}, {Cos[θ], Sin[θ]}, {Sin[θ], -Cos[θ]}], ImageSize -> Tiny, PlotLabel -> θ], {θ, 0, π, π / 4}]样式 (2)
Table[Graphics[{c, HalfPlane[{0, 0}, {1, 1}, {0, 1}]}], {c, {Red, Green, Blue, Yellow}}]Table[Graphics3D[{c, HalfPlane[{0, 1, 3}, {1, -1, -2}, {1, 1, 0}]}, PlotRange -> {{-1, 2}, {-1, 3}, {0, 4}}], {c, {Red, Green, Blue, Yellow}}]FaceForm 和 EdgeForm 可被用来指定面和边的样式:
Graphics[{FaceForm[Pink], EdgeForm[Directive[Dashed, Thick, Blue]], HalfPlane[{0, 0}, {1, 1}, {0, 1}]}]Graphics3D[{FaceForm[Pink], EdgeForm[Directive[Dashed, Thick, Blue]], HalfPlane[{0, 1, 3}, {1, -1, -2}, {1, 1, 0}]}, PlotRange -> {{-1, 2}, {-1, 3}, {0, 4}}]坐标 (3)
Graphics[HalfPlane[{Scaled[{0, 0.25}], Scaled[{1, 0.5}]}, Scaled[{0, 1}]], PlotRange -> {{0, 10}, {0, 10}}, Frame -> True]Graphics3D[HalfPlane[{Scaled[{0, 0.25, 0}], Scaled[{1, 0.5, 1}]}, Scaled[{0, 1, 1}]], PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Axes -> True]Graphics[HalfPlane[{Scaled[{0, 0.5}, {2, 0}], Scaled[{0, 0.5}, {1, 2}]}, Scaled[{0, 1}]], PlotRange -> {{0, 4}, {0, 4}}, Frame -> True]点和矢量可以是 Dynamic:
DynamicModule[{θ = 0}, {Slider[Dynamic[θ], {0, Pi}], Graphics[HalfPlane[{{0, 0}, Dynamic[{Cos[θ], Sin[θ]}]}, {1, 1}]]}]区域 (10)
RegionEmbeddingDimension[HalfPlane[{0, 0}, {1, 0}, {0, 1}]]RegionEmbeddingDimension[HalfPlane[{0, 0, 0}, {1, 0, 0}, {1, 1, 0}]]RegionDimension[HalfPlane[{0, 0}, {1, 0}, {1, 1}]]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];{RegionMember[ℛ, {1, 5}], RegionMember[ℛ, {1, -5}]}RegionMember[ℛ, {x, y}]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];RegionMeasure[ℛ]RegionCentroid[ℛ]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];RegionDistance[ℛ, {2, -3}]{Plot3D[RegionDistance[ℛ, {x, y}], {x, -1, 1}, {y, -1, 1}, MeshFunctions -> {#3&}, Mesh -> 5, Exclusions -> y == 0], ContourPlot[Evaluate@RegionDistance[ℛ, {x, y}], {x, -2, 2}, {y, -2, 2}, Contours -> {{0.5, Red}, {1, Green}, {1.5, Blue}}]}ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];{SignedRegionDistance[ℛ, {2, -3}], SignedRegionDistance[ℛ, {2, 3}]}Plot3D[SignedRegionDistance[ℛ, {x, y}], {x, -1, 1}, {y, -1, 1}, MeshFunctions -> {#3&}, Mesh -> 5, Exclusions -> y == 0]ℛ = HalfPlane[{0, 0}, {1, -1}, {1, 1}];RegionNearest[ℛ, {2, -3}]pts = Table[{Cos[k 2 π / 16], Sin[k 2 π / 16]}, {k, 0, 15}];
nst = RegionNearest[ℛ, #]& /@ pts;Legended[Graphics[{{Gray, ℛ}, {Thin, Gray, Line[Transpose[{pts, nst}]]}, {Red, Point[pts]}, {Blue, Point[nst]}}], PointLegend[{Red, Blue}, {"start", "nearest"}]]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];BoundedRegionQ[ℛ]RegionBounds[ℛ]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];Integrate[Exp[-x^2 - y^2], {x, y}∈ℛ]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];Minimize[{(x - 1 / 2)^2(y - 1 / 4)^2 + 1, {x, y}∈ℛ}, {x, y}]ℛ = HalfPlane[{0, 0}, {1, 0}, {0, 1}];Reduce[x^2 + y^2 == 1 && {x, y}∈ℛ, {x, y}]应用 (3)
hpl = {HalfPlane[{{0, 0}, {1, 0}}, {0, 1}], HalfPlane[{{0, 0}, {1, 0}}, {0, -1}], HalfPlane[{{0, 0}, {0, 1}}, {1, 0}], HalfPlane[{{0, 0}, {0, 1}}, {-1, 0}]};Graphics[{Opacity@0.3, #}, Axes -> True]& /@ hpl在 BubbleChart 中划分空间:
b = BubbleChart3D[RandomReal[1, {20, 4}]];hpl = Table[HalfPlane[{0.5, 0, 0.5}, {0, 0.5, 0}, w], {w, {{0, 0, -1}, {-1, 0, 1}, {1, 0, 1}}}];Show[b, Graphics3D[{Opacity@0.6, hpl}]]Subscript[ℛ, 1] = Sphere[];
Subscript[ℛ, 2] = HalfPlane[{0, 0, 0}, {0, 1, 0}, {1, 0, 1}];pts = Solve[2 x y == z^2 && {x, y, z}∈Subscript[ℛ, 1] && {x, y, z}∈Subscript[ℛ, 2], {x, y, z}, Reals]intersections = {PointSize[Large], Red, Point[{x, y, z} /. pts]};r1 = {Opacity[0.5, LightBlue], Subscript[ℛ, 1]};r2 = {Opacity[0.5, Yellow], Subscript[ℛ, 2]};r3 = ContourPlot3D[2 x y == z^2, {x, -1.2, 1.2}, {y, -1.2, 1.2}, {z, -1.2, 1.2}, Mesh -> None, ContourStyle -> Opacity[0.5]];Show[{Graphics3D[{r1, r2, intersections}], r3}, Boxed -> False]属性和关系 (4)
可以用 ConicHullRegion 来表示任意 HalfPlane:
Subscript[ℛ, 1] = HalfPlane[{{0, 1, 3}, {1, 0, 1}}, {1, 1, 0}];Subscript[ℛ, 2] = ConicHullRegion[{{0, 1, 3}, {1, 0, 1}}, {{1, 1, 0}}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]ImplicitRegion 可用来表示任意 HalfPlane:
Subscript[ℛ, 1] = HalfPlane[{1, 1}, {1, 2}, {2, -1}];Subscript[ℛ, 2] = ImplicitRegion[1 - 2x + y ≤ 0, {x, y}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]ParametricRegion 可用来表示任意 HalfPlane:
Subscript[ℛ, 1] = HalfPlane[{1, 1}, {1, 2}, {2, -1}];Subscript[ℛ, 2] = ParametricRegion[{1, 1} + u{1, 2} + v{2, -1}, {{u, -∞, ∞}, {v, 0, ∞}}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]任何 InfinitePlane 都可被表示为两个半平面的并集:
Subscript[ℛ, 1] = InfinitePlane[{0, 1, 3}, {{1, -1, -2}, {1, 1, 0}}];Subscript[ℛ, 2] = RegionUnion[HalfPlane[{0, 1, 3}, {1, -1, -2}, {1, 1, 0}], HalfPlane[{0, 1, 3}, {1, -1, -2}, {-1, -1, 0}]];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]相关指南
-
▪
- 图形对象 ▪
- 立体几何 ▪
- 基本几何区域 ▪
- 平面几何 ▪
- Graphics Primitives Gallery
文本
Wolfram Research (2014),HalfPlane,Wolfram 语言函数,https://reference.wolfram.com/language/ref/HalfPlane.html (更新于 2016 年).
CMS
Wolfram 语言. 2014. "HalfPlane." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2016. https://reference.wolfram.com/language/ref/HalfPlane.html.
APA
Wolfram 语言. (2014). HalfPlane. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/HalfPlane.html 年
BibTeX
@misc{reference.wolfram_2026_halfplane, author="Wolfram Research", title="{HalfPlane}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/HalfPlane.html}", note=[Accessed: 11-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_halfplane, organization={Wolfram Research}, title={HalfPlane}, year={2016}, url={https://reference.wolfram.com/language/ref/HalfPlane.html}, note=[Accessed: 11-September-2026]}