colour.plotting.cube¶
-
colour.plotting.
cube
(plane=None, origin=None, width=1, height=1, depth=1, width_segments=1, height_segments=1, depth_segments=1)[source]¶ Returns the vertices of a cube made of grids.
- Parameters
plane (array_like, optional) – Any combination of {‘+x’, ‘-x’, ‘+y’, ‘-y’, ‘+z’, ‘-z’}, Included grids in the cube construction.
origin (array_like, optional) – Cube origin.
width (numeric, optional) – Cube width.
height (numeric, optional) – Cube height.
depth (numeric, optional) – Cube depth.
width_segments (int, optional) – Cube segments, quad counts along the width.
height_segments (int, optional) – Cube segments, quad counts along the height.
depth_segments (int, optional) – Cube segments, quad counts along the depth.
- Returns
Cube vertices.
- Return type
ndarray
Examples
>>> cube() array([[[ 0., 0., 0.], [ 1., 0., 0.], [ 1., 1., 0.], [ 0., 1., 0.]], [[ 0., 0., 1.], [ 1., 0., 1.], [ 1., 1., 1.], [ 0., 1., 1.]], [[ 0., 0., 0.], [ 1., 0., 0.], [ 1., 0., 1.], [ 0., 0., 1.]], [[ 0., 1., 0.], [ 1., 1., 0.], [ 1., 1., 1.], [ 0., 1., 1.]], [[ 0., 0., 0.], [ 0., 1., 0.], [ 0., 1., 1.], [ 0., 0., 1.]], [[ 1., 0., 0.], [ 1., 1., 0.], [ 1., 1., 1.], [ 1., 0., 1.]]])