//Aileen Craig //Homework 4a //Section A //aacraig@andrew.cmu.edu void setup ( ) { size( 400, 400); background( #58B452 ); smooth( ); drawBigInitial( ); } void drawInitials ( float x, float y, float iWidth, float iHeight) { strokeWeight(4); noFill(); //First A stroke(#060A4D); beginShape(); curveVertex(x + .12*iWidth, y + .95*iHeight); curveVertex(x + .1*iWidth, y + .9*iHeight); curveVertex(x + .5*iWidth, y + .1*iHeight); curveVertex(x + .9*iWidth, y + .9*iHeight); curveVertex(x + .75*iWidth, y + .95*iHeight); endShape(); beginShape(); curveVertex(x + .2*iWidth, y + .6*iHeight); curveVertex(x + .23*iWidth, y + .55*iHeight); curveVertex(x + .4*iWidth, y + .45*iHeight); curveVertex(x + .6*iWidth, y + .6*iHeight); curveVertex(x + .75*iWidth, y + .5*iHeight); curveVertex(x + .8*iWidth, y + .45*iHeight); endShape(); //Second A stroke(#CE2AB0); beginShape(); curveVertex(x + 1.12*iWidth, y + .95*iHeight); curveVertex(x + 1.1*iWidth, y + .9*iHeight); curveVertex(x + 1.5*iWidth, y + .1*iHeight); curveVertex(x + 1.9*iWidth, y + .9*iHeight); curveVertex(x + 1.75*iWidth, y + .95*iHeight); endShape(); beginShape(); curveVertex(x + 1.2*iWidth, y + .6*iHeight); curveVertex(x + 1.23*iWidth, y + .55*iHeight); curveVertex(x + 1.4*iWidth, y + .45*iHeight); curveVertex(x + 1.6*iWidth, y + .6*iHeight); curveVertex(x + 1.75*iWidth, y + .5*iHeight); curveVertex(x + 1.8*iWidth, y + .45*iHeight); endShape(); //The C stroke (#ECF033); beginShape (); curveVertex (x + 2.6*iWidth, y + .4*iHeight); curveVertex (x + 2.65*iWidth, y + .35*iHeight); curveVertex (x + 2.55*iWidth, y + .15*iHeight); curveVertex (x + 2.2*iWidth, y + .5*iHeight); curveVertex (x + 2.55*iWidth, y + .9*iHeight); curveVertex (x + 2.65*iWidth, y + .7*iHeight); curveVertex (x + 2.6*iWidth, y + .65*iHeight); endShape (); } void drawBigInitial( ) { drawInitials (.05*width, .8*height, .05*width, .05*height); drawInitials (.08*width, .75*height, .05*width, .05*height); drawInitials (.11*width, .7*height, .05*width, .05*height); drawInitials (.14*width, .65*height, .05*width, .05*height); drawInitials (.17*width, .6*height, .05*width, .05*height); drawInitials (.20*width, .55*height, .05*width, .05*height); drawInitials (.23*width, .5*height, .05*width, .05*height); drawInitials (.26*width, .45*height, .05*width, .05*height); drawInitials (.29*width, .4*height, .05*width, .05*height); drawInitials (.32*width, .35*height, .05*width, .05*height); drawInitials (.35*width, .3*height, .05*width, .05*height); drawInitials (.38*width, .25*height, .05*width, .05*height); drawInitials (.42*width, .2*height, .05*width, .05*height); drawInitials (.45*width, .25*height, .05*width, .05*height); drawInitials (.48*width, .3*height, .05*width, .05*height); drawInitials (.51*width, .35*height, .05*width, .05*height); drawInitials (.54*width, .4*height, .05*width, .05*height); drawInitials (.57*width, .45*height, .05*width, .05*height); drawInitials (.60*width, .5*height, .05*width, .05*height); drawInitials (.63*width, .55*height, .05*width, .05*height); drawInitials (.66*width, .6*height, .05*width, .05*height); drawInitials (.69*width, .65*height, .05*width, .05*height); drawInitials (.72*width, .7*height, .05*width, .05*height); drawInitials (.75*width, .75*height, .05*width, .05*height); drawInitials (.78*width, .8*height, .05*width, .05*height); drawInitials (.35*width, .55*height, .05*width, .05*height); drawInitials (.5*width, .55*height, .05*width, .05*height); }