Not sure if this is a self-portrait or a picture of dave grohl without facial hair….I tried my best. Im also really excited to be back in NYC for the summer.
code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
float lineWidth = 3; void setup () { size (800,600); background (255); noStroke(); fill (168,28,28); //red box rect (700,0,100,100); fill(102,51,0); //brown box rect(700,100,100,100); fill(0); //black box rect(700,200,100,100); fill(255,242,225); //tan box rect(700,300,100,100); fill(255,193,20); //gold box rect(700,400,100,100); fill(153,204,225); //blue sky rect(60,10,620,250); fill(102); //gray rect(60,260,620,675); fill(180); //gray behind head rect (300,120,75,150); // x, y, size fill(180); //gray behind head 2 rect (400,80,55,150); // x, y, size fill(180); //gray behind head 3 rect (480,120,55,150); // x, y, size fill(180); //gray 4 rect (550,70,66,220); // x, y, size fill(180); //gray 2 rect (630,160,50,150); // x, y, size fill(255,242,225); //fill pale ellipse(width/2,height/2,200,250); //circle center, x by y fill(255); // left eye ellipse(363,270,40,45); fill(255); //right eye ellipse(433,270,40,45); fill(180); //gray 1 rect (60,150,60,150); // x, y, size fill(180); //gray 2 rect (150,160,50,150); // x, y, size fill(180); //gray 3 rect (220,140,60,150); // x, y, size fill(0); //shirt rect (320,460,150,140); // x, y, size } void draw(){ //red if (mousePressed && mouseX>=700 &&mouseY<=100) { stroke(168,28,28); } //brown if(mousePressed && mouseX>=700 && mouseY<=200 && mouseY >=100) { stroke (102,51,0);} //black if(mousePressed && mouseX>=700 && mouseY<=300 && mouseY >=200) { stroke (0);} //tan if(mousePressed && mouseX>=700 && mouseY<=400 && mouseY >=300) { stroke (255,242,225);} //gold if(mousePressed && mouseX>=700 && mouseY<=500 && mouseY >=400) { stroke (255,193,20);} strokeWeight(lineWidth); if (mousePressed && mouseButton == LEFT){ line(mouseX,mouseY,pmouseX,pmouseY); } //draw } void keyPressed (){ if (key == '+'){ lineWidth ++; } if (key== '-'){ lineWidth --; } if(lineWidth <=0){ lineWidth=1; } if (key == ' ') { background (255); noStroke(); fill (168,28,28); //red box rect (700,0,100,100); fill(102,51,0); //brown box rect(700,100,100,100); fill(0); //black box rect(700,200,100,100); fill(255,242,225); //tan box rect(700,300,100,100); fill(255,193,20); //gold box rect(700,400,100,100); fill(153,204,225); //blue sky rect(60,10,620,250); fill(102); //gray rect(60,260,620,675); fill(180); //gray behind head rect (300,120,75,150); // x, y, size fill(180); //gray behind head 2 rect (400,80,55,150); // x, y, size fill(180); //gray behind head 3 rect (480,120,55,150); // x, y, size fill(180); //gray 4 rect (550,70,66,220); // x, y, size fill(180); //gray 2 rect (630,160,50,150); // x, y, size fill(255,242,225); //fill pale ellipse(width/2,height/2,200,250); //circle center, x by y fill(255); // left eye ellipse(363,270,40,45); fill(255); //right eye ellipse(433,270,40,45); fill(180); //gray 1 rect (60,150,60,150); // x, y, size fill(180); //gray 2 rect (150,160,50,150); // x, y, size fill(180); //gray 3 rect (220,140,60,150); // x, y, size fill(0); //shirt rect (320,460,150,140); // x, y, size } } |