Polyhedra are used in many domains, including graphics to represent general shapes and geometry to represent solid regions. Polyhedra are simple yet powerful enough to approximate essentially any 3D solid.  The Wolfram Language provides comprehensive support for polyhedra representation, visualization and computation. All the common definitions of polyhedra can easily be used, and polygons are deeply integrated in the system, including graphics and geometry.

Polyhedron polyhedron or collection of polyhedra with or without voids

Graphics »

Graphics3D visualize polyhedra in 3D with different styles

GraphicsComplex  ▪  VertexColors  ▪  VertexNormals  ▪  EdgeForm  ▪  FaceForm

Polyhedron Representation

CanonicalizePolyhedron convert to a canonical polyhedron representation

PolyhedronCoordinates  ▪  OuterPolyhedron  ▪  InnerPolyhedron

Cube  ▪  Dodecahedron  ▪  Icosahedron  ▪  Octahedron  ▪  Tetrahedron

Cuboid  ▪  Hexahedron  ▪  Parallelepiped  ▪  Prism  ▪  Pyramid  ▪  Simplex

General Polyhedron Classes

RandomPolyhedron generate different classes of random polyhedra (convex, simple, etc.)

PolyhedronDecomposition decompose a polyhedron into different classes of polyhedra

UniformPolyhedron generate uniform polyhedra (platonic solids, prisms, etc.)

PolyhedronData curated collection of polyhedra and their properties

SimplePolyhedronQ  ▪  ConvexPolyhedronQ

Polyhedron Operations

DualPolyhedron dual of a polyhedron

AugmentedPolyhedron augmented polyhedron

BeveledPolyhedron beveled polyhedron

TruncatedPolyhedron vertex-truncated polyhedron

Measures »

Volume give the volume of a polyhedron

SurfaceArea give the surface area of a polyhedron

PolyhedronGenus give the genus of a polyhedron

EulerCharacteristic give the Euler characteristic of a polyhedron

RegionMeasure  ▪  RegionCentroid  ▪  RegionMoment  ▪  MomentOfInertia  ▪  ...

Operations »

RegionUnion, RegionIntersection union, intersection operations on polyhedra

Rotate, Translate, Scale geometric transformations of polyhedra

RegionDifference  ▪  BooleanRegion  ▪  TransformedRegion  ▪  ...


RegionMember test membership or give conditions for membership

RegionEqual  ▪  RegionDisjoint  ▪  RegionWithin  ▪  RandomPoint

Distance »

RegionDistance minimum distance from a point to a polyhedron

RegionNearest  ▪  SignedRegionDistance  ▪  ...

Mesh Parts & Components »

MeshCells vertices, edges and faces of the polyhedron

ConnectedMeshComponents split a polyhedron into connected components

MeshPrimitives  ▪  MeshCellCount  ▪  DimensionalMeshComponents  ▪  ...

Region Representation »

Region geometric representation and automatic visualization of polyhedra

BoundaryMeshRegion  ▪  ImplicitRegion  ▪  ConstantRegionQ  ▪  ...

Solving with Polyhedra »

Solve find curve crossings etc.

NSolve  ▪  Reduce  ▪  Minimize  ▪  NMinimize  ▪  Integrate  ▪  NIntegrate  ▪  ...

Import and Export »

"STL" import and export polyhedra

"PLY"  ▪  "OBJ"  ▪  "OFF"  ▪  "DXF"  ▪  ...