// Jennifer Shin // Section D // jshin1@andrew.cmu.edu // Copyright © Jennifer Shin January 2011 Pittsburgh, PA 15221 All Rights Reserved // no one // no one float x, y, wd, ht; void setup ( ) { size ( 400, 400 ); smooth ( ); background ( 106, 75, 247 ); x = .125 * width; y = .125 * height; wd = .75 * width; ht = .75 * height; } void drawInitials ( float wd, float ht, float x, float y ) { noStroke ( ); fill ( 44, 232, 171 ); ellipse ( x + ( .5 * wd ), y + ( .5 * ht ), wd, ht ); fill ( 0, 0, 0 ); noFill ( ); strokeWeight ( .0125 * width ); stroke ( 244, 245, 25 ); beginShape ( ); curveVertex ( x - ( .05 * wd ), y - (.05 * ht ) ); curveVertex ( x + ( .01 * wd ), y + ( .55 * ht ) ); curveVertex ( x + ( .08 * wd ), y + ( .75 * ht ) ); curveVertex ( x + ( .15 * wd ), y + ( .8 * ht ) ); curveVertex ( x + ( .2 * wd ), y + ( .8 * ht ) ); curveVertex ( x + ( .24 * wd ), y + ( .7 * ht ) ); curveVertex ( x + ( .25 * wd ), y + ( .6 * ht ) ); curveVertex ( x + ( .25 * wd ), y + ( .1 * ht ) ); curveVertex ( x + ( .25 * wd ), y + ( .05 * ht ) ); endShape ( ); stroke ( 255, 105, 5 ); beginShape ( ); curveVertex ( x + ( .8 * wd ), y + ( .1 * ht ) ); curveVertex ( x + ( .68 * wd ), y + ( .05 * ht ) ); curveVertex ( x + ( .5 * wd ), y ); curveVertex ( x + ( .3 * wd ), y + ( .1 * ht ) ) ; curveVertex ( x + ( .4 * wd ), y + ( .3 * ht ) ); curveVertex ( x + ( .5 * wd ), y + ( .325 * ht ) ); curveVertex ( x + ( .6 * wd ), y + ( .35 * ht ) ); curveVertex ( x + ( .67 * wd ), y + ( .5 * ht ) ); curveVertex ( x + ( .67 * wd ), y + ( .66 * ht ) ); curveVertex ( x + ( .62 * wd ), y + ( .92 * ht ) ); curveVertex ( x + ( .5 * wd ), y + ht ); curveVertex ( x + ( .37 * wd ), y + ( .96 * ht ) ); curveVertex ( x + ( .3 * wd ), y + ( .8 * ht ) ); curveVertex ( x + ( .275 * wd ), y + ( .63 * ht ) ); curveVertex ( x + ( .26 * wd ), y + ( .6 * ht ) ); endShape ( ); stroke ( 250, 28, 113 ); line ( x + ( .7 * wd ), y + ( .05 * ht ), x + ( .7 * wd ), y + ( .95 * ht ) ); beginShape ( ); curveVertex ( x + ( .95 * wd ), y + ( .17 * ht ) ); curveVertex ( x + ( .9 * wd ), y + ( .22 * ht ) ); curveVertex ( x + ( .86 * wd ), y + ( .3 * ht ) ); curveVertex ( x + ( .77 * wd ), y + ( .4 * ht ) ); curveVertex ( x + ( .7 * wd ), y + ( .45 * ht ) ); curveVertex ( x + ( .65 * wd ), y + ( .45 * ht ) ); endShape ( ); beginShape ( ); curveVertex ( x + ( .65 * wd ), y + ( .45 * ht ) ); curveVertex ( x + ( .7 * wd ), y + ( .45 * ht ) ); curveVertex ( x + ( .77 * wd ), y + ( .47 * ht ) ); curveVertex ( x + ( .82 * wd ), y + ( .52 * ht ) ); curveVertex ( x + ( .87 * wd ), y + ( .61 * ht ) ); curveVertex ( x + ( .92 * wd ), y + ( .75 * ht ) ); curveVertex ( x + ( .95 * wd ), y + ( .8 * ht ) ); endShape ( ); } void draw ( ) { drawInitials ( .1 * width, .1 * width, .675 * width, .2 * height ); drawInitials ( .085 * width, .085 * width, .53 * width, .1 * height ); drawInitials ( .080 * width, .080 * width, .35 * width, .12 * height ); drawInitials ( .075 * width, .075 * width, .2 * width, .25 * height ); drawInitials ( .070 * width, .070 * width, .3 * width, .35 * height ); drawInitials ( .065 * width, .065 * width, .45 * width, .41 * height ); drawInitials ( .065 * width, .065 * width, .6 * width, .49 * height ); drawInitials ( .070 * width, .070 * width, .7 * width, .6 * height ); drawInitials ( .075 * width, .075 * width, .62 * width, .73 * height ); drawInitials ( .080 * width, .080 * width, .45 * width, .78 * height ); drawInitials ( .085 * width, .085 * width, .3 * width, .75 * height ); drawInitials ( .1 * width, .1 * width, .2 * width, .6 * height ); //saveFrame ( "HW4.jpg" ); noLoop ( ); }