Cuboid

Cuboid[pmin]

represents a unit hypercube with its lower corner at pmin.

Cuboid[pmin,pmax]

represents an axis-aligned filled cuboid with lower corner pmin and upper corner pmax.

Details

Examples

open allclose all

Basic Examples  (5)

A unit cuboid:

Two unit cuboids:

Cuboids with different sizes:

Differently styled cuboids:

Volume and centroid:

Scope  (21)

Graphics  (11)

Specification  (3)

A unit cube:

A unit square:

A cuboid parallel to each axis:

Short form for a unit cube cornered at the origin:

Styling  (5)

Color directives specify the face colors of cuboids:

FaceForm and EdgeForm can be used to specify the styles of the faces and edges:

Different properties can be specified for the front and back of faces using FaceForm:

Cuboid with different specular exponents:

White cuboid that glows red:

Opacity specifies the face opacity:

Coordinates  (3)

Use Scaled coordinates:

Specify scaled offsets from the ordinary coordinates:

Points can be Dynamic:

Regions  (10)

Embedding dimension is the dimension of the space in which the cuboid lives:

Geometric dimension is the dimension of the shape itself:

Membership testing:

Get conditions for point membership:

Volume:

Centroid:

Distance from a point:

The equidistance contours for a cuboid:

Signed distance from a point:

Nearest point in the region:

Nearest points to an enclosing sphere:

A cuboid is bounded:

Find its range:

Integrate over a cuboid region:

Optimize over a cuboid region:

Solve equations in a cuboid region:

Applications  (8)

Define a cuboid region by length, width, and height:

Compute its volume:

Visualize some instances:

Total mass for a cuboid region with density given by :

Find the mass of ethanol in a cuboid:

Density of ethanol:

Volume of cuboid:

Mass of ethanol in the cuboid:

Create a bounding box from RegionBounds:

Compute the bounding box:

Compute the difference in Volume:

Visualize the bounding box:

A simple 3D bar chart:

Show a sequence of steps in the evolution of a 3D cellular automaton:

Use as a simple way to visualize volumes:

Hyperboloids:

Properties & Relations  (8)

Use Transpose to convert Cuboid to a range specification:

And conversely, a range specification to a Cuboid specification:

Use Rotate to get all possible cuboids in Graphics3D:

Polygon is a generalization of Cuboid in 2D:

Rectangle is a special case of Cuboid:

Hexahedron is a generalization of Cuboid:

ImplicitRegion can represent any Cuboid:

Parallelepiped can represent any Cuboid:

Cuboid is a norm ball for the -norm:

Neat Examples  (3)

Random cuboid collections:

Sweep a cuboid around an axis:

A pyramid with random color cubes:

Introduced in 1991
 (2.0)
 |
Updated in 2014
 (10.0)
2019
 (12.0)