// Homework 4A // Amy Nichols // Section D // aenichols@cmu.edu void setup( ) { size(600, 600); background(0); smooth(); int initialWidth = 0; int initialHeight = 0; drawBigInitial(); } void drawInitials(float x, float y, float initialWidth, float initialHeight) { stroke(#FCC11C); strokeWeight(initialWidth/12); // made this elastic too! noFill(); // A curve beginShape(); curveVertex(x - initialWidth/12, y + initialHeight + initialHeight/10); curveVertex(x, y + initialHeight); curveVertex(x + initialWidth/6, y); curveVertex(x + initialWidth/3, y + initialHeight); curveVertex(x + .42*initialWidth, y + initialHeight + initialHeight/10); endShape(); // A "line" ellipse(x + initialWidth/6, y + .50*initialHeight, .17*initialWidth, .05*initialHeight); stroke(#980BD6); // E top curve beginShape(); curveVertex(x + .63*initialWidth, y + initialHeight + .30*initialHeight); curveVertex(x + .63*initialWidth, y + .25*initialHeight); curveVertex(x + .50*initialWidth, y); curveVertex(x + .38*initialWidth, y + .25*initialHeight); curveVertex(x + .50*initialWidth, y + .50*initialHeight); curveVertex(x + .58*initialWidth, y - .30*initialHeight); endShape(); // E bottom curve beginShape(); curveVertex(x + .63*initialWidth, y - .30*initialHeight); curveVertex(x + .63*initialWidth, y + .75*initialHeight); curveVertex(x + .50*initialWidth, y + initialHeight); curveVertex(x + .38*initialWidth, y + .75*initialHeight); curveVertex(x + .50*initialWidth, y + .50*initialHeight); curveVertex(x + .58*initialWidth, y + initialHeight + .30*initialHeight); endShape(); stroke(#E01B43); // N left curve beginShape(); curveVertex(x + .67*initialWidth, y - .10*initialHeight); curveVertex(x + .71*initialWidth, y); curveVertex(x + .75*initialWidth, y + .50*initialHeight); curveVertex(x + .71*initialWidth, y + initialHeight); curveVertex(x + .67*initialWidth, y + initialHeight + .10*initialHeight); endShape(); // N right curve beginShape(); curveVertex(x + initialWidth, y - .10*initialHeight); curveVertex(x + (initialWidth - .04*initialWidth), y); curveVertex(x + (initialWidth - .08*initialWidth), y + .5*initialHeight); curveVertex(x + (initialWidth - .04*initialWidth), y + initialHeight); curveVertex(x + initialWidth, y + initialHeight + .10*initialHeight); endShape(); // N connector line(x + .71*initialWidth, y, x + (initialWidth - .04*initialWidth), y + initialHeight); } void drawBigInitial( ) { drawInitials(width*.60, height*.35, width*.08, height*.08); drawInitials(width*.35, height*.45, width*.08, height*.08); drawInitials(width*.45, height*.45, width*.08, height*.08); drawInitials(width*.55, height*.45, width*.08, height*.08); drawInitials(width*.30, height*.35, width*.08, height*.08); drawInitials(width*.45, height*.05, width*.08, height*.08); drawInitials(width*.40, height*.15, width*.08, height*.08); drawInitials(width*.35, height*.25, width*.08, height*.08); drawInitials(width*.50, height*.15, width*.08, height*.08); drawInitials(width*.55, height*.25, width*.08, height*.08); drawInitials(width*.65, height*.45, width*.08, height*.08); drawInitials(width*.70, height*.55, width*.08, height*.08); drawInitials(width*.75, height*.65, width*.08, height*.08); drawInitials(width*.80, height*.75, width*.08, height*.08); drawInitials(width*.25, height*.45, width*.08, height*.08); drawInitials(width*.20, height*.55, width*.08, height*.08); drawInitials(width*.15, height*.65, width*.08, height*.08); drawInitials(width*.10, height*.75, width*.08, height*.08); }