# box()

## Example

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2F0ToASUYfLrjrbgKF7dXj%2Fbox%20simple.PNG?alt=media&#x26;token=5880c5fd-2920-4a94-8118-67bb09271ced" alt=""><figcaption></figcaption></figure>

## Syntax

```python
box([width], [height], [depth], [detailX], [detailY])
```

<table><thead><tr><th width="140">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>width</td><td>length of the box in the x-direction</td></tr><tr><td>height</td><td>length of the box in the y-direction</td></tr><tr><td>depth</td><td>length of the box in the z-direction</td></tr></tbody></table>

<details>

<summary>Example Full Code</summary>

```python
def setup():
  createCanvas(300,300, WEBGL)

def draw():
  background(255, 79, 132)
  orbitControl()
  stroke(176, 235, 51)
  fill(112, 88, 255)
  strokeWeight(2)

  r = frameCount
  rotateX(r)
  rotateY(-r)
  rotateZ(r)
  box(150, 100, 50)
```

</details>

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FquIzQshSe2XyI8DalWcN%2Fbox%20full.gif?alt=media&#x26;token=813d93a8-83b5-40e2-8d25-7a53edb59949" alt=""><figcaption></figcaption></figure>

## Description

draws a box of a specified width, height, and depth.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
