Cube

Cube[]

represents a regular cube centered at the origin with unit edge length.

Cube[l]

represents a cube with edge length l.

Cube[{θ,ϕ},]

represents a cube rotated by an angle θ with respect to the z axis and angle ϕ with respect to the y axis.

Cube[{x,y,z},]

represents a cube centered at {x,y,z}.

Details and Options

Examples

open all close all

Basic Examples  (3)

A cube:

In[1]:=
Click for copyable input
Out[1]=

A styled cube:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Volume and centroid:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Scope  (7)

Introduced in 2019
(12.0)