Friday, 16 March 2012

1 . Bouncy Boxes OpenGL Code First Half Class (Square)


//Squares v0.4 by deathclaw 09
import processing.opengl.*;
int numSquares=10;
Square[] s=new Square[numSquares];
void setup()
{
  background(0);
  size(600,400);
  smooth();
  colorMode(HSB,360,100,100,255);
  xVel=random(-5,5);
   
  for(int i=0;i<numSquares;i++)
  {
      s[i]=new Square(width/2,height/2,20);
      s[i].movement(random(-3,3),random(-10),0,0.3);
  }
   
   
  frameRate(60);
}
float xVel;
float mx=0;
float angle=0;
float angle2=0;
float x=0;
float y=0;
float k=0;
float sine;
float purple;
float sat;
float sineC=0;
float randomizer=0;
float v=0;
float colors=0;
int chooser=0;
float xOff=0;
float yOff=0;
   

No comments:

Post a Comment