To be able to use the P3D renderer you must specify it in the size() function
size()
size(200, 200, P3D);
Now, there are three axes: x, y and z.
x
y
z
Now you can proceed in drawing in 3D.