//Claire Castleman //ccastlem@andrew.cmu.edu //Section D int x, y, iWidth, iHeight; void setup() { size(500, 500); background(0, 0, 0); smooth(); x=10; y=10; iWidth=200; iHeight=250; drawBigInitial(); println("Homework #4"); println("Initials: CIC in the shape of an I"); } void drawInitials(float x, float y, float iWidth, float iHeight) { noFill(); strokeWeight(4); stroke(0, 100, 150); 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(100, 25, 125); 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(150, 0, 100); strokeWeight(4); beginShape(); curveVertex(x + 1.6*iWidth, y + .25*iHeight); curveVertex(x + 1.6*iWidth, y + .25*iHeight); curveVertex(x + 1.5*iWidth, y + .20*iHeight); curveVertex(x + 1.6*iWidth, y + .15*iHeight); curveVertex(x + 1.7*iWidth, y + .20*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 + .75*iHeight); endShape(); // Second C } void drawBigInitial () { fill(123, 23, 230); drawInitials(x, y, width*.15, height*.15); drawInitials(x + width*.3, y, width*.15, height*.15); drawInitials(x + width*.6, y, width*.15, height*.15); drawInitials(x + width*.3, y + height*.15, width*.15, height*.15); drawInitials(x + width*.3, y + height*.3, width*.15, height*.15); drawInitials(x + width*.3, y + height*.45, width*.15, height*.15); drawInitials(x + width*.3, y + height*.6, width*.15, height*.15); drawInitials(x + width*.3, y + height*.75, width*.15, height*.15); drawInitials(x, y + height*.75, width*.15, height*.15); drawInitials(x + width*.6, y + height*.75, width*.15, height*.15); }