boolean drawNeg=false; boolean drawPos=false; boolean drawMinN=false; boolean drawEraseMe=false; boolean drawMedPositive=false; boolean drawMaxPositive=false; boolean drawMaxNegative=false; boolean drawClear=false; void setup(){ size(900,600); frameRate(100); background(0); stroke(0,0,0,0); PImage a = loadImage("wood.jpg"); // Load the image into the program fill(255,0,100); rect(0,0,10,height); image(a, 800,0,width, height); image(a, 0,500, width, height); image(a, 0,0, 50,width); image(a, 0, 0, width, 50); fill(0,0,0); stroke(0); ellipse(845,170,40,40); // positive botton ellipse(845,60,55,65); fill(0,0,0); stroke(0); ellipse(845,330,40,40); // negative botton rect(845,150,5,370); ellipse(450,540,50,50); // eraser fill(255); ellipse(450,540,30,30); fill(0); rect(450,515,400,5); // connector rect(50,560,400,5); // connector // noStroke(); fill(0); rect(50,510,10,50); // extreme positive feeling fill(255); rect(52,512,6,48); fill(0); rect(80,520,10,40); // medium positive feeling fill(255); rect(82,522,6,38); //rect(110,530,10,30); // minimum positive feeling noStroke(); fill(0); rect(841,520,10,50); // extremeNegative feeling fill(255); rect(843,520,6,48); fill(0); rect(810,520,10,40); // medium Negative feeling fill(255); rect(812,520,6,38); //rect(780,520,10,30); // minimum Negative feeling fill(0); noStroke(); fill(100,50,0,100); rect(0,0,10,height); rect(0,0,width,10); rect(890,0,10,height); rect(0,590,width,10); rect(50,50,750,10); rect(50,50,10,450); rect(50,490,750,10); rect(790,50,10,450); fill(255); rect(840,155,10,30); rect(830,165,30,10); rect(830,325,30,10); fill(0); rect(120,520,10,30); rect(110,530,30,10); rect(750,540,30,10); // PImage g = loadImage("human.jpg"); //image(g,200,300,50,50); PImage s = loadImage("toung.gif"); image(s,825,50,45,45); //image(s,500,300,50,50); // PImage q = loadImage("body.jpg"); //image(q,60,450,20,60); } void draw() { Negative e=new Negative(); e.drawNeg(); Positive f=new Positive(); f.drawPos(); minimumNegative m=new minimumNegative(); m.drawMinN(); Eraser p=new Eraser(); p.EraseMe(); MediumPositive l=new MediumPositive(); l.drawMedPositive(); MaximumPositive s=new MaximumPositive(); s.drawMaxPositive(); MaximumNegative w=new MaximumNegative(); w.drawMaxNegative(); Clear o=new Clear(); o.drawClear(); } class Negative { float x; float y; float r; Negative () { x=random(0,30); y=random(0,30); r= random(0, TWO_PI); } void drawNeg() { if(mousePressed && mouseX>825 && mouseX<865 && mouseY>310 && mouseY<350) { drawNeg=true; drawPos=false; drawMinN=false; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=false; drawClear=false; } if(drawNeg && mousePressed && mouseX>60 && mouseX<780 && mouseY>60 && mouseY<475) { // noStroke(); // fill(255,0,0,70); //rotate(r); // rect(mouseX,mouseY,x,y); // fill(0,255,255,10); // rect(random(60,750),random(60,450),40,40); // fill(255,0,255,60); // ellipse(mouseX+3,mouseY+3,x,y); fill(255,255,0,60); ellipse(mouseX,mouseY,x,y); fill(0); ellipse(mouseX+3,mouseY+3,x,y); // fill(0,255,0,50); // ellipse(random(60,750),random(60,450),random(0,60),random(0,60)); // fill(0,0,255,10); // ellipse(random(100,700),random(400,450),random(0,60),random(0,60)); // fill(255,255,255,20); // ellipse(random(100,750),random(60,450),random(0,60),random(0,60)); // fill(0,255,0,30); //ellipse(random(250,700),random(60,400),random(0,60),random(0,60)); fill(255,255,255,30); ellipse(random(50,750),random(60,450),random(0,60),random(0,60)); } } } class Positive { float a; float b; Positive() { a=random(0,20); b=random(0,20); } void drawPos() { if(mousePressed && mouseX>825 && mouseX<865 && mouseY>150 && mouseY<190) { drawNeg=false; drawPos=true; drawMinN=false; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=false; drawClear=false; } if(drawPos && mousePressed && mouseX>60 && mouseX<790 && mouseY>60 && mouseY<475) { noStroke(); fill(0,255,0,70); ellipse(mouseX,mouseY,a,b); fill(255,0,255,30); ellipse(random(60,750),random(60,450),40,40); } } } class minimumNegative { float s; float f; minimumNegative() { s=random(0,30); f=random(0,30); } void drawMinN () { if( mousePressed && mouseX>810 && mouseX<820 && mouseY>520 && mouseY<560){ drawNeg=false; drawPos=false; drawMinN=true; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=false; drawClear=false; } if(drawMinN && mousePressed && mouseX>60 && mouseX<780 && mouseY>60 && mouseY<475) { fill(255,255,0,60); ellipse(mouseX+6,mouseY+6,s,f); fill(0,255,255,40); ellipse(mouseX+10,mouseY+10,s,f); fill(255,0,0,50); rect(random(60,750),random(60,450),random(0,60),random(0,60)); fill(0); ellipse(mouseX,mouseY,random(0,40),random(0,40)); } } } class Eraser { int h; int k; Eraser() { h=40; k=40; } void EraseMe() { if (mousePressed && mouseX>400 && mouseX<500 && mouseY>490 && mouseY<590) { drawNeg=false; drawPos=false; drawMinN=false; drawEraseMe=true; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=false; drawClear=false; } if(drawEraseMe && mousePressed && mouseX>80 && mouseX<780 && mouseY>80 && mouseY<455) { fill(0); ellipse(mouseX,mouseY,h,k); } } } class MediumPositive { float a; float b; MediumPositive() { a=random(0,30); b=random(0,30); } void drawMedPositive () { if( mousePressed && mouseX>80 && mouseX<90 && mouseY>520 && mouseY<560){ drawNeg=false; drawPos=false; drawMinN=false; drawEraseMe=false; drawMedPositive=true; drawMaxPositive=false; drawMaxNegative=false; drawClear=false; } if(drawMedPositive && mousePressed && mouseX>60 && mouseX<780 && mouseY>60 && mouseY<475) { fill(255,0,255,60); ellipse(mouseX+3,mouseY+3,a,b); fill(255,255,0,60); ellipse(mouseX,mouseY,a,b); fill(0,255,0,50); ellipse(random(60,750),random(60,450),random(0,60),random(0,60)); fill(255,255,255,30); ellipse(random(60,750),random(60,450),random(0,60),random(0,60)); // fill(2); // ellipse(mouseX,mouseY,40,40); } } } class MaximumPositive { float a; float b; MaximumPositive() { a=random(0,30); b=random(0,30); } void drawMaxPositive () { if( mousePressed && mouseX>50 && mouseX<60 && mouseY>510 && mouseY<560){ drawNeg=false; drawPos=false; drawMinN=false; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=true; drawMaxNegative=false; drawClear=false; } if(drawMaxPositive && mousePressed && mouseX>60 && mouseX<780 && mouseY>60 && mouseY<475) { fill(255,0,255,60); ellipse(mouseX+3,mouseY+3,a,b); fill(255,255,0,60); ellipse(mouseX,mouseY,a,b); fill(0,0,255); ellipse(mouseX+6,mouseY+6,a,b); fill(0,255,0,50); ellipse(random(60,750),random(60,450),random(0,60),random(0,60)); fill(0,0,255,10); ellipse(random(100,700),random(400,450),random(0,60),random(0,60)); fill(255,255,255,20); ellipse(random(100,750),random(60,450),random(0,60),random(0,60)); fill(0,255,0,30); ellipse(random(250,700),random(60,400),random(0,60),random(0,60)); fill(255,255,0,30); ellipse(random(250,700),random(60,400),random(0,60),random(0,60)); fill(255,0,255,30); ellipse(random(100,700),random(60,400),random(0,60),random(0,60)); // fill(2); // ellipse(mouseX,mouseY,40,40); } } } class MaximumNegative { float a; float b; MaximumNegative() { a=random(0,150); b=random(0,150); } void drawMaxNegative () { if( mousePressed && mouseX>840 && mouseX<850 && mouseY>520 && mouseY<570){ drawNeg=false; drawPos=false; drawMinN=false; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=true; drawClear=false; } if(drawMaxNegative && mousePressed && mouseX>60 && mouseX<780 && mouseY>60 && mouseY<475) { //fill(255,0,0); // rect(mouseX+3,mouseY+3,a,b); fill(255); stroke(255,255,255,100); line(mouseX,mouseY,(a*20/3),b); line(mouseX,mouseY,-(a*20/3),-b); noStroke(); fill(255,0,0,150); rect(random(60,750),random(60,450),random(0,60),random(0,60)); fill(255,255,255,30); ellipse(random(60,750),random(60,450),random(0,60),random(0,60)); PImage g = loadImage("human.jpg"); image(g,random(75,700),random(100,400),50,50); // fill(2); // ellipse(mouseX,mouseY,40,40); } } } class Clear { float a; float b; Clear() { a=random(0,30); b=random(0,30); } void drawClear () { if( mousePressed && mouseX>825 && mouseX<875 && mouseY>50 && mouseY<90){ drawNeg=false; drawPos=false; drawMinN=false; drawEraseMe=false; drawMedPositive=false; drawMaxPositive=false; drawMaxNegative=false; drawClear=true; } if(drawClear && mousePressed) { size(900,600); frameRate(100); background(0); stroke(0,0,0,0); PImage a = loadImage("wood.jpg"); // Load the image into the program fill(255,0,100); rect(0,0,10,height); image(a, 800,0,width, height); image(a, 0,500, width, height); image(a, 0,0, 50,width); image(a, 0, 0, width, 50); fill(0,0,0); stroke(0); ellipse(845,170,40,40); // positive botton ellipse(845,60,55,65); fill(0,0,0); stroke(0); ellipse(845,330,40,40); // negative botton rect(845,150,5,370); ellipse(450,540,50,50); // eraser fill(255); ellipse(450,540,30,30); fill(0); rect(450,515,400,5); // connector rect(50,560,400,5); // connector // noStroke(); fill(0); rect(50,510,10,50); // extreme positive feeling fill(255); rect(52,512,6,48); fill(0); rect(80,520,10,40); // medium positive feeling fill(255); rect(82,522,6,38); //rect(110,530,10,30); // minimum positive feeling noStroke(); fill(0); rect(841,520,10,50); // extremeNegative feeling fill(255); rect(843,520,6,48); fill(0); rect(810,520,10,40); // medium Negative feeling fill(255); rect(812,520,6,38); //rect(780,520,10,30); // minimum Negative feeling fill(0); noStroke(); fill(100,50,0,100); rect(0,0,10,height); rect(0,0,width,10); rect(890,0,10,height); rect(0,590,width,10); rect(50,50,750,10); rect(50,50,10,450); rect(50,490,750,10); rect(790,50,10,450); fill(255); rect(840,155,10,30); rect(830,165,30,10); rect(830,325,30,10); fill(0); rect(120,520,10,30); rect(110,530,30,10); rect(750,540,30,10); // PImage g = loadImage("human.jpg"); //image(g,200,300,50,50); PImage s = loadImage("toung.gif"); image(s,825,50,45,45); //image(s,500,300,50,50); // PImage q = loadImage("body.jpg"); //image(q,60,450,20,60); } } }