//Anish Chadda //Section B //achadda@andrew.cmu.edu //Homework 4B void setup() { size(1000,500); background(#000000); smooth(); //drawBigInitial(); } void draw () { int iwidth = 20+(int)random(50); int iheight = 40+(int)random(50); int x = (int)random(width - 3*iwidth); int y= (int)random(height - iheight); drawInitials ( x , y , iwidth , iheight ); frameRate( 5); } void drawInitials ( float x, float y, float iwidth, float iheight) { noFill(); strokeWeight(3); stroke(23, 45, 78); beginShape(); curveVertex(x+ .05*iwidth, y+ .8*iheight); curveVertex(x+ .1*iwidth, y+ .6*iheight); curveVertex(x+ .15*iwidth, y+ .2*iheight); curveVertex(x+ .2*iwidth, y+ .6*iheight); curveVertex(x+ .25*iwidth, y+ .8*iheight); endShape(); stroke(32, 78, 189); beginShape(); curveVertex(x+ .3*iwidth, y+ .1*iheight); curveVertex(x+ .33*iwidth, y+ .2*iheight); curveVertex(x+ .3*iwidth, y+ .4*iheight); curveVertex(x+ .33*iwidth, y+ .6*iheight); curveVertex(x+ .3*iwidth, y+ .8*iheight); endShape(); stroke(56, 198, 23); beginShape(); curveVertex(x+ .07*iwidth, y+ .45*iheight); curveVertex(x+ .13*iwidth, y+ .4*iheight); curveVertex(x+ .15*iwidth, y+ .38*iheight); curveVertex(x+ .17*iwidth, y+ .4*iheight); curveVertex(x+ .19*iwidth, y+ .45*iheight); endShape(); beginShape(); curveVertex(x+ .6*iwidth, y+ .22*iheight); curveVertex(x+ .55*iwidth, y+ .2*iheight); curveVertex(x+ .45*iwidth, y+ .4*iheight); curveVertex(x+ .55*iwidth, y+ .6*iheight); curveVertex(x+ .6*iwidth, y+ .58*iheight); endShape(); }