Created
September 22, 2015 11:41
-
-
Save aaronparsekian/c48d4fa1fce7e4a31e1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(800,800); | |
background(0); | |
frameRate(1800); | |
} | |
var x,a,m,on=false,z,q=-200,o=10,b=20,s; | |
function draw() { | |
push(); | |
fill(103,154,255); //Button #1 103,154,255 | |
rect(0,0,50,50); | |
fill(94,192,232); //Button #2 94,192,232 | |
rect(60,0,50,50); | |
fill(116,255,242); //Button #3 116,255,242 | |
rect(120,0,50,50); | |
fill(94,232,163); //Button #4 94,232,163 | |
rect(180,0,50,50); | |
fill(91,255,106); //Button #5 91,255,106 | |
rect(240,0,50,50); | |
fill(25,182,204); //Button #6 25,182,204 400 | |
rect(400,0,50,50); | |
fill(95,146,153); //Button #7 95,146,153 460 | |
rect(460,0,50,50); | |
fill(57,255,169); //Button #8 57,255,169 | |
rect(520,0,50,50); | |
fill(255,146,147); //Button #9 255,146,147 | |
rect(580,0,50,50); | |
fill(204,25,115); //Button #10 204,25,115 | |
rect(640,0,50,50); | |
pop(); | |
if(m==1){ | |
stroke(103,154,255,40); | |
strokeWeight(2); | |
} | |
else if(m==2){ | |
stroke(94,192,232,40); | |
strokeWeight(2); | |
} | |
else if(m==3){ | |
stroke(116,255,242,40); | |
strokeWeight(2); | |
} | |
else if(m==4){ | |
stroke(94,232,163,40); | |
strokeWeight(2); | |
} | |
else if(m==5){ | |
stroke(91,255,106,40); | |
strokeWeight(2); | |
} | |
else if(m==6){ | |
stroke(25,182,204,40);//Button #6 25,182,204 | |
strokeWeight(2); | |
} | |
else if(m==7){ | |
stroke(95,146,153,40);//Button #7 95,146,153 | |
strokeWeight(2); | |
} | |
else if(m==8){ | |
stroke(57,255,169,40);//Button #8 57,255,169 | |
strokeWeight(2); | |
} | |
else if(m==9){ | |
stroke(255,146,147,40);//Button #9 255,146,147 | |
strokeWeight(2); | |
} | |
else if(m==10){ | |
stroke(204,25,115,40); //Button #10 204,25,115 | |
strokeWeight(2); | |
} | |
translate(width/2,height/2); | |
rotate(s); | |
s=s+PI/random(10); | |
line(x=randomGaussian(-200,200),-sqrt(-pow(x,2)+40000),a=randomGaussian(200,200),sqrt(-pow(a,2)+40000)); | |
line(x=randomGaussian(-200,200),-sqrt(-pow(x,2)+40000),a=randomGaussian(200,200),-sqrt(-pow(a,2)+40000)); | |
line(x=randomGaussian(-200,200),-sqrt(-pow(x,2)+40000),a=randomGaussian(200,200),sqrt(-pow(a,2)+40000)); | |
line(x=randomGaussian(-200,200),-sqrt(-pow(x,2)+40000),a=randomGaussian(200,200),-sqrt(-pow(a,2)+40000)); | |
fill(255,40); | |
ellipse(x,-sqrt(-pow(x,2)+40000),4,4); | |
ellipse(x,-sqrt(-pow(x,2)+40000),2,2); | |
x=x+10; | |
} | |
function mousePressed(){ | |
if(mouseX<50 && mouseY<50) //Button 1 | |
{ | |
m=1; | |
on=!on; | |
} | |
else if(mouseX>60 && mouseX<110 && mouseY<50) //Button 2 | |
{ | |
m=2; | |
on=!on; | |
} | |
else if(mouseX>120&& mouseX<170 && mouseY<50) //Button 3 | |
{ | |
m=3; | |
on=!on; | |
} | |
else if(mouseX>180&& mouseX<230 && mouseY<50) //Button 4 | |
{ | |
m=4; | |
on=!on; | |
} | |
else if(mouseX>240&& mouseX<290 && mouseY<50) //Button 5 | |
{ | |
m=5; | |
on=!on; | |
} | |
else if(mouseX>400&& mouseX<450 && mouseY<50) //Button 6 400 | |
{ | |
m=6; | |
on=!on; | |
} | |
else if(mouseX>460&& mouseX<510 && mouseY<50) //Button 7 460 | |
{ | |
m=7; | |
on=!on; | |
} | |
else if(mouseX>520&& mouseX<570 && mouseY<50) //Button 8 520 | |
{ | |
m=8; | |
on=!on; | |
} | |
else if(mouseX>580&& mouseX<630 && mouseY<50) //Button 9 580 | |
{ | |
m=9; | |
on=!on; | |
} | |
else if(mouseX>640&& mouseX<690 && mouseY<50) //Button 10 640 | |
{ | |
m=10; | |
on=!on; | |
} | |
else if (mouseX) | |
{ | |
background(0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment