/* * An example of a CLOSED polygon. * * Note well that there are four vertices, and * that you should NOT repeat any of them. The * last one is automatically connected to the first * due to the use of endShape(CLOSE). * * Note that strokeCap is irrelevant once shape is closed. */ size(600,400); noFill(); strokeWeight(30); beginShape(); vertex(200,100); vertex(250,200); vertex(200,300); vertex(500,200); endShape(CLOSE); // Note use of CLOSE parameter