box()
Contents
box()#
A box is an extruded rectangle.
Examples#

def setup():
py5.size(100, 100, py5.P3D)
py5.translate(58, 48, 0)
py5.rotate_y(0.5)
py5.no_fill()
py5.box(40)

def setup():
py5.size(100, 100, py5.P3D)
py5.translate(58, 48, 0)
py5.rotate_y(0.5)
py5.no_fill()
py5.box(40, 20, 50)
Description#
A box is an extruded rectangle. A box with equal dimensions on all sides is a cube.
Underlying Processing method: box
Signatures#
box(
size: float, # dimension of the box in all dimensions (creates a cube)
/,
) -> None
box(
w: float, # dimension of the box in the x-dimension
h: float, # dimension of the box in the y-dimension
d: float, # dimension of the box in the z-dimension
/,
) -> None
Updated on September 01, 2022 16:36:02pm UTC