Monday, April 02, 2012

Tropical Space

// just type here
// and click "save" when your done

boolean colour= true;
void setup() { 
  size(500,500); 
  background(0,0,10);
  smooth();  noStroke();
  frameRate(20);

  
void draw() {  
  int cnt = frameCount;  
   if(frameCount>50){
  strokeWeight(3);
    stroke(150,mouseX,50,60);
  fill(30,60,150); 
  line(0,0,random(30,470),random(30,470)); 
    
    strokeWeight(3);
    stroke(500,mouseX,500,60);
  fill(30,60,150); 
  line(0,0,random(30,470),random(30,470)); 

 strokeWeight(3);
    stroke(30,mouseX,100,60);
  fill(30,200,100); 
  line(0,0,random(30,470),random(30,470)); 
  
strokeWeight(3);
    stroke(10,mouseX,10,40);
  fill(10,100,50); 
  line(0,0,random(30,470),random(30,470)); //big colour explosion
}
  

if(frameCount>100){
  strokeWeight(2);
    stroke(10,150,20,60);
  fill(150,mouseX,150); 
  line(400,400,random(350,450),random(350,450)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(400,400,random(350,450),random(350,450)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(400,400,random(350,450),random(350,450)); // smaller explosions #1

  if(frameCount>150){
  strokeWeight(2);
    stroke(10,mouseX,20,60);
  fill(150,150,150); 
  line(400,100,random(350,450),random(80,120)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(400,100,random(380,420),random(80,120)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(400,100,random(380,420),random(80,120)); // smaller explosions #2
    
    
if(frameCount>200){
  strokeWeight(2);
    stroke(10,mouseX,20,60);
  fill(150,150,150); 
  line(100,400,random(150,100),random(450,300)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(100,400,random(150,100),random(450,300)); 

  strokeWeight(2);
    stroke(150,mouseX,150,60);
  fill(30,200,100); 
  line(100,400,random(150,10),random(450,300));  // smaller explosions #3


  if(frameCount>250){
    for(int i=0; i < 100; i++) {    fill(50.0*sin(frameCount/100),mouseY,random(150,200),40);    rect(0,10+         100*sin(frameCount/12),cnt%40,200+         cos(cnt/50)*100);    
 rotate(i);
  // Battling Rays
                              
                                }

  for(int i=0; i < 100; i++) {    fill(50.0*sin(frameCount/100),mouseY,random(150,200),40);    
rect(500,10+ 100*sin(frameCount/12),cnt%40,200+ cos(cnt/50)*100);    
 rotate(-i); //outline of rays
  
     }
}
    }
 }

}
 }
void mousePressed(){
  background(250,250,250);
  if(colour==false){
    background(0,0,0);
  }
  colour=!colour;
  // interacttion with mouse click
}

info info

submitted by: ni3cey
views: 1689


Tags:

comments comment

loading loading...

 

Add a comment: