int x, y, iWidth, iHeight; void setup() { size(400, 400); println("Homework #5"); } void draw() { noStroke(); drawUpperLeftQuadrant(); drawLowerLeftQuadrant(); drawUpperRightQuadrant(); drawLowerRightQuadrant(); } void drawInitials(float x, float y, float iWidth, float iHeight) { noFill(); strokeWeight(4); stroke(0, 0, 255); beginShape(); curveVertex(x + .6*iWidth, y + .1*iHeight); curveVertex(x + .4*iWidth, y + .15*iHeight); curveVertex(x + .2*iWidth, y + .20*iHeight); curveVertex(x, y + .5*iHeight); curveVertex(x + .2*iWidth, y + .80*iHeight); curveVertex(x + .4*iWidth, y + .85*iHeight); curveVertex(x + .6*iWidth, y + .9*iHeight); endShape(); // First C noFill(); stroke(0, 255, 0); strokeWeight(4); beginShape(); curveVertex(x + .8*iWidth, y + .1*iHeight); curveVertex(x + .7*iWidth, y + .2*iHeight); curveVertex(x + .7*iWidth, y + .3*iHeight); curveVertex(x + .6*iWidth, y + .4*iHeight); curveVertex(x + .8*iWidth, y + .5*iHeight); curveVertex(x + .7*iWidth, y + .6*iHeight); curveVertex(x + .9*iWidth, y + .7*iHeight); curveVertex(x + .7*iWidth, y + .8*iHeight); curveVertex(x + .8*iWidth, y + .9*iHeight); endShape(); // Very Squiggly I noFill(); stroke(255, 0, 0); strokeWeight(4); beginShape(); curveVertex(x + 1.6*iWidth, y + .05*iHeight); curveVertex(x + 1.6*iWidth, y + .25*iHeight); curveVertex(x + 1.3*iWidth, y + .3*iHeight); curveVertex(x + 1.1*iWidth, y + .5*iHeight); curveVertex(x + 1.3*iWidth, y + .7*iHeight); curveVertex(x + 1.6*iWidth, y + .75*iHeight); curveVertex(x + 1.6*iWidth, y + .9*iHeight); endShape(); // Second C } void drawUpperLeftQuadrant() { fill(255, 159, 3); rect(0, 0, width/2, height/2); drawInitials(frameCount % (.375*width), height*.1, 30, 30); drawInitials((width*.375) - (frameCount % (.375*width)), .3*height, 30, 30); } void drawLowerLeftQuadrant() { noStroke(); fill(67, 74, 255); rect(0, height/2, width/2, height); drawInitials(width*.1, .9344*height - (frameCount % (.4326*height)), 30, 30); drawInitials(width*.3, height/2 + (frameCount % (.4326*height)), 30, 30); } void drawUpperRightQuadrant() { noStroke(); fill(145, 242, 98); rect(width/2, 0, width, height/2); drawInitials((width*.505) + (frameCount % (.375*width)), (frameCount % (.4326*height)), 30, 30); drawInitials((.875*width) - (frameCount % (.375*width)), (frameCount % (.4326*height)), 30, 30); } void drawLowerRightQuadrant() { noStroke(); fill(185, 75, 180); rect(width/2, height/2, width, height); drawInitials((width*.505) + (frameCount % (.37*width)), .933*height - (frameCount % (.4326*height)) , 30, 30); drawInitials((width*.875) - (frameCount % (.37*width)), .933*height - (frameCount % (.4326*height)), 30, 30); }