Prism[{p1,…,p6}]
represents a filled prism connecting the triangles {p1,p2,p3} and {p4,p5,p6}.
Prism
Prism[{p1,…,p6}]
represents a filled prism connecting the triangles {p1,p2,p3} and {p4,p5,p6}.
Details and Options
- Prism can be used as a geometric region and a graphics primitive.
- Prism represents a filled polyhedron given by the polygon faces {p1,p3,p6,p4}, {p2,p1,p4,p5}, {p6,p3,p2,p5}, {p1,p2,p3}, and {p4,p6,p5}.
- CanonicalizePolyhedron can be used to convert a prism to an explicit Polyhedron object.
- Prism can be used in Graphics3D.
- In graphics, the points pi can be Scaled and Dynamic expressions.
- Graphics rendering is affected by directives such as FaceForm, EdgeForm, Opacity, Texture, and color.
- The following options and settings can be used in graphics:
-
VertexColors Automatic vertex colors to be interpolated VertexNormals Automatic effective vertex normals for shading VertexTextureCoordinates None coordinates for textures
Examples
open all close allBasic Examples (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}}]]Scope (18)
Graphics (8)
Specification (2)
Graphics3D[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}]]v1 = {{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}};
v2 = v1 + 2;Graphics3D[Prism[{v1, v2}]]Styling (3)
FaceForm and EdgeForm can be used to specify the styles of the faces and edges:
ℛ = 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]Apply a Texture to the faces:
ℛ = 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"]Assign VertexColors to vertices:
Graphics3D[Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}, VertexColors -> ColorData[60, "ColorList"]]]Coordinates (3)
Specify coordinates by fractions of the plot range:
ℛ = 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]Specify scaled offsets from the ordinary coordinates:
ℛ = 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]Points can be 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}}]]}]Regions (10)
Embedding dimension is the dimension of the space in which the prism lives:
ℛ = Prism[{{1, 0, 1}, {0, 0, 0}, {2, 0, 0}, {1, 2, 1}, {0, 2, 0}, {2, 2, 0}}];RegionEmbeddingDimension[ℛ]Geometric dimension is the dimension of the shape itself:
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}]}Get conditions for membership:
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}]}The equidistance contours for a prism:
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)}]}Nearest points to an enclosing sphere:
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]Integrate over a prism region:
ℛ = 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}]Solve equations in a prism region:
ℛ = 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}]Properties & Relations (2)
A prism can be represented as the union of three tetrahedra:
pts = {{1, 1, 2}, {2, 2, 2}, {0, 2, 2}, {1, 1, 0}, {2, 2, 0}, {0, 2, 0}};Graphics3D[Prism[pts], Boxed -> False]Point index list of tetrahedra vertices:
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 can represent any Prism region:
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]]Neat Examples (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}]}]Related Guides
Text
Wolfram Research (2014), Prism, Wolfram Language function, https://reference.wolfram.com/language/ref/Prism.html (updated 2019).
CMS
Wolfram Language. 2014. "Prism." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Prism.html.
APA
Wolfram Language. (2014). Prism. Wolfram Language & System Documentation Center. Retrieved from 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: 12-June-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: 12-June-2026]}