![example picture for is2d()](/images/reference/Py5Shape_is2d_0.png)
```python
def setup():
s = py5.create_shape()
s.begin_shape()
s.vertex(30, 20)
s.vertex(85, 20)
s.vertex(85, 75)
s.vertex(30, 75)
s.end_shape(py5.CLOSE)
py5.println(s.is2d(), s.is3d())
py5.shape(s)
```
![example picture for is2d()](/images/reference/Py5Shape_is2d_1.png)
```python
def setup():
py5.size(100, 100, py5.P3D)
s = py5.create_shape()
s.begin_shape()
s.vertex(30, 20)
s.vertex(85, 20)
s.vertex(85, 75)
s.vertex(30, 75)
s.end_shape(py5.CLOSE)
py5.println(s.is2d(), s.is3d())
py5.shape(s)
```