quad#
- k3d.helpers.quad(w: float, h: float) Tuple[ndarray, ndarray][source]#
Return the vertices and indices of a w * h quadrilateral.
- Parameters:
w (number) – Quadrilateral width.
h (number) – Quadrilateral height.
- Returns:
Array of vertices and indices.
- Return type:
tuple
Examples#
import k3d
vertices, indices = k3d.helpers.quad(1, 3)
"""
array([-0.5, -1.5, 0.,
0.5, -1.5, 0.,
0.5, 1.5, 0.,
-0.5, 1.5, 0.] ,dtype=float32)
array([0, 1, 2, 0, 2, 3], dtype=uint32)
"""