//chongho lee //section a //chonghol@andrew.cmu.edu float x = width/8; float y = height/8; float boxWidth = width*0.75; float boxHeight = height*0.75; void setup() { size(600, 600); background(#000000); println ("Homework #4A"); drawBigInitial(); } void drawBigInitial() { // drawing the upper-curve of the initial "C" drawInitials(width * 0.75, height * 0.25, width * 0.15, height * 0.1); drawInitials(width * 0.7, height * 0.12, width * 0.15, height * 0.1); drawInitials(width * 0.65, height * 0.0001, width * 0.15, height * 0.1); drawInitials(width * 0.53, height * 0.0001, width * 0.15, height * 0.1); drawInitials(width * 0.41, height * 0.0001, width * 0.15, height * 0.1); drawInitials(width * 0.29, height * 0.0001, width * 0.15, height * 0.1); drawInitials(width * 0.22, height * 0.12, width * 0.15, height * 0.1); drawInitials(width * 0.18, height * 0.25, width * 0.15, height * 0.1); // drawing the vertical part of the initial "C" drawInitials(width * 0.18, height * 0.39, width * 0.15, height * 0.1); drawInitials(width * 0.18, height * 0.53, width * 0.15, height * 0.1); // drawing the lower-curve of the initial "C" drawInitials(width * 0.22, height * 0.66, width * 0.15, height * 0.1); drawInitials(width * 0.29, height * 0.78, width * 0.15, height * 0.1); drawInitials(width * 0.41, height * 0.78, width * 0.15, height * 0.1); drawInitials(width * 0.53, height * 0.78, width * 0.15, height * 0.1); drawInitials(width * 0.65, height * 0.78, width * 0.15, height * 0.1); drawInitials(width * 0.7, height * 0.66, width * 0.15, height * 0.1); drawInitials(width * 0.75, height * 0.53, width * 0.15, height * 0.1); } void drawInitials(float x, float y, float boxHeight, float boxWidth) { noFill(); strokeWeight(5); stroke(#EFF25F); beginShape(); curveVertex(x + .45*boxWidth, y + .45*boxHeight); curveVertex(x + .30*boxWidth, y + .30*boxHeight); curveVertex(x + .15*boxWidth, y + .15*boxHeight); curveVertex(x + .08*boxWidth, y + .25*boxHeight); curveVertex(x + .05*boxWidth, y + .50*boxHeight); curveVertex(x + .08*boxWidth, y + .75*boxHeight); curveVertex(x + .25*boxWidth, y + .85*boxHeight); curveVertex(x + .40*boxWidth, y + .70*boxHeight); curveVertex(x + .45*boxWidth, y + .60*boxHeight); endShape(); stroke(#F25F8C); beginShape(); curveVertex(x + .40*boxWidth, y + .05*boxHeight); curveVertex(x + .45*boxWidth, y + .10*boxHeight); curveVertex(x + .50*boxWidth, y + .35*boxHeight); curveVertex(x + .55*boxWidth, y + .50*boxHeight); curveVertex(x + .48*boxWidth, y + .65*boxHeight); curveVertex(x + .42*boxWidth, y + .78*boxHeight); curveVertex(x + .40*boxWidth, y + .82*boxHeight); curveVertex(x + .35*boxWidth, y + .88*boxHeight); endShape(); beginShape(); curveVertex(x + .25*boxWidth, y + .50*boxHeight); curveVertex(x + .55*boxWidth, y + .50*boxHeight); curveVertex(x + .65*boxWidth, y + .45*boxHeight); curveVertex(x + .70*boxWidth, y + .50*boxHeight); endShape(); beginShape(); curveVertex(x + .80*boxWidth, y + .05*boxHeight); curveVertex(x + .75*boxWidth, y + .10*boxHeight); curveVertex(x + .70*boxWidth, y + .35*boxHeight); curveVertex(x + .65*boxWidth, y + .50*boxHeight); curveVertex(x + .68*boxWidth, y + .65*boxHeight); curveVertex(x + .72*boxWidth, y + .78*boxHeight); curveVertex(x + .80*boxWidth, y + .82*boxHeight); curveVertex(x + .85*boxWidth, y + .88*boxHeight); endShape(); stroke(#3BFFAC); beginShape(); curveVertex(x + .85*boxWidth, y + .05*boxHeight); curveVertex(x + .90*boxWidth, y + .10*boxHeight); curveVertex(x + .93*boxWidth, y + .35*boxHeight); curveVertex(x + .95*boxWidth, y + .50*boxHeight); curveVertex(x + .92*boxWidth, y + .65*boxHeight); curveVertex(x + .88*boxWidth, y + .78*boxHeight); curveVertex(x + .84*boxWidth, y + .82*boxHeight); curveVertex(x + .80*boxWidth, y + .88*boxHeight); endShape(); beginShape(); curveVertex(x + .80*boxWidth, y + .77*boxHeight); curveVertex(x + .84*boxWidth, y + .82*boxHeight); curveVertex(x + .88*boxWidth, y + .84*boxHeight); curveVertex(x + .93*boxWidth, y + .85*boxHeight); curveVertex(x + .97*boxWidth, y + .85*boxHeight); curveVertex(x + 1.00*boxWidth, y + .84*boxHeight); curveVertex(x + 1.10*boxWidth, y + .80*boxHeight); curveVertex(x + 1.20*boxWidth, y + .72*boxHeight); endShape(); }