3D graphics Python

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:

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

2 Likes

beginShape(QUAD)

Chrisir

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.

Hello @Daniel11,

It worked with Processing 3.5.4 in Python mode:

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

Reference:

:)

1 Like

TYSM works perfectly now

2 Likes