Prism[{p1,…,p6}]
表示一个连接三角形 {p1,p2,p3} 和三角形 {p4,p5,p6} 的填充三棱柱.
Prism
Prism[{p1,…,p6}]
表示一个连接三角形 {p1,p2,p3} 和三角形 {p4,p5,p6} 的填充三棱柱.
更多信息和选项
- Prism 可被用作几何区域及图形基元.
- Prism 表示一个填充多面体,由多边形面 {p1,p3,p6,p4}、{p2,p1,p4,p5}、{p6,p3,p2,p5}、{p1,p2,p3} 和 {p4,p6,p5} 给定.
- CanonicalizePolyhedron 可用于把棱柱转换成显式 Polyhedron 对象.
- Prism 可用在 Graphics3D 中.
- 在图形中,点 pi 可以是 Scaled 和 Dynamic 表达式.
- 有些指令,比如 FaceForm、EdgeForm、Opacity、Texture 和着色会影响图形渲染.
- 在图形中可使用下列选项和设置:
-
VertexColors Automatic 插值用顶点颜色 VertexNormals Automatic 用于设置颜色色调的有效顶点法线 VertexTextureCoordinates None 纹理坐标
范例
打开所有单元 关闭所有单元基本范例 (3)
Graphics3D[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}]]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];Graphics3D[{EdgeForm[{Thick, Dashed, Blue}], FaceForm[{Pink, Opacity[0.7]}], ℛ}, Boxed -> False]{Graphics3D[{Pink, ℛ}], Graphics3D[{EdgeForm[Thick], ℛ}], Graphics3D[{EdgeForm[Dashed], ℛ}], Graphics3D[{EdgeForm[Directive[Thick, Dashed, Blue]], Pink, ℛ}]}Volume[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}]]RegionCentroid[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}]]范围 (18)
图形 (8)
规范 (2)
样式 (3)
FaceForm 和 EdgeForm 可用来指定面和边的样式:
ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];Graphics3D[{EdgeForm[{Thick, Dashed, Blue}], FaceForm[{Pink, Opacity[0.7]}], ℛ}, Boxed -> False]设置面的 Texture:
ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}, VertexTextureCoordinates -> {{0, 0}, {1, 1}, {1, 0}, {1, 1}, {1, 0}, {0, 1}}];Graphics3D[{Texture[[image]], ℛ}, Lighting -> "Neutral"]为顶点分配 VertexColors:
Graphics3D[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}, VertexColors -> ColorData[60, "ColorList"]]]坐标 (3)
ℛ = Prism[{Scaled[{0.5, 0., 0.5}], Scaled[{0., 0., 0.}], Scaled[{1., 0., 0.}], Scaled[{0.5, 1., 0.5}], Scaled[{0., 1., 0.}], Scaled[{1., 1., 0.}]}];Graphics3D[ℛ, PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Axes -> True]ℛ = Prism[{Scaled[{0, 0, 0.5}, {1, 0, 1}], Scaled[{0, 0, 0.5}, {0, 0, 0}], Scaled[{0, 0, 0.5}, {2, 0, 0}], Scaled[{0, 0, 0.5}, {1, 2, 1}], Scaled[{0, 0, 0.5}, {0, 2, 0}], Scaled[{0, 0, 0.5}, {2, 2, 0}]}] ;Graphics3D[ℛ, PlotRange -> {{0, 2}, {0, 2}, {0, 2}}, Axes -> True]顶点可以是 Dynamic:
DynamicModule[{x}, {Slider[Dynamic[x], {0.5, 1}], Graphics3D[Prism[{Dynamic[x{1, 0, 1}], {0, 0, 0}, Dynamic[x{2, 0, 0}], {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}]]}]区域 (10)
ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];RegionEmbeddingDimension[ℛ]RegionDimension[ℛ]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];{RegionMember[ℛ, {1, 1, 1}], RegionMember[ℛ, {1, 2, 3}]}RegionMember[ℛ, {x, y, z}]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];{Volume[ℛ], RegionMeasure[ℛ]}c = RegionCentroid[ℛ]Graphics3D[{{Opacity[0.5], LightBlue, ℛ}, {PointSize[Large], Red, Point[c]}}, Boxed -> False]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];{RegionDistance[ℛ, {1, 0, 0}], RegionDistance[ℛ, {3, 3, 3}]}ContourPlot3D[Evaluate@RegionDistance[ℛ, {x, y, z}], {x, -1.5, 3}, {y, -1.5, 3.5}, {z, -1.5, 3}, Mesh -> None, Contours -> {0.25, 0.5, 1}, ContourStyle -> ColorData[94, "ColorList"], Lighting -> "Neutral", BaseStyle -> Opacity[0.5], BoxRatios -> Automatic]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];{SignedRegionDistance[ℛ, {1, 2, 3}], SignedRegionDistance[ℛ, {(1/3), (1/4), (1/5)}]}ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];{RegionNearest[ℛ, {1, 2, 3}], RegionNearest[ℛ, {(1/3), (1/4), (1/5)}]}spherePoints[{n_, m_}, c_, r_] :=
Flatten[Table[c + r{Cos[k 2π / n]Sin[l π / m], Sin[k 2π / n]Sin[l π / m], Cos[l π / m]}, {k, 0., n - 1}, {l, 0., m - 1}], 1];pl = spherePoints[{16, 8}, RegionCentroid[ℛ], 2];
npl = Table[RegionNearest[ℛ, p], {p, pl}];Legended[Graphics3D[{ℛ, {Thin, Gray, Line[Transpose[{pl, npl}]]}, {Red, Point[pl]}, {PointSize[Medium], Blue, Point[npl]}}, Lighting -> "Neutral", Boxed -> False], PointLegend[{Red, Blue}, {"start", "nearest"}]]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];BoundedRegionQ[ℛ]r = RegionBounds[ℛ]Graphics3D[{{EdgeForm[White], Opacity[0.2, Yellow], Cuboid@@Transpose[r]}, ℛ}, Boxed -> False]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];Integrate[x + y + z, {x, y, z}∈ℛ]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];MinValue[{x y z - x y, {x, y, z}∈ℛ}, {x, y, z}]ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];Reduce[x^2 + y^2 + z^2 == 1 && x - y - z == -1 && z^2 == x y && {x, y, z}∈ℛ, {x, y, z}]属性和关系 (2)
pts = {{1, 1, 2}, {2, 2, 2}, {0, 2, 2}, {1, 1, 0}, {2, 2, 0}, {0, 2, 0}};Graphics3D[Prism[pts], Boxed -> False]ti = {{6, 3, 2, 1}, {5, 6, 2, 1}, {4, 6, 5, 1}};Graphics3D[{Opacity@0.4, Table[Tetrahedron[pts[[i]]], {i, ti}]}, Boxed -> False]ImplicitRegion 可以表示任意 Prism 区域:
Subscript[ℛ, 1] = ImplicitRegion[Subscript[t, 2] ≥ 0 && Subscript[t, 1] - Subscript[t, 3] ≥ 0 && Subscript[t, 1] + Subscript[t, 3] ≤ 2 && Subscript[t, 3] ≥ 0 && Subscript[t, 2] ≤ 2, {Subscript[t, 1], Subscript[t, 2], Subscript[t, 3]}];
Subscript[ℛ, 2] = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]巧妙范例 (1)
ℛ = Prism[{{1, 0.5, 1}, {0, 0, 0}, {2, 0, 0}, {1, 1.5, 1}, {0, 2, 0}, {2, 2, 0}}];Graphics3D[{Opacity[0.3], EdgeForm[], Table[{ColorData["Rainbow"][Rescale[c, {0, 2Pi}]], GeometricTransformation[ℛ, RotationTransform[c, {0, 0, 1}, {2, 0, 0}]]}, {c, 0, 2Pi, 2Pi / 25}]}]相关指南
-
▪
- 图形对象 ▪
- 基本几何区域 ▪
- 立体几何 ▪
- Graphics Primitives Gallery ▪
- 多面体
文本
Wolfram Research (2014),Prism,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Prism.html (更新于 2019 年).
CMS
Wolfram 语言. 2014. "Prism." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2019. https://reference.wolfram.com/language/ref/Prism.html.
APA
Wolfram 语言. (2014). Prism. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Prism.html 年
BibTeX
@misc{reference.wolfram_2026_prism, author="Wolfram Research", title="{Prism}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Prism.html}", note=[Accessed: 11-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_prism, organization={Wolfram Research}, title={Prism}, year={2019}, url={https://reference.wolfram.com/language/ref/Prism.html}, note=[Accessed: 11-September-2026]}