Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int k1 = 0;
- PFont font;
- PShape mushroom1;
- PShape mushroom2;
- PShape mushroom3;
- PShape mushroom4;
- PShape mushroom5;
- PShape mushroom6;
- PShape mushroom7;
- PShape mushroom8;
- PShape mushroom9;
- PShape mushroom10;
- PShape cheese1;
- PShape cheese2;
- PShape cheese3;
- PShape cheese4;
- PShape cheese5;
- PShape cheese6;
- PShape cheese7;
- PShape cheese8;
- PShape cheese9;
- PShape cheese10;
- PShape cheese11;
- PShape cheese12;
- PShape cheese13;
- PShape cheese14;
- PShape cheese15;
- PShape cheese16;
- PShape cheese17;
- PShape cheese18;
- PShape cheese19;
- PShape cheese20;
- PShape cheese21;
- PShape cheese22;
- PShape cheese23;
- PShape cheese24;
- PShape cheese25;
- PShape cheese26;
- PShape cheese27;
- PShape cheese28;
- PShape cheese29;
- PShape cheese30;
- //pepperoni locations
- int p1;
- int p2;
- int p3;
- int p4;
- int p5;
- int p6;
- int p7;
- int p8;
- int p9;
- int p10;
- int p11;
- int p12;
- int p13;
- int p14;
- int p15;
- int p16;
- int p17;
- int p18;
- int p19;
- int p20;
- //cheese locations
- int c1;
- int c2;
- int c3;
- int c4;
- int c5;
- int c6;
- int c7;
- int c8;
- int c9;
- int c10;
- int c11;
- int c12;
- int c13;
- int c14;
- int c15;
- int c16;
- int c17;
- int c18;
- int c19;
- int c20;
- int c21;
- int c22;
- int c23;
- int c24;
- int c25;
- int c26;
- int c27;
- int c28;
- int c29;
- int c30;
- int c31;
- int c32;
- int c33;
- int c34;
- int c35;
- int c36;
- int c37;
- int c38;
- int c39;
- int c40;
- int c41;
- int c42;
- int c43;
- int c44;
- int c45;
- int c46;
- int c47;
- int c48;
- int c49;
- int c50;
- int c51;
- int c52;
- int c53;
- int c54;
- int c55;
- int c56;
- int c57;
- int c58;
- int c59;
- int c60;
- //mushroom locations
- int m1;
- int m2;
- int m3;
- int m4;
- int m5;
- int m6;
- int m7;
- int m8;
- int m9;
- int m10;
- int m11;
- int m12;
- int m13;
- int m14;
- int m15;
- int m16;
- int m17;
- int m18;
- int m19;
- int m20;
- void setup() {
- size(500, 700);
- frameRate(30);
- colorMode(HSB, 360, 100, 100);
- font = createFont("SourceCodePro-Regular.ttf", 9);
- mushroom1 = loadShape("mushroom.svg");
- mushroom2 = loadShape("mushroom.svg");
- mushroom3 = loadShape("mushroom.svg");
- mushroom4 = loadShape("mushroom.svg");
- mushroom5 = loadShape("mushroom.svg");
- mushroom6 = loadShape("mushroom.svg");
- mushroom7 = loadShape("mushroom.svg");
- mushroom8 = loadShape("mushroom.svg");
- mushroom9 = loadShape("mushroom.svg");
- mushroom10 = loadShape("mushroom.svg");
- cheese1 = loadShape("cheese.svg");
- cheese2 = loadShape("cheese.svg");
- cheese3 = loadShape("cheese.svg");
- cheese4 = loadShape("cheese.svg");
- cheese5 = loadShape("cheese.svg");
- cheese6 = loadShape("cheese.svg");
- cheese7 = loadShape("cheese.svg");
- cheese8 = loadShape("cheese.svg");
- cheese9 = loadShape("cheese.svg");
- cheese10 = loadShape("cheese.svg");
- cheese11 = loadShape("cheese.svg");
- cheese12 = loadShape("cheese.svg");
- cheese13 = loadShape("cheese.svg");
- cheese14 = loadShape("cheese.svg");
- cheese15 = loadShape("cheese.svg");
- cheese16 = loadShape("cheese.svg");
- cheese17 = loadShape("cheese.svg");
- cheese18 = loadShape("cheese.svg");
- cheese19 = loadShape("cheese.svg");
- cheese20 = loadShape("cheese.svg");
- cheese21 = loadShape("cheese.svg");
- cheese22 = loadShape("cheese.svg");
- cheese23 = loadShape("cheese.svg");
- cheese24 = loadShape("cheese.svg");
- cheese25 = loadShape("cheese.svg");
- cheese26 = loadShape("cheese.svg");
- cheese27 = loadShape("cheese.svg");
- cheese28 = loadShape("cheese.svg");
- cheese29 = loadShape("cheese.svg");
- cheese30 = loadShape("cheese.svg");
- }
- void draw() {
- // note that for a pure white, a value of 360 is required in HSB (vs the 255 needed with the default)
- background(k1, 100, 100);
- noStroke();
- blendMode(BLEND);
- smooth();
- //cheese
- noStroke();
- cheese1.disableStyle();
- cheese2.disableStyle();
- cheese3.disableStyle();
- cheese4.disableStyle();
- cheese5.disableStyle();
- cheese6.disableStyle();
- cheese7.disableStyle();
- cheese8.disableStyle();
- cheese9.disableStyle();
- cheese10.disableStyle();
- cheese11.disableStyle();
- cheese12.disableStyle();
- cheese13.disableStyle();
- cheese14.disableStyle();
- cheese15.disableStyle();
- cheese16.disableStyle();
- cheese17.disableStyle();
- cheese18.disableStyle();
- cheese19.disableStyle();
- cheese20.disableStyle();
- cheese21.disableStyle();
- cheese22.disableStyle();
- cheese23.disableStyle();
- cheese24.disableStyle();
- cheese25.disableStyle();
- cheese26.disableStyle();
- cheese27.disableStyle();
- cheese28.disableStyle();
- cheese29.disableStyle();
- cheese30.disableStyle();
- fill((k1+180)%360, 100, 100);
- shape(cheese1, c1, c2, 60, 55);
- shape(cheese2, c3, c4, 60, 55);
- shape(cheese3, c5, c6, 60, 55);
- shape(cheese4, c7, c8, 60, 55);
- shape(cheese5, c9, c10, 60, 55);
- shape(cheese6, c11, c12, 60, 55);
- shape(cheese7, c13, c14, 60, 55);
- shape(cheese8, c15, c16, 60, 55);
- shape(cheese9, c17, c18, 60, 55);
- shape(cheese10, c19, c20, 60, 55);
- shape(cheese11, c21, c22, 60, 55);
- shape(cheese12, c23, c24, 60, 55);
- shape(cheese13, c25, c26, 60, 55);
- shape(cheese14, c27, c28, 60, 55);
- shape(cheese15, c29, c30, 60, 55);
- shape(cheese16, c31, c32, 60, 55);
- shape(cheese17, c33, c34, 60, 55);
- shape(cheese18, c35, c36, 60, 55);
- shape(cheese19, c37, c38, 60, 55);
- shape(cheese20, c39, c40, 60, 55);
- shape(cheese21, c41, c42, 60, 55);
- shape(cheese22, c43, c44, 60, 55);
- shape(cheese23, c45, c46, 60, 55);
- shape(cheese24, c47, c48, 60, 55);
- shape(cheese25, c49, c50, 60, 55);
- shape(cheese26, c51, c52, 60, 55);
- shape(cheese27, c53, c54, 60, 55);
- shape(cheese28, c55, c56, 60, 55);
- shape(cheese29, c57, c58, 60, 55);
- shape(cheese30, c59, c60, 60, 55);
- //pepperoni
- fill(k1+270, 100, 100);
- ellipse(p1, p2, 60, 60);
- ellipse(p3, p4, 60, 60);
- ellipse(p5, p6, 60, 60);
- ellipse(p7, p8, 60, 60);
- ellipse(p9, p10, 60, 60);
- ellipse(p11, p12, 60, 60);
- ellipse(p13, p14, 60, 60);
- ellipse(p15, p16, 60, 60);
- ellipse(p17, p18, 60, 60);
- ellipse(p19, p20, 60, 60);
- //mushroom
- noStroke();
- mushroom1.disableStyle();
- mushroom2.disableStyle();
- mushroom3.disableStyle();
- mushroom4.disableStyle();
- mushroom5.disableStyle();
- mushroom6.disableStyle();
- mushroom7.disableStyle();
- mushroom8.disableStyle();
- mushroom9.disableStyle();
- mushroom10.disableStyle();
- fill((k1+90)%360, 100, 100);
- shape(mushroom1, m1, m2, 60, 55);
- shape(mushroom2, m3, m4, 60, 55);
- shape(mushroom3, m5, m6, 60, 55);
- shape(mushroom4, m7, m8, 60, 55);
- shape(mushroom5, m9, m10, 60, 55);
- shape(mushroom6, m11, m12, 60, 55);
- shape(mushroom7, m13, m14, 60, 55);
- shape(mushroom8, m15, m16, 60, 55);
- shape(mushroom9, m17, m18, 60, 55);
- shape(mushroom10, m19, m20, 60, 55);
- // randomly selects a color around the 360 degree HSB wheel
- if (mousePressed) {
- k1 = int(random(0, 360));
- p1 = int(random(50, 450));
- p2 = int(random(150, 550));
- p3 = int(random(50, 450));
- p4 = int(random(150, 550));
- p5 = int(random(50, 450));
- p6 = int(random(150, 550));
- p7 = int(random(50, 450));
- p8 = int(random(150, 550));
- p9 = int(random(50, 450));
- p10 = int(random(150, 550));
- p11 = int(random(50, 450));
- p12 = int(random(150, 550));
- p13 = int(random(50, 450));
- p14 = int(random(150, 550));
- p15 = int(random(50, 450));
- p16 = int(random(150, 550));
- p17 = int(random(50, 450));
- p18 = int(random(150, 550));
- p19 = int(random(50, 450));
- p20 = int(random(150, 550));
- m1 = int(random(50, 450));
- m2 = int(random(150, 550));
- m3 = int(random(50, 450));
- m4 = int(random(150, 550));
- m5 = int(random(50, 450));
- m6 = int(random(150, 550));
- m7 = int(random(50, 450));
- m8 = int(random(150, 550));
- m9 = int(random(50, 450));
- m10 = int(random(150, 550));
- m11 = int(random(50, 450));
- m12 = int(random(150, 550));
- m13 = int(random(50, 450));
- m14 = int(random(150, 550));
- m15 = int(random(50, 450));
- m16 = int(random(150, 550));
- m17 = int(random(50, 450));
- m18 = int(random(150, 550));
- m19 = int(random(50, 450));
- m20 = int(random(150, 550));
- c1 = int(random(50, 450));
- c2 = int(random(150, 550));
- c3 = int(random(50, 450));
- c4 = int(random(150, 550));
- c5 = int(random(50, 450));
- c6 = int(random(150, 550));
- c7 = int(random(50, 450));
- c8 = int(random(150, 550));
- c9 = int(random(50, 450));
- c10 = int(random(150, 550));
- c11 = int(random(50, 450));
- c12 = int(random(150, 550));
- c13 = int(random(50, 450));
- c14 = int(random(150, 550));
- c15 = int(random(50, 450));
- c16 = int(random(150, 550));
- c17 = int(random(50, 450));
- c18 = int(random(150, 550));
- c19 = int(random(50, 450));
- c20 = int(random(150, 550));
- c21 = int(random(50, 450));
- c22 = int(random(150, 550));
- c23 = int(random(50, 450));
- c24 = int(random(150, 550));
- c25 = int(random(50, 450));
- c26 = int(random(150, 550));
- c27 = int(random(50, 450));
- c28 = int(random(150, 550));
- c29 = int(random(50, 450));
- c30 = int(random(150, 550));
- c31 = int(random(50, 450));
- c32 = int(random(150, 550));
- c33 = int(random(50, 450));
- c34 = int(random(150, 550));
- c35 = int(random(50, 450));
- c36 = int(random(150, 550));
- c37 = int(random(50, 450));
- c38 = int(random(150, 550));
- c39 = int(random(50, 450));
- c40 = int(random(150, 550));
- c41 = int(random(50, 450));
- c42 = int(random(150, 550));
- c43 = int(random(50, 450));
- c44 = int(random(150, 550));
- c45 = int(random(50, 450));
- c46 = int(random(150, 550));
- c47 = int(random(50, 450));
- c48 = int(random(150, 550));
- c49 = int(random(50, 450));
- c50 = int(random(150, 550));
- c51 = int(random(50, 450));
- c52 = int(random(150, 550));
- c53 = int(random(50, 450));
- c54 = int(random(150, 550));
- c55 = int(random(50, 450));
- c56 = int(random(150, 550));
- c57 = int(random(50, 450));
- c58 = int(random(150, 550));
- c59 = int(random(50, 450));
- c60 = int(random(150, 550));
- mushroom1.rotate(random(radians(0), radians(360)));
- mushroom2.rotate(random(radians(0), radians(360)));
- mushroom3.rotate(random(radians(0), radians(360)));
- mushroom4.rotate(random(radians(0), radians(360)));
- mushroom5.rotate(random(radians(0), radians(360)));
- mushroom6.rotate(random(radians(0), radians(360)));
- mushroom7.rotate(random(radians(0), radians(360)));
- mushroom8.rotate(random(radians(0), radians(360)));
- mushroom9.rotate(random(radians(0), radians(360)));
- mushroom10.rotate(random(radians(0), radians(360)));
- cheese1.rotate(random(radians(0), radians(360)));
- cheese2.rotate(random(radians(0), radians(360)));
- cheese3.rotate(random(radians(0), radians(360)));
- cheese4.rotate(random(radians(0), radians(360)));
- cheese5.rotate(random(radians(0), radians(360)));
- cheese6.rotate(random(radians(0), radians(360)));
- cheese7.rotate(random(radians(0), radians(360)));
- cheese8.rotate(random(radians(0), radians(360)));
- cheese9.rotate(random(radians(0), radians(360)));
- cheese10.rotate(random(radians(0), radians(360)));
- cheese11.rotate(random(radians(0), radians(360)));
- cheese12.rotate(random(radians(0), radians(360)));
- cheese13.rotate(random(radians(0), radians(360)));
- cheese14.rotate(random(radians(0), radians(360)));
- cheese15.rotate(random(radians(0), radians(360)));
- cheese16.rotate(random(radians(0), radians(360)));
- cheese17.rotate(random(radians(0), radians(360)));
- cheese18.rotate(random(radians(0), radians(360)));
- cheese19.rotate(random(radians(0), radians(360)));
- cheese20.rotate(random(radians(0), radians(360)));
- cheese21.rotate(random(radians(0), radians(360)));
- cheese22.rotate(random(radians(0), radians(360)));
- cheese23.rotate(random(radians(0), radians(360)));
- cheese24.rotate(random(radians(0), radians(360)));
- cheese25.rotate(random(radians(0), radians(360)));
- cheese26.rotate(random(radians(0), radians(360)));
- cheese27.rotate(random(radians(0), radians(360)));
- cheese28.rotate(random(radians(0), radians(360)));
- cheese29.rotate(random(radians(0), radians(360)));
- cheese30.rotate(random(radians(0), radians(360)));
- }
- noFill();
- stroke(0);
- strokeWeight(380);
- ellipse(width/2,350,800,800);
- textFont(font);
- textAlign(LEFT);
- fill(360);
- text( "void pizza (party) {\n date (mar, 6, 2016);\n time (12 - 1);\n location (br, 320);\n}", 30, 40);
- if (keyPressed==true) {
- saveFrame("johnson0_charette03_###.png");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement