/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://uclaspring12.sketchpad.cc/sp/pad/view/ro.gIgExFu5gdF/rev.2
*
* authors:
* John
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// This sketch builds on a prior work, "Workshop 3", created by Casey Reas
// http://uclaspring12.sketchpad.cc/sp/pad/view/ro.6Nc8CGNBHByCLg/rev.5
// Workshop 3 Template
// Clone and modify this program, then change the name to
// [YOUR NAME] - Workshop 3
// Press Control-R to render the sketch
int x = 10;
int y = 68;
int b = 12;
int a = 10;
float weight = 10;
void setup(){
size(640,300);
smooth();
}
void draw(){
x = mouseX;
y = mouseY;
float hueVal = map(mouseX, 0 , height ,0, 100);
background(194,193,195);
noStroke();
//darkgreen
//fill(56,82,68);
fill(hueVal,82,68);
beginShape();
vertex(153, 0);
vertex(257, 0);
vertex(257, 71);
vertex(137, 33);
endShape(CLOSE);
//white
fill(241,232,230);
beginShape();
vertex(148, 0);
vertex(126, 40);
vertex(178, 111);
vertex(160, 145);
vertex(67, 115);
vertex(128, 0);
endShape(CLOSE);
beginShape();
vertex(285, 145);
vertex(329, 160);
vertex(411, 234);
vertex(366, 317);
vertex(274, 284);
vertex(294, 247);
vertex(238, 229);
endShape(CLOSE);
//green
fill(153,153,46);
noStroke();
beginShape();
vertex(128, 40);
vertex(204, 64);
vertex(181, 105);
vertex(128, 88);
endShape(CLOSE);
beginShape();
vertex(440, 32);
vertex(465, 40);
vertex(440, 86);
endShape(CLOSE);
beginShape();
vertex(433, 112);
vertex(433, 186);
vertex(423, 182);
vertex(423, 130);
endShape(CLOSE);
beginShape();
vertex(390, 286);
vertex(414, 293);
vertex(414, 301);
vertex(382, 301);
endShape(CLOSE);
//skyblue1
fill(187,223,241);
beginShape();
vertex(86, 82);
vertex(126, 93);
vertex(127, 201);
vertex(109, 232);
vertex(109, 301);
vertex(-1, 301);
vertex(-1, 235);
endShape(CLOSE);
beginShape();
vertex(211, 66);
vertex(256, 80);
vertex(256, 176);
vertex(165, 147);
endShape(CLOSE);
//darkgrey
fill(96, x-y);
beginShape(); //right
vertex(572, 74);
vertex(643, 98);
vertex(644, 299);
vertex(475, 245);
endShape(CLOSE);
beginShape(); //left
vertex(35, 171);
vertex(127, 201);
vertex(109, 234);
vertex(17, 203);
endShape(CLOSE);
//Purple
fill(145+(x/5),123+(x/6),136+(x/6));
beginShape();
vertex(414, 0);
vertex(378, 69);
vertex(265, 33);
vertex(265, -1);
endShape(CLOSE);
beginShape(); //leftside
vertex(106, 0);
vertex(106, 33);
vertex(10, 201);
vertex(-1, 202);
vertex(0, 0);
endShape(CLOSE);
beginShape(); //right
vertex(541, 128);
vertex(644, 161);
vertex(644, 253);
vertex(497, 206);
endShape(CLOSE);
//black
fill(41, x/2);
beginShape(); //top
vertex(125, 3);
vertex(125, 30);
vertex(113, 26);
endShape(CLOSE);
beginShape(); //leftside
vertex(-1, 103);
vertex(55, 121);
vertex(-1, 220);
endShape(CLOSE);
beginShape(); //toptriangle
vertex(256, -2);
vertex(256, 30);
vertex(236, 24);
endShape(CLOSE);
beginShape(); //top
vertex(265, 40);
vertex(433, 94);
vertex(386, 178);
vertex(433, 193);
vertex(387, 280);
vertex(294, 250);
vertex(341, 156);
vertex(265, 132);
endShape(CLOSE);
beginShape(); //topright
vertex(497, 2);
vertex(590, 30);
vertex(572, 64);
vertex(478, 36);
endShape(CLOSE);
beginShape(); //sliver
vertex(423, 0);
vertex(433, 0);
vertex(433, 94);
vertex(423, 116);
endShape(CLOSE);
//skyblue2
fill(187,223,241);
beginShape();
vertex(363, 114);
vertex(416, 131);
vertex(416, 226);
vertex(320, 196);
endShape(CLOSE);
//blue
fill(127,158,195);
beginShape();
vertex(128, 144);
vertex(154, 153);
vertex(128, 194);
endShape(CLOSE);
beginShape();
vertex(118, 244);
vertex(292, 301);
vertex(118, 301);
endShape(CLOSE);
beginShape();
vertex(416, 24);
vertex(416, 121);
vertex(367, 106);
endShape(CLOSE);
beginShape();
vertex(596, 30);
vertex(644, 47);
vertex(644, 87);
vertex(577, 66);
endShape(CLOSE);
//pale
fill(241,232,230);
beginShape();
vertex(517, -1);
vertex(644, -1);
vertex(644, 40);
endShape(CLOSE);
//redbox
beginShape();
fill(246,79,0);
vertex(443, 197);
vertex(487, 211);
vertex(442, 297);
vertex(397, 281);
endShape(CLOSE);
//TOP GREY
a = mouseY/8 + 8;
stroke(194,193,195);
strokeWeight(a);
//leftangle
line(25,-30,-16,42);
line(129,0,-10,245);
line(250,0,50,345);
line(360,8,193,300);
line(424,120,493,0);
line(378,300,549,0);
line(610,0,439,300);
line(131,35,163,-24);
//rightangle
line(465,-13,640,42);
line(153,0,640,156);
line(0,49,640,255);
line(0,160,437,300);
//vertical
line(128,0,128,211);
//TOP ORANGE
b = mouseY/10 + 12;
stroke(246,79,0);
strokeWeight(b);
//angle
line(421,0,421,300);
//angle 2
line(304,-16,640,91); //top right
line(268,288,268,300);
line(0,202,418,335);
line(0,99,631,300);
line(0,-5 ,420,128);
//vertical
line(420,0,268,288); //middle down
line(262,0,262,182); //middle down
line(112,0,112,30); //left
line(115,239,115,300); //far left
if (mousePressed){
// stroke(x/2);
colorMode(HSB, (x+5)+(y/2));
// weight = dist(mouseX, mouseY, pmouseX, pmouseY);
// strokeWeight(weight);
// line(mouseX, mouseY, pmouseX, pmouseY);
}
else{
colorMode(RGB, 255);
}
}