colour.geometry.primitive_vertices_quad_mpl#

colour.geometry.primitive_vertices_quad_mpl(width: float = 1, height: float = 1, depth: float = 0, origin: ArrayLike = np.array([0, 0]), axis: Union[Literal['+z', '+x', '+y', 'yz', 'xz', 'xy'], str] = '+z') ndarray[source]#

Return the vertices of a quad primitive for use with Matplotlib mpl_toolkits.mplot3d.art3d.Poly3DCollection class.

Parameters:
  • width (float) – Quad width.

  • height (float) – Quad height.

  • depth (float) – Quad depth.

  • origin (ArrayLike) – Quad origin on the construction plane.

  • axis (Union[Literal['+z', '+x', '+y', 'yz', 'xz', 'xy'], str]) – Axis the quad will be normal to, or plane the quad will be co-planar with.

Returns:

Quad primitive vertices.

Return type:

numpy.ndarray

Examples

>>> primitive_vertices_quad_mpl()
array([[ 0.,  0.,  0.],
       [ 1.,  0.,  0.],
       [ 1.,  1.,  0.],
       [ 0.,  1.,  0.]])