Rendering several overlapping shapes on a plane in 3D seems to be quite tricky using P3D/OpenGL (in Processing 2.0). Without the right hints there is either "z-fighting" of the different shapes visible (causing headaches) and the strokes of all shapes are visible (including the covered ones).
I searched quite a while for a solution, eventually with the wrong key words, but in the end I found a solution that may is of use to some of the readers.
So if you draw several shapes on the same plane add the two following hints:
hint(DISABLE_DEPTH_TEST); // avoids z-fighting
hint(ENABLE_ACCURATE_2D); // strokes are drawn correctly
A small example
void setup() {
size(200, 200, OPENGL);
}
void draw() {
background(255);
smooth();
hint(DISABLE_DEPTH_TEST); // avoids z-fighting
hint(ENABLE_ACCURATE_2D); // strokes are drawn correctly