Thanks. I took your advice and created two functions(one for vertical lines and one for horizontal lines):
void setup() {
size(400, 400);
noStroke();
noLoop();
}
void draw() {
fill(200, 0, 244);
drawChiseledHLine(20, 200, 120, 200, 0,12);
drawChiseledHLine(20, 20, 120, 20, 1,12);
fill(128);
drawChiseledVLine(120,20, 120, 200, 0, 12);
drawChiseledVLine(20, 20, 20, 200, 1,12);
}
void drawChiseledHLine(int sX, int sY, int eX, int eY, int i, int thick) {
if (i==0) {
beginShape();
vertex(sX, sY); vertex(sX+thick, sY-thick); vertex(eX-thick, eY-thick); vertex(eX, eY);
endShape(CLOSE);
} else {
beginShape();
vertex(sX, sY); vertex(sX+thick, sY+thick); vertex(eX-thick, eY+thick); vertex(eX, eY);
endShape(CLOSE);
}
}
void drawChiseledVLine(int sX, int sY, int eX, int eY, int i, int thick) {
if (i==0) {
beginShape();
vertex(sX, sY); vertex(sX-thick, sY+thick); vertex(eX-thick, eY-thick); vertex(eX, eY);
endShape(CLOSE);
} else {
beginShape();
vertex(sX, sY); vertex(sX+thick, sY+thick); vertex(eX+thick, eY-thick); vertex(eX, eY);
endShape(CLOSE);
}
}