Reference+
Name
box()
Description
A box is an extruded rectangle. A box with equal dimension on all sides is a cube.
Examples
size(400,400,P3D); translate(232, 192, 0); rotateY(0.5); noFill(); box(160);
translate(232, 192, 0); rotateY(0.5); noFill(); box(160, 80, 200);
Syntax
box(size)
box(w, h, d)
Parameters
size
(float)
dimension of the box in all dimensions (creates a cube)w
(float)
dimension of the box in the x‑dimensionh
(float)
dimension of the box in the y‑dimensiond
(float)
dimension of the box in the z‑dimension
Return
void
Related
![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.