# 3D graphics Python

**URL:** <https://discourse.processing.org/t/3d-graphics-python/37388>\
**Category:** Processing.py\
**Created:** [June 7, 2022, 6:39pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388 "2022-06-07T18:39:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel11](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Post date:** [June 7, 2022, 6:39pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388/1 "2022-06-07T18:39:18Z")

</div>

Hi I am really new to processing and I am trying to create a Rubik’s cube simulator with the 3D API. However, when creating an app it just doesn’t make one.  
Here is the code:

```auto
def setup():
  size(480, 480, P3D)

def draw():
    beginShape(POINTS)
    vertex(20,20,0)
    vertex(20,100,0)
    vertex(100,100,0)
    vertex(100,20,0)
    endShape()

```

When I run it nothing happens  
Thanks Daniel

Just FYI I’m just trying to make a square here

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [June 7, 2022, 6:45pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388/2 "2022-06-07T18:45:47Z")

</div>

> [@Daniel11](#):
>
> ` beginShape(POINTS)`

beginShape(QUAD)

Chrisir

---

<div class="post-metadata">

**Author:** ![Daniel11](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Post date:** [June 7, 2022, 6:48pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388/3 "2022-06-07T18:48:51Z")

</div>

It still doesn’t do anything, doesn’t even open a window. Is absolutely fine 2D but as soon as I make it 3D it doesn’t work.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 7, 2022, 7:07pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388/4 "2022-06-07T19:07:18Z")

</div>

Hello @Daniel11,

It worked with Processing 3.5.4 in Python mode:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/0/70e415e491d006caab77fd3cc56f1549dbf3339b.png)

I also “get nothing” with Processing 4.0b8 in in Python mode… no drawing canvas.

Reference:

> **[beginShape() \\ Language (API)](https://py.processing.org/reference/beginShape.html)**
>
> Python Mode for Processing extends the Processing Development Environment with the Python programming language.

`:)`

---

<div class="post-metadata">

**Author:** ![Daniel11](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Post date:** [June 7, 2022, 7:33pm UTC](https://discourse.processing.org/t/3d-graphics-python/37388/5 "2022-06-07T19:33:28Z")

</div>

TYSM works perfectly now
